**Mostly ready, but fix the reconciliation gaps below before you build.** The core flow is sound. Stock is reserved and the order inserted in one transaction, the charge happens outside any transaction, and the provider gets an idempotency key. At 2,000 orders a day, scale isn't a concern. The problems are in the failure paths, which is where this kind of service usually breaks.

**Fix in the design before building**

1. **The reconciler can restore stock twice.** Step 5 restores stock when a charge is declined. Step 6 says the reconciler settles orders as `FAILED`, but it never says it restores stock. Suppose the request thread and the reconciler both settle the same order as `FAILED`. Stock is then restored twice, or never.
   - Expected result: stock is restored exactly once per failed order.
   - Fix: make every status change a guarded update, `UPDATE orders SET status='FAILED' WHERE id=:id AND status='PENDING'`. Restore stock only if that update changed a row. Both paths should call one shared "fail order" function.

2. **The design doesn't say what happens if the service crashes after step 2 and before the charge.** The order is `PENDING` and no charge exists at the provider. The reconciler asks the provider about it and gets "not found". The design must say what that means. Treating it as `FAILED` and restoring stock is the likely answer, but a slow request still in flight could then charge a "failed" order. Decide this explicitly, and specify what the reconciler does when the provider says the charge is still pending.

3. **The reconciler runs on both instances.** With two instances, both run the job every 5 minutes and both settle the same orders. Use `SELECT … FOR UPDATE SKIP LOCKED` or a Postgres advisory lock. The guarded update from point 1 makes a double run safe, but locking avoids wasted provider calls.

4. **Stock updates can deadlock.** Two orders containing skus A and B in opposite order will lock rows in opposite order. Reserve skus in sorted order and add a test for it.

5. **The module rule contradicts step 2.** "No module reads another module's tables" conflicts with one transaction that updates `stock` (inventory) and inserts into `orders` (orders). Pick one:
   - `OrderCheckout` owns the transaction and passes it to both modules. This is my recommendation.
   - Or inventory exposes a reserve call that takes a transaction.

6. **The email can be lost.** In step 4, the order is committed and then the email is queued. A crash between those two steps loses the email. Write the email request to an outbox table in the same transaction as `PAID`, or accept the loss and say so. The design also never says which queue is used.

**Smaller gaps**
- **Schema:**
  - Add the `UNIQUE` constraint on `idempotency_key`, which the flow assumes.
  - Add a primary key on `stock.sku` and a foreign key from `order_items` to `orders`.
  - Add an index on `(status, created_at)` for the reconciler.
  - Decide whether the key is unique per customer or globally.
- **Pricing:** it doesn't say whether the server or the client supplies `unit_price` and `total`. It must be the server.
- **Concurrent duplicates:** two simultaneous requests with the same key will hit a unique-violation error on the second insert. Catch it and return the existing order rather than a `500`.

**Test plan gaps**
The list covers the happy path and the provider failures. It has nothing for the riskiest part, which is reconciliation. Add these:
- The reconciler settles an order as `PAID`.
- The reconciler settles an order as `FAILED` and restores stock once.
- The reconciler runs twice concurrently.
- A decline restores stock.
- Two concurrent requests with the same key.
- An email failure leaves the order `PAID`.
- The deadlock case from point 4.

Under your engineering standards, write the reconciler and fail-order tests first.

VERDICT: READY WITH CHANGES
