Create Checkout Session

This endpoint allows you to create a checkout session on Stripe for a given priceId. It will return a Stripe checkout url for you to redirect your customer to. This will take them to a Stripe hosted checkout page where they will make a payment and then be redirected back to your site. As part of integration, you will provide us with urls for both success and cancel scenarios. When calling this endpoint, you can also pass an arbitray set of query parameters which we will return to you on the success and cancel urls so you can use them for tracking or other purposes. We will also always return the productId and session_id (Stripe checkout session ID) to the success url for your use.

Header Parameters

X-API-Keystring
Authorizationstring

Body Parameters

priceIdstring Required

The price ID to create a checkout session for

queryParamsobject

Additional query parameters to pass to the checkout session return urls

Show child attributes

Response

200
Object
Checkout session created

Response Attributes

checkoutUrlstring

URL to the Stripe checkout page

401
Object
Unauthorized - Invalid API key or JWT

Response Attributes

messagestring

Error message

codestring

Error code

detailsobject

Additional error details

500
Object
Server error - check errors field for specific error type

Response Attributes

errorsstring Required

Error code identifying the type of error

Enum values:
bad_requestunauthorizedforbiddennot_found500incorrect_datanot_memberalready_memberincorrect_stripe_signatureincorrect_stripe_event
... 4 other enums
Was this section helpful?

What made this section unhelpful for you?

POST

/

Select
1

Response

Was this section helpful?

What made this section unhelpful for you?