flow
Checkout Saga
How the Checkout Orchestrator turns a checked-out cart into an order — reserving inventory, authorizing payment and creating the order, with compensation when a step fails.
Flow
Overview
The Checkout Saga is the heart of the Checkout SystemCheckout SystemSystemv1.0.0Internal system that orchestrates checkout. When a cart is checked out it reserves inventory, authorizes payment, and as...Ownerordering-platformMapView docs. It coordinates the steps that turn a checked-out cart into a confirmed order. Each step has a compensating action so a failure never leaves the customer in an inconsistent state.
Steps
- Reserve inventory — Reserve InventoryReserve InventoryCommandv1.0.0Command to reserve stock for the items in a checked-out cart. Ownerordering-platformSchemaMapView docs holds stock for the cart’s items.
- Authorize payment — Authorize PaymentAuthorize PaymentCommandv1.0.0Command to authorize payment for the total of a checked-out cart. Ownerordering-platformSchemaMapView docs places a hold on the order total.
- Create order — Create OrderCreate OrderCommandv1.0.0Command to create a new order from a checked-out cart. Ownerordering-platformSchemaMapView docs persists the order in the Order Management SystemOrder Management SystemSystemv1.0.0Internal system that is the source of truth for orders. It creates orders, tracks their lifecycle, and publishes events ...Ownerordering-platformMapView docs.
If reservation or authorization fails, the orchestrator compensates — releasing the reservation and voiding the authorization — and aborts without creating an order.