The design is sound and you can start building tomorrow. Nothing here needs a restructure, but the first three items should be written into the doc before you code the paths they touch. The core sequence (reserve stock, charge outside the transaction with the order id as the provider key, reconcile unknowns) holds up, and the 2-minute reconciliation cutoff safely clears the roughly 30-second worst-case retry window.

## Fix before coding the affected path

1. **An order can be settled twice, restoring stock twice.** Nothing says the status change only applies when the order is still `PENDING`, or that the reconciliation job runs on only one of the two instances.
   - Case: both instances run the job in the same minute and each sees order A as `PENDING` and declined. Each marks it `FAILED` and adds its quantity back, so `stock.available` ends up one order's worth too high and you oversell later.
   - Fix: make every settle `UPDATE orders SET status = ... WHERE id = :id AND status = 'PENDING'`, and only restore stock or queue the email if a row changed.

2. **Reconciliation has no rule for "the provider has no record of this charge".** Step 6 only covers `PAID` or `FAILED`.
   - Case: the instance crashes after step 2 commits and before the charge call. The provider returns "not found", so the order stays `PENDING` with its stock held until the 30-minute alert.
   - Fix: treat "not found" past the cutoff as `FAILED`, and decide what "still processing" does (leave it and let the alert catch it).

3. **Step 6 does not say that a reconciled order gets the same side effects as steps 4 and 5.** As written, a reconciled `FAILED` order might not restore stock and a reconciled `PAID` order might not get its confirmation email. Route both paths through one shared settle function.

## Should fix, not urgent

4. **The source of `unit_price` and `total` is unspecified.** If they come from the client's cart, a customer can set their own price. State that the server looks prices up.

5. **Multi-item carts can deadlock.** Cart 1 updates sku X then Y while cart 2 updates Y then X; Postgres aborts one and that customer gets a 500. Update stock in sorted sku order.

6. **The idempotency key is unique globally, not per customer.** Two customers sending the same key means the second gets the first one's order back. Make the constraint `(customer_id, idempotency_key)`, and return `422` if the same key arrives with a different cart.

7. **The confirmation email can be lost.** If the instance crashes after the `PAID` commit and before the email is queued, the customer pays and hears nothing. Write an email-pending row in the same transaction as `PAID`, or have reconciliation sweep for `PAID` orders with no email sent.

8. **The test plan misses the riskiest paths.** Add tests for:
   - the reconciliation job (paid, declined, not found, run twice on the same order);
   - two concurrent buyers for the last unit;
   - concurrent duplicate `POST /orders` with the same key;
   - a crash between the reserve and the charge.

## Minor

9. **No way for the client to learn the outcome after a `202`.** Add `GET /orders/{id}` or say what the client polls.
10. **Data model omits constraints.** It needs primary keys, `CHECK (available >= 0)`, a check on `status`, and a foreign key on `order_items.order_id`.
11. **No provider charge id or failure reason is stored on the order.** You will want both for support and refunds.
12. **The worst-case request holds the connection about 30 seconds.** Check that the load balancer's idle timeout is longer, or cut the retries.
13. **Retry conditions are unstated.** Say that only timeouts and 5xx responses are retried, never declines.
14. **Steps 2 and 5 span the orders and inventory modules in one transaction.** State that `OrderCheckout` owns the transaction and passes it in, so the "no module reads another's tables" rule stays intact.
15. **The alert covers stuck orders only.** Add one for the reconciliation job itself failing or not running.

VERDICT: READY WITH CHANGES
