Create checkout
POST
Returns a hosted checkout session, not a completed subscription. The server resolves the plan from the environment's active, ready deployment and creates or reuses the customer. Each request creates a new checkout session. Payment and credit fulfillment happen through Stripe webhooks.
bearerAuthheader
AuthorizationBearer <token>Environment API key or OAuth access token. OAuth requests select context with X-Orbyte-Environment or X-Orbyte-Organization when required by the operation.
X-Orbyte-Environment?stringRequired for environment-scoped OAuth operations. API keys remain bound to their own environment.
Length
1 <= lengthapplication/json- body
identity*stringLength
1 <= length <= 128planKey*stringMatch
^[a-z][a-z0-9_-]*$Length
1 <= length <= 128successUrl*stringFormat
uriLength
length <= 2048cancelUrl*stringFormat
uriLength
length <= 2048Checkout session awaiting customer completion
application/json- response
id*stringMatch
^cs_.*url*stringFormat
uricurl -X POST 'https://api.orbytelabs.com/v1/subscriptions/checkout' \ -H 'Content-Type: application/json' \ -d '{ "identity": "string", "planKey": "string", "successUrl": "http://example.com", "cancelUrl": "http://example.com"}'Example Response
{ "id": "string", "url": "http://example.com"}