Initialize a checkout session and automatically redirect to the checkout URL. This endpoint works exactly like the current CMS checkout-init page - you can navigate to it with query parameters and it will automatically redirect the browser to the checkout page.
Perfect for direct links, email links, or anywhere you want automatic redirection.
This endpoint is completely public and requires no authentication.
Additional Query Parameters: Any extra query parameters you add will be automatically forwarded to the checkout URL. This is useful for tracking parameters (utm_source, utm_campaign, etc.) or custom parameters.
Customer Prefill: You can prefill customer information to streamline checkout:
customerId: Link to existing customer accountcustomerEmail: Prefill customer emailcustomerFirstName: Prefill customer first namecustomerLastName: Prefill customer last namecustomerPhone: Prefill customer phone numbercustomerTags: Apply tags to customer (comma-separated or JSON array: “segment:vip,source:facebook”)Checkout Token Forwarding: Include the checkout token in the final checkout URL:
includeCheckoutToken: Set to the desired query parameter name (default: “checkoutToken”)includeCheckoutToken=checkoutToken will append ?checkoutToken=ch_abc123 to the checkout URLincludeCheckoutToken=token will append ?token=ch_abc123 to the checkout URLExample usage:
GET /api/public/v1/checkout/init?storeId=store_123&items=[{"variantId":"var_123","quantity":1}]¤cy=USD
→ Redirects to: https://checkout.example.com/checkout/ch_abc123/op?token=cms_token_xyz
GET /api/public/v1/checkout/init?storeId=store_123&items=[...]¤cy=USD&utm_source=email&custom_param=value
→ Redirects to: https://checkout.example.com/checkout/ch_abc123/op?token=cms_token_xyz&utm_source=email&custom_param=value
GET /api/public/v1/checkout/init?storeId=store_123&items=[...]¤cy=USD&[email protected]&customerFirstName=John&customerLastName=Doe
→ Redirects to checkout with customer information prefilled
Enter your API key as: Bearer your-api-key
Successful response