Skip to main content
Create a provider-hosted billing checkout redirect

Authorizations

Authorization
string
header
required

Opaque control credential

Headers

Idempotency-Key
string
required
Required string length: 8 - 128
Pattern: ^[A-Za-z0-9._:-]+$

Body

application/json
planId
string
required
Required string length: 1 - 40
Pattern: ^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$
interval
enum<string>
Available options:
monthly,
yearly
promotionCode
string

A promotion code to redeem, from a campaign link or typed by the customer. It is resolved and validated before the checkout session is created; an unknown, expired, exhausted or inapplicable code is refused with 400 control.PROMOTION_CODE_INVALID and no session is created. Omit it and the session carries no discount: the provider's own promotion-code field is never opened, so every code is bound to the plan being bought here.

Required string length: 1 - 200
Pattern: ^[A-Za-z0-9-]+$

Response

Existing checkout redirect

schemaVersion
enum<number>
required
Available options:
1
billingRedirectId
string
required
Pattern: ^billredirect_[0-9a-z]{12,32}$
kind
enum<string>
required
Available options:
checkout,
portal,
topup
url
string<uri>
required
Pattern: ^https:\/\/.*
expiresAtMs
integer
Required range: -9007199254740991 <= x <= 9007199254740991