CreateCheckoutBody

Attributes

items array of CatalogItem or DynamicItem required

Line items — use product_id for catalog products or name + amount for dynamic items

title string

Custom title for the checkout page. Defaults to the store name. (length 1–128)

description string

Custom description shown on the checkout page. Not included unless explicitly set. (length 1–500)

amount integer

Expected total in cents. If provided, must match the computed item total (validation safeguard). (range 100–1000000)

customer Customer

No description.

coupon_code string

Coupon code to apply (length 0–64)

tax_id string

Tax ID (VAT number) (length 0–32)

display object

Checkout UI configuration

metadata object

Key-value pairs attached to the session. Flows through to the order and webhook payloads. Max 20 keys, key max 40 chars, value max 500 chars.

return_url uri

URL to redirect after successful payment. Must use HTTPS. (format uri)

cancel_url uri

URL to redirect if the customer cancels. Must use HTTPS. (format uri)

CreateCheckoutBody
{  "items": [    {      "product_id": "string",      "variant_id": "string",      "quantity": 0    }  ],  "title": "string",  "description": "string",  "amount": 0,  "customer": {    "name": "string",    "email": "string",    "billing": {      "line1": "string",      "line2": "string",      "city": "string",      "state": "string",      "postal_code": "string",      "country": "string"    }  },  "coupon_code": "string",  "tax_id": "string",  "display": {    "fields": [      {        "key": "string",        "label": {          "type": "string",          "custom": "string"        },        "type": "text",        "optional": false,        "text": {          "default_value": "string",          "minimum_length": 0,          "maximum_length": 0        },        "numeric": {          "default_value": "string",          "minimum_length": 0,          "maximum_length": 0        },        "dropdown": {          "default_value": "string",          "options": []        }      }    ]  },  "metadata": {},  "return_url": "string",  "cancel_url": "string"}