Skip to main content
POST
Start a checkout

Authorizations

segmnt_session
string
cookie
required

Dashboard session cookie, set after SSO sign-in.

Headers

Idempotency-Key
string

Any unique string. A retry with the same key within 24 hours returns the first result.

Maximum string length: 255

Body

application/json
planId
string
required

Plan names and prices are set by the board. Examples are not real plans.

Example:

"free"

discountCode
string

An optional discount code. A founding code gives 30% off and a referral code 10% off; the total discount is capped at 40%. Codes are case-insensitive. The code is validated before the provider is called: an unknown, expired, or out-of-uses code answers 400 invalid_request with a clear message and never charges the full price by accident. An empty or blank string is treated as no code.

A code applied to a subscription is re-applied on each renewal for the promised number of months (founding and referral referrer 12, referral new customer 3). Send no discountCode on a renewal and the promise stored on the subscription is applied automatically; once the window is used up the renewal is at the full price.

Maximum string length: 64

Response

Checkout created.

id
string
required
checkoutUrl
string<uri>
required

Hosted checkout page of the payment provider.

expiresAt
string<date-time> | null
required

When the hosted page stops working. null when the provider sets no expiry (Moyasar invoices do not expire by default).