Post API v1 checkout sessions

Changed on
post/api/v1/checkout/sessions/

Request

  • The document declares no server URL.
  • Auth: HTTP bearer

Request body

$schemastring uri

A URL to the JSON Schema for this object.

cancel_urlstring required
price_idstring required
quantityinteger required
success_urlstring required
user_idstring required

Our internal user ID

Example request

{
  "$schema": "https://example.com/schemas/CreateStripeCheckoutSessionRequest.json",
  "cancel_url": "https://example.com/cancel",
  "price_id": "price_12345",
  "quantity": 1,
  "success_url": "https://example.com/success",
  "user_id": "123e4567-e89b-12d3-a456-426614174000"
}

Response

OK

$schemastring uri

A URL to the JSON Schema for this object.

createdinteger required
idstring required
modestring required
statusstring required
subscription_idstring
urlstring required

Example response

{
  "$schema": "https://example.com/schemas/StripeCheckoutSessionResponse.json",
  "created": 1700000000,
  "id": "cs_test_12345",
  "mode": "subscription",
  "status": "open",
  "subscription_id": "sub_12345",
  "url": "https://checkout.stripe.com/c/pay/cs_test_12345"
}

Changes