E-commerce Checkout diagram template

Cart, inventory reservation, payment and order events across cooperating services.

E-commerce Checkout architecture diagramOpen in ArchBoard

Builds a new scene in your browser. Your existing scenes are not touched.

About this design

Checkout touches inventory, pricing, payment and fulfilment, and the trap is making them all succeed or fail together inside one transaction. This template keeps each concern in its own service and coordinates them through events. The cart service holds the basket in Redis; at checkout the order service creates a pending order and asks inventory to reserve stock for a limited time. Payment is called next, and only when it succeeds does the order move to confirmed and publish an event that fulfilment, email and analytics consume independently. If any step fails, compensating actions release the stock and cancel the order. It is a good starting point for discussing sagas, idempotent consumers, price changes between cart and payment, and how to keep the storefront browsable when a downstream service is unavailable.

Diagram as text

This is the source of the diagram, in the ArchBoard diagram DSL. Paste it into Tools, Diagram from text to rebuild or change it.

title "E-commerce checkout"
direction LR
browser "Shopper" -> gateway "API gateway" -> service cart "Cart service" -> cache redis "Cart store"
gateway -> service order "Order service" -> db postgres "Orders DB"
order -> service stock "Inventory service" -> db mysql "Stock DB"
order -> external stripe "Payments"
order -> topic kafka "Order events"
order-events -> worker ship "Fulfilment"
order-events -> worker mail "Email receipts"

More interview classics templates