Skip to main content
POST
Create a Stripe Checkout session

Authorizations

Authorization
string
header
required

A Cognito access token, issued through the dashboard's own sign-up and sign-in pages (a backend-for-frontend; there is no Cognito Hosted UI) and sent as Authorization: Bearer <jwt>. Dashboard operations require this scheme and cannot be called with an API key, with no exception. GET /v1/usage and GET /v1/limits offered both schemes from 0.8.0; 0.8.1 withdrew that, because the control-plane API serves them alone and its authorizer has no API-key branch. An account_id supplied by the client is ignored; all reads/writes are scoped server-side to the authenticated account.

Body

application/json

A tier, never a price id. A price_… identifier differs between Stripe's test and live modes and between environments, so one written into a request would be correct in exactly one of them. The price is resolved server-side from the tier's stable lookup key at the moment the session is created.

It is also the safer half of the exchange. A caller-named price is a caller-named amount: any active price in the account would be accepted, including one belonging to a different product, so a customer could pay the cheapest plan's price and be checked out against any other. A tier names a row in a table only the server can read.

tier
enum<string>
required

A tier that is bought rather than granted — Tier minus free. Each of these has a monthly price behind a stable Stripe lookup key; the free tier has neither a product nor a price, because its allowance is the session bootstrap's one-time credit grant and there is nothing to check out.

Available options:
hobby,
startup,
growth,
scale

Response

A Checkout session URL.

checkout_url
string<uri>
required
Maximum string length: 2048