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
At least one line. Each line needs
id or productId, plus name. Quantity/price/image optional.Response 200
/checkout/{orderId} on the app origin.
The response also sets an httpOnly checkout access cookie for that order (7 days). checkoutToken is the same value, for clients that open checkout on another host via GET /api/checkout/enter?orderId=…&token=….
An invalid body returns 400 { "error": "Invalid request", "details": … }. A malformed orderId returns 400 Invalid order id.
Related
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/checkoutinstead; it builds the cart from product ids and returns an embed URL with?embed=1.

