I wouldn't build steps 3–6 as written. The code structure section is fine, and the scale numbers are no problem. But the payment part of the flow can charge customers more than once, and it can lose the record that they were charged. Both problems have standard fixes, and you can write them into the doc in an hour or two before you start.

## Must fix before writing the payment code

**1. Retrying the charge without an idempotency key will double-charge people** (step 4). A 5 s timeout doesn't mean the charge failed. Often the provider charged the card and the reply was just slow. With 3 retries, one checkout can create up to 4 charges. Fix: generate an idempotency key per order (the order id works) and send it with every charge attempt. Check that your provider supports this; most do.

**2. Keeping the database transaction open during the payment call is risky** (steps 3–6).
- The `PENDING` row is never committed, so nobody else can see it, and it gives you no record of anything.
- If the charge succeeds and then the commit fails or the process crashes, the customer has paid and you have no order.
- On failure you roll back, which deletes any trace that you tried to charge them.
- With retries, a connection and its locks can be held for 20+ seconds.

Fix: commit `PENDING` first, then call the provider outside any transaction, then update the order to `PAID` or `FAILED` in a second short transaction.

**3. You need an "unknown" outcome.** After the last timeout, you don't know whether the charge went through. Don't tell the client it failed and forget about it. Mark the order `PAYMENT_UNKNOWN`, for example, and have a job that checks those orders with the provider. A sweep for orders stuck in `PENDING` also covers crashes between steps.

**4. `POST /orders` itself needs an idempotency key.** Double-clicks and client retries after a network drop will otherwise create duplicate orders, each with its own charge.

## Decide now, can be built simply

**5. Overselling.** Stock is checked against a cache that can be 5 minutes old, and nothing reserves or decrements stock. Two customers can buy the last item. At your volume that may be acceptable, but the doc should say what happens when it occurs (refund? backorder?) and who handles it.

**6. Confirmation email.** Sending it after the commit is the right order. Say what happens if the email fails: it should never fail or undo the order. Queue it, or send it from a background job.

**7. Backups.** With nightly backups only, a bad day can lose up to 24 hours of paid orders. For payment data, turn on point-in-time recovery (WAL archiving). On most managed Postgres it's a setting.

**8. Tests.** The one integration test covers only the happy path, and the bugs will be in the failure paths. Add tests for: payment timeout then success on retry (exactly one charge), timeout on every attempt (order goes to the unknown state), crash after charge before update (sweep recovers it), and a duplicate `POST /orders`.

## Fine as is
- Splitting modules so none reads another's tables, keeping routes thin, the `OrderCheckout` class, and logging the order id on every line.
- A single Postgres instance easily handles 2,000 orders a day (about 1.4 per minute).

You can start the scaffolding, inventory and orders modules tomorrow as planned. Rewrite steps 3–6 with fixes 1–4 before anyone writes the payment code.

VERDICT: READY WITH CHANGES
