**Short answer:** you can start building tomorrow, but fix the first three items below in design.md first. Each is a small edit, and I found nothing that needs a redesign. The core flow is sound: stock is reserved and committed before the payment call, the provider gets the order id as its idempotency key, and a reconciler settles unknown outcomes.

## Problems, by severity

**High: fix before building**
1. **Reconciliation doesn't say it restores stock.** Step 5 restores stock on a decline. Step 6 only says the reconciler "settles" orders as `FAILED`.
   - Failing case: the service crashes after step 2, so the order is `PENDING` and the provider has no charge. The reconciler marks it `FAILED` and the reserved units are never returned. Stock leaks one order at a time.
   - Fix: say that every move to `FAILED` restores stock in the same transaction, and use one shared method for step 5 and step 6. State what the reconciler does when the provider reports "no such charge" (I'd say `FAILED` plus restore).
2. **Status changes aren't guarded.** The request path and the reconciler can both settle the same order. Without `UPDATE ... WHERE status = 'PENDING'` (and checking the row count), an order could end up `PAID` after its stock was already restored, or have its stock restored twice. Write the rule into the design.
3. **The reconciler will run on both instances.** There are two instances behind the load balancer, so both run the 5-minute job and both pick up the same orders. Specify `SELECT ... FOR UPDATE SKIP LOCKED` or a single-runner lock.

**Medium: decide before building, can be done during**
4. **Concurrent duplicate `POST /orders`.** Two requests with the same key at once: the second hits the unique constraint at insert, after its stock update. The rollback is fine, but the design must say the handler catches the violation and returns the existing order, not a 500. Also decide whether the unique key is global or per customer (I'd use `(customer_id, idempotency_key)`), and what happens when the same key arrives with a different cart.
5. **Possible deadlocks on stock updates.** Two orders containing the same SKUs in different order can deadlock. Sort items by SKU before reserving.
6. **Where prices come from.** The cart arrives from the client, and `order_items.unit_price` and `total` are stored. The design should say the server looks up prices and computes the total, and never trusts client values.
7. **The email can be lost.** If the service crashes between the `PAID` commit and queueing the email, the email is never sent. At 200 orders a day this is rare. Either use an outbox row written in the same transaction, or accept the loss and record it as known debt.
8. **Provider error handling is undefined.** The design covers decline and timeout. It doesn't say what happens on 4xx errors that aren't declines (bad request, auth failure) or on 5xx. State which are retried and which end in `FAILED`.
9. **Test plan has gaps.** Add tests for:
   - the reconciler (settles as `PAID`, settles as `FAILED` with stock restored, "no such charge")
   - stock restored on decline
   - concurrent identical keys
   - concurrent buyers of the last unit (the current item reads as sequential)
   - an email failure not failing the order

**Low: can be done during the build**
10. **Schema constraints are missing.** There are no primary or foreign keys, no check constraint on `status`, and no `available >= 0` check. Add an index on `(status, created_at)` for the reconciler.
11. **Request time.** Four attempts at 5 s each plus backoff means a request can hold for 30 s or more before returning `202`. That's acceptable at this volume, but confirm the load balancer timeout is longer.

Nothing here conflicts with the 2,000-orders-a-day target. One Postgres and two instances is enough.

VERDICT: READY WITH CHANGES
