**The design is solid enough to start tomorrow, but settle four gaps first, because they affect the core flow and are cheaper to fix in the doc than in code.** Charging with the order id as the provider's idempotency key, keeping the charge outside the transaction, and having a reconciliation job all work well. The test list also covers the right scenarios.

**Fix before building**

1. **A crash between steps 2 and 3 is not handled.**
   - Example: the order is committed as `PENDING` and stock is reserved, then the instance dies before the charge call.
   - Reconciliation then asks the provider about a charge that was never made. Step 6 only says "settles as `PAID` or `FAILED`", so "charge not found" has no defined outcome.
   - Decide whether "not found" means mark `FAILED` and restore stock, or send the charge now. The first is simpler.
   - Also confirm the provider can look up a charge by your idempotency key, and how long it keeps those keys. The whole reconciliation design depends on that.

2. **Status changes need to be guarded.**
   - Steps 4, 5 and 6 can all touch the same order. A slow request and the reconciliation job can both try to settle it. Both instances also run the reconciliation job every 5 minutes.
   - Example: the job marks an order `FAILED` and restores stock, then the late request marks it `PAID`. Or two jobs restore the same stock twice.
   - Require every transition to be `UPDATE ... WHERE status = 'PENDING'`, and restore stock only if that update changed a row. The job should also claim orders safely, for example with `FOR UPDATE SKIP LOCKED`.
   - Add a test for the race.

3. **The concurrent duplicate request is under-specified.**
   - Two identical `POST`s arriving together means one hits the unique-constraint error inside the transaction. The doc should say that error is caught and the existing order is returned.
   - The doc also doesn't say what happens when the same key arrives with a different cart. Returning `422` is the usual answer.
   - It should state whether the key is unique globally or per customer. The data model table doesn't show the constraint at all.
   - Add a test for the concurrent case. The current "duplicate `POST /orders`" test probably runs sequentially.

4. **Provider errors aren't classified.** Step 3 only covers timeout and decline. It doesn't say what a 5xx, a 4xx for a bad request, or a network error does. Say which are retried, which are final failures, and which leave the order `PENDING`.

**Smaller items, fine to handle during the build**

- **Lost confirmation email:** the crash window between committing `PAID` and queuing the email loses the email. At 2,000 orders a day, an outbox row written in the same transaction as `PAID` is cheap, and that's the cleaner fix. The doc also never names the queue technology.
- **Stock deadlocks:** two carts with the same SKUs in different order can deadlock on the `UPDATE`s. Sort items by SKU before reserving.
- **Missing details:** the doc doesn't say where prices come from (the client's cart or a server-side lookup), how the payment method is passed, or what the `409` and `202` response bodies look like. It doesn't mention authentication either. `stock` also has no primary key on `sku`, and `order_items` has no foreign key or index on `order_id`.
- **Request time:** with 4 attempts at 5 s plus backoff, a request can stay open for roughly 20–30 s before returning `202`. Confirm that's acceptable to clients.

**Tests to add:** the crash-before-charge case, the status-guard race, concurrent duplicate keys, and a reconciliation run where the provider says the charge doesn't exist.

VERDICT: READY WITH CHANGES
