**You can start building tomorrow once you settle the four gaps below (the first is the one that matters).** The overall shape is sound and fits your scale of 200 to 2,000 orders a day, one Postgres database and four people. The gaps are all in what happens when something fails partway through, and they would be cheaper to fix in the doc than in code.

## Fix before you start

1. **Failed orders settled by the reconciler never get their stock back.** Step 5 restores stock when a charge is declined, but step 6 only says "settles them as `PAID` or `FAILED`".
   - Example: a customer buys the last unit and every charge attempt times out. The order goes to `PENDING`, and the reconciler later learns the provider declined it. The order becomes `FAILED`, but `stock.available` stays at 0 and the item can't be sold again.
   - Fix: write one shared "mark failed and restore stock" function that both step 5 and the reconciler call. It should only act if the order is still `PENDING` (`UPDATE ... WHERE status = 'PENDING'`), so stock is restored exactly once.

2. **Two writers can settle the same order, and the doc doesn't say how that's prevented.**
   - Example: a request is on its last retry at 1:55. The reconciler picks the same order up at 2:00. One marks it `PAID`, the other marks it `FAILED` and restores stock.
   - Fix: make every status change conditional on the current status. The reconciler runs on both instances, so it also needs a lock or `FOR UPDATE SKIP LOCKED` to avoid double work.

3. **The case where the charge was never sent isn't defined.** If the instance crashes after the step 2 commit and before the charge in step 3, the reconciler asks the provider about an order id it has never seen. The doc must say that "charge not found" means `FAILED` plus restoring stock. Check the provider's API for how it reports an unknown id.

4. **The confirmation email can be lost.** Step 4 commits `PAID` and then queues the email. A crash between the two means no email is ever sent. The doc also doesn't say what the queue is. Simplest option for your setup: an `email_outbox` table written in the same transaction as `PAID`, with a worker that polls it.

## Smaller items to add to the doc

- **Idempotency key:**
  - Make it unique per customer (`customer_id, idempotency_key`), not globally.
  - Handle two concurrent requests with the same key: the loser hits the unique-constraint violation and should return the winner's order, not a 500.
  - Decide what happens when the same key arrives with a different cart.
- **Pricing:** say where `unit_price` and `total` come from. They must be computed server-side, not trusted from the client's cart.
- **Deadlocks:** reserve stock in sorted `sku` order. Two carts holding the same items in different orders can otherwise deadlock.
- **Schema:**
  - Primary keys on `orders.id` and `stock.sku`.
  - A foreign key from `order_items.order_id` to `orders`.
  - An index on `(status, created_at)` for the reconciler.
  - A check constraint `available >= 0`.
- **Tests to add:**
  - The reconciler, which is the most complex part and currently has no tests of its own. Cover `PENDING` settling to `PAID`, `FAILED` with stock restored, and "charge not found".
  - Concurrent duplicate keys.
  - A multi-item cart where one item is out of stock, checking the earlier reservations roll back.
  - Reconciler and request racing on the same order.
  - Crash between the step 2 commit and the charge.

Since you work test-first, items 1 to 3 give you the failing tests to write first.

VERDICT: READY WITH CHANGES
