The Checkout page implements a four-step single-page checkout flow:
Address
Delivery Method
Payment
Review
Each checkout step advances only after the corresponding server-side API operation completes successfully. An order summary remains visible throughout the checkout flow to provide buyers with continuous visibility into pricing, quantities, shipping, and totals.
When saved buyer addresses are available, the checkout experience displays them as selectable options by default. If no saved addresses exist, the page falls back to a manual address entry form.
This flow demonstrates how a headless storefront can render checkout experiences, including address selection, delivery methods, payment processing, and order submission, using B2B Commerce Checkout APIs. Detailed flow diagrams for each checkout step are provided after this end-to-end flow.
This flow demonstrates how a headless storefront can orchestrate address selection and shipping address management during checkout using B2B Commerce Checkout APIs.
Select a shipping address from the saved-address list.
Call the following endpoint to apply the address to the active checkout:
Use a single concatenated name value for the billing address. Separate first-name and last-name fields aren’t supported by this endpoint.
Use the payment response to update the checkout payment state.
Advance the checkout flow to the review step.
Place the Order
This flow demonstrates how a headless storefront can orchestrate payment processing and order submission during checkout using B2B Commerce Checkout APIs.
Select Place Order to submit the checkout.
Finalize totals, tax, and checkout calculations by calling:
Retrieve the following values from the successful submit response:
orderReferenceNumber
orderSummaryId
salesOrderId
Refresh the cart summary after order submission because the active cart is now empty.
Use the order confirmation page to display order details and confirmation information.
Extend the Flow
Replace the purchase order (PO) payment form with a tokenized card payment integration such as Stripe or another payment gateway. The request body sent to POST /commerce/webstores/{webstoreId}/checkouts/active/payments supports the paymentToken field for tokenized payment flows. Integrate the payment gateway of your choice to generate the token, then update the requestType and payment payload accordingly.
Replace the four-step checkout wizard with a fully expanded single-page or accordion-based checkout layout by reading the currentStep value returned from the active checkout response and rendering all checkout sections inline.