Skip to main content
POST
Create subscription checkout session

Authorizations

x-access-token
string
header
required

JWT token passed in x-access-token header

Body

application/json
priceId
string
required

Stripe price ID to subscribe to

Example:

"price_1234567890"

trial
string

Set to 'true' to enable a trial period on the subscription

Example:

"true"

mode
enum<string>

Stripe checkout mode (defaults to 'subscription')

Available options:
subscription,
payment
Example:

"subscription"

institutionId
string

Institution ID to associate with the subscription (falls back to user's institution)

plan
string

Plan identifier

returnTo
enum<string>

Where Stripe sends the buyer back. tab — the purchase was started inside a course page (an LMS frame) and runs in a new tab with no signed-in session, so Checkout returns to the static pages /payment/complete and /payment/cancelled. Omitted or any other value — the signed-in /signup/success and /signup/failed pages, as before. Never a URL.

Available options:
tab

Response

Checkout session created successfully. Returns the full Stripe checkout session object.

Full Stripe Checkout Session object (see Stripe API docs)

id
string

Stripe checkout session ID

Example:

"cs_test_abc123"

url
string<uri>

URL to redirect the user to for checkout

mode
string

Checkout mode (subscription or payment)

status
string

Session status

client_reference_id
string

Reference containing priceId and institutionId