**Not ready to build tomorrow.** There are two money-correctness bugs in the payment step (4–6). They are cheap to fix on paper and expensive to find in production.

## Blockers

**1. Retrying the charge can bill a customer more than once.**
- Step 4 retries on a 5 s timeout, up to 3 times. A timeout doesn't mean the charge failed. The provider may have charged the card and responded slowly.
- Failing case: the charge succeeds at the provider but the response takes 6 s. The service retries and the customer is charged again, for up to 4 charges in total. The expected result is one charge.
- Fix: send an idempotency key with every charge call, for example the order id plus an attempt-independent token. Check that the provider supports it. If it doesn't, the design needs a different approach, so confirm this first.

**2. The transaction stays open during the payment call, and a crash can lose a paid order.**
- Step 3 opens a transaction and step 4 calls the provider inside it. Worst case that holds a database connection for 4 × 5 s = 20 s. At 2,000 orders a day that is fine on average, but a slow provider exhausts the connection pool and takes down the whole service.
- Step 6 says "roll back" on failure. If the process crashes after the charge succeeds but before commit, the order disappears and the customer has paid for nothing. Nothing in the design reconciles this.
- Also, the `PENDING` insert is never visible to anyone, because it is rolled back or committed together with `PAID`. So the `PENDING` state does no work.
- Fix: commit `PENDING` first, outside the payment call. Then charge with the idempotency key, then update to `PAID` or `FAILED` in a second short transaction. Add a reconciliation job that finds `PENDING` orders older than N minutes and asks the provider for their real status.

## Serious gaps (fix before launch, not necessarily before starting)

3. **Overselling.** Stock is checked against a cache up to 5 minutes old, and nothing reserves or decrements stock. Two customers can buy the last unit. "We accept the cache" is fine for browsing, but it needs a decision for checkout. Either the warehouse system rejects the order later and you have a cancel/refund path, or you reserve stock. The design says neither.
4. **No duplicate-order protection.** If a client double-clicks or retries `POST /orders` after a network drop, you create two orders. Add a client-supplied idempotency key on `POST /orders`, with a unique constraint.
5. **Email is sent after commit, in the request.** If the email fails, does the request fail? The customer has already paid. It should be asynchronous and best-effort, with retries. At minimum, state that an email failure never affects the response.
6. **Single Postgres with nightly backups.** Up to 24 hours of paid orders can be lost on failure. Given that this is the payments record, turn on point-in-time recovery (WAL archiving). It is cheap and removes the problem.
7. **Error handling is one line.** Step 6 doesn't distinguish a card decline (tell the user, no retry) from a provider outage (retry or queue) from a timeout with unknown outcome (reconcile). Those need different responses and different order states.

## Smaller points
- Tests: "one integration test for the happy path" doesn't cover any of the failures above. Before building, add test cases for the timeout-then-success retry (must charge once), the crash between charge and commit, duplicate `POST`, and a card decline.
- The 800 ms warehouse call is called out as a reason to use the cache, but at 2,000 orders a day, latency matters less than correctness. Reconsider that trade-off once point 3 is decided.
- Module boundaries are good. The `OrderCheckout` class needs a clear state machine (`PENDING → PAID | FAILED | CANCELLED`) written into the doc. This is the structural decision your plan should name.

## What's good
Separate modules with no cross-table reads, thin routes, and order id in every log line are sound. Scale (2,000 a day) doesn't need anything fancy, so the fixes above are small.

## Before you start
Revise the doc with: the idempotency key (provider and `POST /orders`), the two-transaction flow with a reconciliation job, a stock decision, the order state machine, and the failure tests. That's about half a day of writing, then you can build.

VERDICT: NOT READY
