I've reviewed design.md. Most of it is solid. The module boundaries are clean, the routes are thin, the flow sits in one service class, every log line carries the order id, and you've written down the 800 ms vs. cache trade-off on purpose. That's a good base to build on.

There is one real problem in the payment steps (3–6), and it can cost customers money. It's a small change to the design, but make it before you write `OrderCheckout`.

## Must fix before building

**1. Retrying a charge after a timeout can charge the customer twice (step 4).**
A timeout doesn't tell you the charge failed. The provider may have processed it and only the response was lost. If you retry up to 3 times with no idempotency key, one checkout can become up to 4 charges.
- **Fix:** create one idempotency key per order (the order id works) and send it with every charge attempt. Most payment providers support this. Check that yours does.

**2. The database transaction stays open during the payment call (steps 3–6).**
- The `PENDING` row is never committed. Say the charge succeeds but the last retry times out, or the service crashes. The rollback then deletes the only record of the order, and the customer has paid for an order you have no trace of.
- In the worst case the transaction is held for about 20 s (4 attempts × 5 s). At 2,000 orders a day that's a quiet risk, but a slow provider could use up your connection pool.
- **Fix:** commit the `PENDING` order first. Then call the payment provider outside any transaction. Then update the order to `PAID` or `FAILED` in a second short transaction. Add an `UNKNOWN` state, or just leave the order `PENDING`, for cases where the outcome is unclear, and write a small job that checks those orders with the provider. That job is what makes the system safe against crashes.

## Worth deciding now (not blocking)

**3. Overselling from the stale cache (step 2).** Accepting a 5-minute cache is a fair choice. What's missing is what happens when an order is paid but the warehouse turns out to have no stock: do you refund automatically, backorder, or have someone handle it by hand? One sentence in the doc is enough.

**4. Confirmation email (step 5).** Send it after the commit, and make sure an email failure can't turn a paid order into an error for the client. A simple outbox table or a background job works.

**5. Tests.** Beyond the happy-path integration test, add tests for a payment timeout followed by a successful retry and for a payment failure. Those are exactly the paths where items 1 and 2 would show up.

Once 1 and 2 are fixed, you can start building tomorrow. The rest of the design holds up well.

VERDICT: READY WITH CHANGES
