This is a demo catalog. Create one for your own architecture with a single prompt.

Get started →

Checkout saga

The orchestration pattern used by checkout to coordinate inventory reservation, payment authorization and order creation.

Flow

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

StepContractOwner
Reserve inventoryReserve InventoryCommandv1.0.0Reserve InventoryCommand to reserve stock for the items in a checked-out cart. Ownerordering-platformSchemaDiagramOpen docsInventory 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 paymentAuthorize PaymentCommandv1.0.0Authorize PaymentCommand to authorize payment for the total of a checked-out cart. Ownerordering-platformSchemaDiagramOpen docsPayment 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 orderCreate OrderCommandv1.0.0Create OrderCommand to create a new order from a checked-out cart. Ownerordering-platformSchemaDiagramOpen docsOrder 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 saga compensation
Open in Cursor