Skip to Content
Orbyte Labs

Create checkout

POST
/v1/topups/checkout

Creates or reuses the customer in this environment and on Stripe; no subscription is required to buy or spend credits. Purchased credits can fund any deployed feature by default, including features added later. Set featureKeys to restrict access to distinct keys from the active deployment. An empty list grants no feature access. Stripe Checkout records the feature scope and expiry in metadata. Features need not belong to a plan. One displayed credit costs $1 USD. credits uses integer ledger units, where one credit is 1000000000 units. Amounts must be exact cents, between $0.50 and $999999.99. Optional expiresAt is an absolute Unix timestamp in milliseconds, in the future when checkout is created; omitted means no expiry. The same expiry applies even if payment confirmation arrives later. Each call creates a new Stripe Checkout session, where customers can save eligible cards for future purchases. Successful payments grant credits through Stripe webhooks. Stripe creates paid invoices by default unless the environment disables them.

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
successUrl*string
Formaturi
Lengthlength <= 2048
cancelUrl*string
Formaturi
Lengthlength <= 2048
credits*string
Match^-?(0|[1-9][0-9]*)$
Lengthlength <= 20
featureKeys?array<>
expiresAt?integer

Optional credit expiration as a Unix timestamp in milliseconds. Must be in the future when checkout is created.

Range0 < value <= 9007199254740991

Response Body

Checkout session awaiting payment

application/json
  1. response
id*string
Match^cs_.*
url*string
Formaturi
Example Request
curl -X POST 'https://api.orbytelabs.com/v1/topups/checkout' \  -H 'Content-Type: application/json' \  -d '{  "identity": "string",  "successUrl": "http://example.com",  "cancelUrl": "http://example.com",  "credits": "string"}'
Example Response
{  "id": "string",  "url": "http://example.com"}