**You can start building tomorrow, but settle the four items below first.** The core flow is sound. Stock is reserved atomically, the charge happens outside any transaction, and the provider gets the order id as its idempotency key. The gaps are in the failure paths, which are the hardest part to retrofit.

## Fix before you start (design decisions)

1. **The reconciler doesn't say what to do when the provider has no charge.**
   - Step 6 only covers "settle as `PAID` or `FAILED`".
   - Suppose the service crashes after the step 2 commit and before the charge call. The order is `PENDING` and stock is reserved, but the provider has never heard of the order.
   - Decide the outcome: mark it `FAILED` and restore stock, or re-attempt the charge.
   - Also confirm the provider can look up a charge by your idempotency key. If it can't, the reconciler can't work as written.

2. **Restoring stock is only specified for declines (step 5), not for reconciliation.**
   - If the reconciler settles an order as `FAILED`, step 6 doesn't say stock goes back. Stock then leaks.
   - The request path and the reconciler can also settle the same order at once, for example a slow request finishing while the 5-minute job runs. Without a guard, stock could be restored twice.
   - Add a rule that every status change is conditional (`UPDATE … WHERE status = 'PENDING'`). Restore stock only if that update changed a row. Put the restore in one shared function used by both paths.

3. **Order totals have no price source.**
   - The client sends a cart, and the data model has no product or price table.
   - Say where `unit_price` comes from. It must come from the server, not from the client's request.

4. **The reconciler runs on both instances.**
   - Two instances means two copies of the job. State how they avoid settling the same order twice, for example `FOR UPDATE SKIP LOCKED` or a Postgres advisory lock.

## Smaller changes (can be done while building)

- **Concurrent duplicate `POST /orders`.**
  - Two requests with the same key can both pass the "does it exist?" check. The second then hits the unique constraint and rolls back, which is correct.
  - Spell out that it catches that violation and returns the existing order, not a 500.
  - Also decide the scope of the key (global or per customer) and what happens if the same key arrives with a different cart.
- **Deadlocks in step 2.** Reserving several SKUs in cart order lets two carts lock the same SKUs in opposite order. Sort the items by `sku` before updating.
- **The email queue is undefined.**
  - Context lists only Postgres, yet step 4 says "queues the email".
  - Name the mechanism. A simple option is an outbox table in Postgres, which also fixes the case where the service crashes between the `PAID` commit and the enqueue, so the email is lost.
- **Schema.** Add primary keys, the unique index on `idempotency_key`, an index on `(status, created_at)` for the reconciler, and a `CHECK (available >= 0)` on `stock`.
- **Test plan.** The list has nothing for the reconciler, which is the most complex part. Add these cases:
  - Reconciler settles a charge as paid.
  - Reconciler settles a charge as declined and restores stock once.
  - Reconciler finds no charge at the provider.
  - Request path and reconciler race on the same order.
  - Concurrent identical `POST /orders`.
  - Email failure leaves the order `PAID`.
  - Multi-SKU carts reserve in a consistent order.

## What I checked and found fine

- The scale (2,000 orders a day) fits one Postgres and two instances.
- The retry policy is safe because of the provider idempotency key.
- The 30-minute `PENDING` alert backs up the reconciler.
- The module boundaries and the thin routes with an `OrderCheckout` service match your standards.

VERDICT: READY WITH CHANGES
