Checkout Workflow
Checkout converts a cart into an order through a saga-style workflow. The service validates the session with Authentication, reads product availability from Inventory, creates reservation leases, calculates totals, requests payment authorization from Billing, and emits order.created.
If Billing authorization fails, Checkout releases inventory reservations and returns a recoverable payment error. If Inventory reservation fails, Checkout never calls Billing and prompts the customer to adjust their cart.
The workflow is intentionally idempotent. The client supplies checkout_attempt_id; repeated submissions return the existing attempt state instead of creating duplicate orders.