Domains

Ordering and checkout

How the Ordering domain coordinates checkout and owns the order lifecycle.

Domain guide

OrderingOrderingDomainv1.0.0The Ordering domain turns a checked-out cart into a confirmed order. It orchestrates checkout — reserving inventory, aut...Ownerordering-platformMapView docs is the core revenue domain. It turns a checked-out cart into a durable order and owns that order through completion or cancellation.

System context map

Checkout System

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 owns orchestration. Checkout APICheckout APIServicev1.0.0The entry point to the Checkout System. Receives the checkout command from the Shopping domain and starts the checkout f...Subscribescheckout-cartOwnerordering-platformMapRepoView docs receives checkout intent, and Checkout OrchestratorCheckout OrchestratorServicev1.0.0Runs the checkout saga. Reserves inventory, authorizes payment and creates the order, coordinating the steps that turn a...Publishesreserve-inventory, authorize-payment +1Ownerordering-platformMapRepoView docs runs the Checkout SagaCheckout SagaFlowv1.0.0How the Checkout Orchestrator turns a checked-out cart into an order — reserving inventory, authorizing payment and crea...Ownerordering-platformView flowView docs.

The saga coordinates:

  1. Reserve InventoryReserve InventoryCommandv1.0.0Command to reserve stock for the items in a checked-out cart. Ownerordering-platformSchemaMapView docs
  2. Authorize PaymentAuthorize PaymentCommandv1.0.0Command to authorize payment for the total of a checked-out cart. Ownerordering-platformSchemaMapView docs
  3. Create OrderCreate OrderCommandv1.0.0Command to create a new order from a checked-out cart. Ownerordering-platformSchemaMapView docs

If a step fails, the orchestrator compensates rather than leaving partial work behind.

Order Management System

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 owns order state in Order DatabaseOrder DatabaseContainerv1.0.0PostgreSQL database that is the system of record for orders and their items.Ownerordering-platformMapView docs. Order ServiceOrder ServiceServicev1.0.0The system of record for orders. Creates and cancels orders, serves order lookups, and publishes events as orders move t...Publishesorder-created, order-confirmed +9Subscribescreate-order, cancel-order +1APIsAsyncAPIOwnerordering-platformMapRepoView docs handles Create OrderCreate OrderCommandv1.0.0Command to create a new order from a checked-out cart. Ownerordering-platformSchemaMapView docs, Cancel OrderCancel OrderCommandv1.0.0Command to cancel an existing order. Ownerordering-platformSchemaMapView docs and Get OrderGet OrderQueryv1.0.0Query to fetch a single order by its identifier. Ownerordering-platformSchemaMapView docs.

It publishes:

Operating guidance

Do not add payment or inventory state directly to orders unless it is a snapshot needed for audit or customer support. The owning systems remain Payment Processing SystemPayment Processing SystemSystemv1.0.0Internal system that orchestrates payment for orders. It authorizes payments, requests charges from the external payment...Ownerpayments-platformMapView docs and Inventory SystemInventory SystemSystemv1.0.0Internal system that tracks stock and reserves it for orders. It is the source of truth for available inventory and conf...Ownerfulfilment-platformMapView docs.

When checkout behavior changes, update the Place an OrderPlace an OrderFlowv1.0.0The end-to-end journey from a customer checking out their cart to a confirmed order — spanning the Shopping and Ordering...Ownerordering-platformView flowView docs and Checkout SagaCheckout SagaFlowv1.0.0How the Checkout Orchestrator turns a checked-out cart into an order — reserving inventory, authorizing payment and crea...Ownerordering-platformView flowView docs pages as well as the command schemas.

Assess an Ordering domain change
Open in Cursor