Checkout API call sequence from start checkout to place order
Key Takeaway
Start checkout, poll GET until it returns 200, then send your PATCH updates, submit payment, and place the order. A PATCH sent while background processing is still running returns 409 Conflict.
The Commerce Checkout APIs let a B2B or D2C storefront, including a custom or headless one, run checkout as a series of REST calls against a checkout session tied to a cart. To build or debug a checkout, you need to know which call triggers which calculator, and which status codes mean wait, retry, or failure.
How to run a checkout
All checkout resources live under /commerce/webstores/{webstoreId}/checkouts. Most of them take {activeOrCheckoutId} in the path, so you can pass the literal value active or a specific checkout ID.
A typical buyer journey runs in this order:
- Review the cart items with a
GETon the Cart Items resource. - Start checkout.
- Wait for the background calculators to finish.
- Update contact and shipping details with
PATCH. - Pick a delivery method with
PATCH. - Submit payment with
POST .../payments. - Place the order with
POST .../ordersorPOST .../orders/actions.