The design is sound and you can start building tomorrow, but three gaps should be closed in the doc first. Two affect stock correctness and one is test coverage.

The core of the checkout flow is right: stock is reserved atomically, the payment call sits outside any transaction, the order id is the provider's idempotency key, and a reconciliation job handles unknown outcomes.

## Changes to make before building

1. **Guard the status changes so stock can't be restored twice.** The design doesn't say that marking an order `PAID` or `FAILED` only happens if it is still `PENDING`.
   - **Failing case:** both instances run the reconciliation job at the same time on a declined order for the last unit of a SKU. Both see `PENDING`, both mark it `FAILED`, and both restore stock.
   - **Wrong result:** `available` goes from 0 to 2 when it should be 1, and you sell a unit that doesn't exist.
   - **Fix:** use `UPDATE orders SET status = ... WHERE id = :id AND status = 'PENDING'`, and restore stock only if that update changed a row. Apply it in steps 4, 5 and 6.

2. **Say what reconciliation does when the provider's answer isn't "paid" or "declined".** Step 6 only covers those two outcomes.
   - **Failing case:** an instance crashes after step 2 commits and before the charge call. The provider has no record of the charge, so the order stays `PENDING` and holds its stock until the 30-minute alert.
   - **Fix:** treat "no record" as `FAILED` and restore stock. That is safe because the retries finish well inside the 2-minute cutoff. Treat "still processing" as leave it and check again on the next run.

3. **Add reconciliation and concurrency to the test list.** The current list only covers single-request paths, so the riskiest code is untested.
   - Reconciliation settling an order as paid, as declined, and with no provider record.
   - The reconciliation job running twice on the same order.
   - Two simultaneous buyers for the last unit.
   - Two simultaneous `POST /orders` with the same key.

## Smaller points to fix as you build

- **Deadlocks:** two orders for the same SKUs in opposite order can deadlock in step 2. Reserve items in sorted SKU order.
- **Prices:** the doc doesn't say where `unit_price` and `total` come from. Compute them on the server, not from the cart payload.

VERDICT: READY WITH CHANGES
