Skip to main content
POST
Typescript (SDK)

Authorizations

Authorization
string
header
required

API key in the format: Bearer {api_token}

Headers

Idempotency-Key
string

Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.

Maximum string length: 255

Body

application/json
metadata
object

Set of key-value pairs you can attach to the object — store your own system's IDs or grouping labels. Keys max 40 chars (up to 50 keys), values stored as strings max 500 chars. On update, keys merge individually; set a key to null or "" to remove it. Echoed back on reads and in webhook payloads.

Response

Checkout session created

id
string
required
object
string
required
status
enum<string>
required
Available options:
open,
complete,
abandoned,
expired
created_at
string<date-time>
required
updated_at
string<date-time>
required
metadata
object
required
mode
string
required
currency
string | null
required
total
number
required
purchase_url
string
required
checkout_items
object[]
required
customer

ID by default, full object when expanded