Cert++
Close

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:

  1. Review the cart items with a GET on the Cart Items resource.
  2. Start checkout.
  3. Wait for the background calculators to finish.
  4. Update contact and shipping details with PATCH.
  5. Pick a delivery method with PATCH.
  6. Submit payment with POST .../payments.
  7. Place the order with POST .../orders or POST .../orders/actions.
Salesforce Accredited B2B Commerce Developer Professional Study Guide

Checklist progress

0/124Learned

Customize existing checkout flows in order to address the most common customer needs and provide an optimal Storefront experience

0/19

Prepare for the Exam

Play Today's Certle

Study Community

Ask questions and get the latest info from other Salesforce Accredited B2B Commerce Developer Professional studiers.