Skip to Content
Orbyte Labs

Create checkout

POST
/v1/subscriptions/checkout

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.

Authorization

bearerAuth
headerAuthorizationBearer <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.

Header Parameters

X-Orbyte-Environment?string

Required for environment-scoped OAuth operations. API keys remain bound to their own environment.

Length1 <= length

Request Body

application/json
  1. body
identity*string
Length1 <= length <= 128
planKey*string
Match^[a-z][a-z0-9_-]*$
Length1 <= length <= 128
successUrl*string
Formaturi
Lengthlength <= 2048
cancelUrl*string
Formaturi
Lengthlength <= 2048

Response Body

Checkout session awaiting customer completion

application/json
  1. response
id*string
Match^cs_.*
url*string
Formaturi
Example Request
curl -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"}