**The design isn't ready to build from tomorrow. The payment step in steps 3–6 can charge customers without creating an order, or charge them twice.** The rest of the design is reasonable for 200 to 2,000 orders a day, and the fixes are small. They are design changes, though, and they should be settled before code exists.

## Blocking

**1. Retrying the charge can double-charge a customer (step 4).**
- The charge call times out at 5 s, but the provider may have processed it anyway.
- Example: the first call times out after the provider has already charged $50. Retry 1 charges another $50. The customer is charged $100 for one order.
- Fix: send an idempotency key with every charge, such as the order id. The provider then treats the retries as one charge. Check that your provider supports this.

**2. The charge happens inside the database transaction, and rollback can't undo it (steps 3–6).**
- If the charge succeeds but the commit fails, or the final timeout fires after the provider charged, step 6 rolls back. The customer is charged and no order exists.
- A rollback also means the `PENDING` row is never visible to anyone, so the status does nothing.
- The transaction also stays open for up to about 15 s (3 retries × 5 s) while it waits on a network call.
- Fix: commit the `PENDING` order first, then charge outside the transaction. After the charge, set `PAID` or `FAILED` in a second short transaction. Add a small reconciliation job that finds `PENDING` orders older than a few minutes and checks their real status with the provider. That gives you an explicit order state machine, which the doc should list.

**3. Tests don't cover the dangerous paths.**
- The plan has "one integration test for the happy path". Every failure above lives in an unhappy path.
- Add tests for: charge timeout then retry with the same idempotency key, payment declined, commit failure after a successful charge, and the reconciliation job.
- These should be written first, as your standards require.

## Should fix before or early in the build

- **No protection against duplicate submits.** If a client double-clicks or retries `POST /orders`, it creates two orders. Accept a client-supplied idempotency key on that endpoint too.
- **Stale stock is accepted, but the oversell case has no answer.** The 5-minute cache is a fair tradeoff. The doc doesn't say what happens when an order is paid for stock that is gone: cancel and refund, or backorder. Pick one.
- **Confirmation email failure is undefined.** Today a failed send either breaks a paid order or is silently lost. Record the intent to send and send it asynchronously, with retries.
- **Nightly backups mean up to 24 hours of orders and payments could be lost.** Decide whether that is acceptable. If not, enable continuous archiving (Postgres WAL archiving or point-in-time recovery), which is a small change.

## Missing from the doc
The API request and response shapes, error codes, and authentication. Refunds and cancellation are also absent, which is fine if you explicitly list them as out of scope.

## What's good
- The module boundaries are clear, and the rule that no module reads another's tables is the right one.
- Routes stay thin, with the flow in `OrderCheckout`.
- Logging the order id on every line will help a lot when you debug payment problems.

VERDICT: NOT READY
