Checkout saga
The orchestration pattern used by checkout to coordinate inventory reservation, payment authorization and order creation.
Checkout SagaFlowv1.0.0Checkout SagaHow the Checkout Orchestrator turns a checked-out cart into an order — reserving inventory, authorizing payment and crea...Ownerordering-platformView flowOpen docs is the detailed orchestration inside Checkout SystemSystemv1.0.0Checkout SystemInternal system that orchestrates checkout. When a cart is checked out it reserves inventory, authorizes payment, and as...Ownerordering-platformDiagramOpen docs. It exists because checkout cannot be a single local transaction: inventory, payment and order state are owned by different systems.
Flow map
Saga steps
| Step | Contract | Owner |
|---|---|---|
| Reserve inventory | Reserve InventoryCommandv1.0.0Reserve InventoryCommand to reserve stock for the items in a checked-out cart. Ownerordering-platformSchemaDiagramOpen docs | Inventory SystemSystemv1.0.0Inventory SystemInternal system that tracks stock and reserves it for orders. It is the source of truth for available inventory and conf...Ownerfulfilment-platformDiagramOpen docs |
| Authorize payment | Authorize PaymentCommandv1.0.0Authorize PaymentCommand to authorize payment for the total of a checked-out cart. Ownerordering-platformSchemaDiagramOpen docs | Payment Processing SystemSystemv1.0.0Payment Processing SystemInternal system that orchestrates payment for orders. It authorizes payments, requests charges from the external payment...Ownerpayments-platformDiagramOpen docs |
| Create order | Create OrderCommandv1.0.0Create OrderCommand to create a new order from a checked-out cart. Ownerordering-platformSchemaDiagramOpen docs | Order Management SystemSystemv1.0.0Order Management SystemInternal system that is the source of truth for orders. It creates orders, tracks their lifecycle, and publishes events ...Ownerordering-platformDiagramOpen docs |
Success condition
Checkout succeeds only when inventory is reserved, payment is authorized and an order is created. The durable outcome is an order in Order DatabaseContainerv1.0.0Order DatabasePostgreSQL database that is the system of record for orders and their items.Ownerordering-platformDiagramOpen docs and subsequent Order CreatedEventv1.0.0Order CreatedPublished when a new order has been created. Ownerordering-platformSchemaDiagramOpen docs publication.
Compensation
If inventory is unavailable or payment is declined, checkout should not create an order. The orchestrator should release any previous reservation or void any authorization as needed.
Change guidance
Adding a checkout step means updating:
- the flow definition,
- the orchestrator implementation,
- the command/event contracts,
- failure and compensation behavior,
- customer-facing status semantics.
Review this checkout saga change as a senior distributed systems engineer. Check whether every step has a clear owner,
success condition, failure condition, retry policy, compensation action and customer-visible status. Call out any
missing contracts or catalog pages that should be updated before release.Review this checkout saga change as a senior distributed systems engineer. Check whether every step has a clear owner, success condition, failure condition, retry policy, compensation action and customer-visible status. Call out any missing contracts or catalog pages that should be updated before release.