Skip to main content
POST
cURL

Body

application/json

Session creation parameters

successUrl
string<uri>
required

Where Stripe sends the buyer after payment. For anonymous checkout include the literal {CHECKOUT_SESSION_ID} placeholder so the client can call Claim Subscription if the sign-in email differs.

Example:

"https://chat.recoupable.dev?checkout=success&session_id={CHECKOUT_SESSION_ID}"

plan
enum<string>

The plan to buy. Defaults to pro when omitted (back-compat for authenticated callers). pro carries the 30-day trial; starter charges on completion.

Available options:
starter,
pro
Example:

"pro"

cancelUrl
string<uri>

Where Stripe sends the buyer if they leave Checkout without paying.

Example:

"https://recoupable.dev/pricing"

Response

Checkout session created successfully

id
string
required

The checkout session ID.

Example:

"cs_test_a1b2c3d4e5f6g7h8i9j0"

url
string<uri>
required

The hosted checkout URL. Redirect to this URL to complete Checkout.

Example:

"https://checkout.stripe.com/pay/cs_test_a1b2c3d4e5f6g7h8i9j0"