Skip to main content
Primary path for Vite storefronts (platform-checkout.ts). Creates a draft order and returns an id you open at /checkout/{orderId}.

Rate limit

15 requests / 60 seconds per client → 429.

Body

string
required
Store subdomain.
array
required
At least one line. Each line needs id or productId, plus name. Quantity/price/image optional.
string
Optional pre-allocated checkout order id (must pass isValidCheckoutOrderId).
string
Affiliate / referral code.

Response 200

Navigate the buyer to /checkout/{orderId} on the app origin.

Notes

  • Same-origin from the storefront is the expected caller. This is not CORS-opened like embed checkout.
  • Prefer this over inventing orders in the client — stock, holds, and pricing are resolved server-side in startCheckout.
  • Embed merchants should use POST /api/embed/checkout instead; it builds the cart from product ids and returns an embed URL with ?embed=1.