Checkout

Create order from cart

Finalizes checkout and creates an order from the current cart. The cart is identified by the Bearer token in the Authorization header; all address, shipping, and payment data must already be saved on the cart.

post/checkout-orders

Request

Headers

X-STOREFRONT-KEYstring required

Storefront API Key for authentication. Required for all shop/storefront API requests.

X-Localestring
Example:en

Locale code for localized data (e.g. "en", "fr", "ar"). Defaults to channel's default locale.

X-Channelstring
Example:default

Channel code (e.g. "default"). Defaults to the current channel.

X-Currencystring
Example:USD

Currency code (e.g. "USD", "EUR", "INR"). Defaults to channel's base currency.

Request body

object required

Response

Order placed, or a payment redirect is required. Check the redirect flag: when it is false the order exists and orderId and incrementId (the order number to show the shopper) are set; when it is true no order has been created yet and the shopper must be sent to redirectUrl to pay — the order is created once the gateway returns.

Changes

No recorded changes to this operation across all 13 revisions of this API.