Create Stripe Checkout Session

Changed on

Create a Stripe Checkout Session for purchasing credits with Isometric verification.

This endpoint returns a Stripe Checkout URL to redirect the user to for completing the payment.

post/stripe/checkout

Request

  • Base URL
    https://api.isometric.com/registry/v0
  • URL
    https://api.isometric.com/registry/v0/stripe/checkout
  • Auth
    HTTP bearer

Headers

x-client-secretstring required

A secret token identifying the client connecting to the API

Example:Syou3EZiO5vuMEgNyBeA8cjEMYOnQDwP

Request body

quantity_kginteger required

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

frequency'one_time' | 'monthly' | 'yearly' required
isometric_terms_and_conditions_acceptedboolean required

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

supplier_terms_and_conditions_acceptedboolean required

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

customer_emailstring email nullable

An email address, accepted in any casing.

success_urlstring uri required

The URL to redirect customer to after a successful payment

cancel_urlstring uri required

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

Example request

{
  "quantity_kg": 1000,
  "isometric_terms_and_conditions_accepted": true,
  "supplier_terms_and_conditions_accepted": true,
  "customer_email": "user@example.com",
  "success_url": "https://example.com/success",
  "cancel_url": "https://example.com/cancel"
}

Response

Successful Response

redirect_urlstring required

Changes

    • breaking

      the / request property's minLength was increased from 0 to 1

    • breaking

      the / request property format changed from no format to email

    • warning

      the / request property's maxLength was set to 200

    • breaking

      the request property's minLength was increased from 0 to 1

    • breaking

      the request property's minLength was increased from 0 to 1

    • breaking

      the request property format changed from no format to uri

    • breaking

      the request property format changed from no format to uri

    • warning

      the request property's maxLength was set to 2083

    • warning

      the request property's maxLength was set to 2083