Skip to main content
POST
/
stripe
/
checkout
Create Stripe Checkout Session
curl --request POST \
  --url https://api.sandbox.isometric.com/registry/v0/stripe/checkout \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-client-secret: <x-client-secret>' \
  --data '{
  "cancel_url": "https://example.com/cancel",
  "customer_email": "test@example.com",
  "frequency": "monthly",
  "isometric_terms_and_conditions_accepted": true,
  "quantity_kg": 1000,
  "success_url": "https://example.com/success",
  "supplier_terms_and_conditions_accepted": true
}'
{
  "redirect_url": "<string>"
}

Authorizations

Authorization
string
header
required

A JWT Bearer token header for authentication and authorization, in the format Authorization: Bearer <token>

Headers

x-client-secret
string
required

A secret token identifying the client connecting to the API

Examples:

"Syou3EZiO5vuMEgNyBeA8cjEMYOnQDwP"

Body

application/json
cancel_url
string
required

The URL to redirect customer to after a cancelled or failed payment

Examples:

"https://example.com/cancel"

frequency
enum<string>
required

The frequency of the subscription

Available options:
one_time,
monthly,
yearly
isometric_terms_and_conditions_accepted
boolean
required

Whether the user has accepted the Isometric terms and conditions; the request will fail if this is not set to true

Examples:

true

quantity_kg
integer
required

The quantity of credits to purchase, in kilograms. This field can handle bigint values.

Examples:

1000

success_url
string
required

The URL to redirect customer to after a successful payment

Examples:

"https://example.com/success"

supplier_terms_and_conditions_accepted
boolean
required

Whether the user has accepted the supplier terms and conditions; the request will fail if this is not set to true

Examples:

true

customer_email
string | null

The email of the customer to prefill the checkout session with. If not provided, the customer will be prompted to enter their email during checkout.

Examples:

"test@example.com"

Response

Successful Response

redirect_url
string
required