The design is sound and you can start tomorrow, but fix five gaps first. Most are a sentence or two in the doc, and none forces a redesign. The core choices hold up at 2,000 orders a day: the stock check is atomic, the payment call happens outside any transaction, the provider gets an idempotency key on every retry, and a reconciliation job settles unknown outcomes.

## Fix before building

**1. Two paths can leave stock reserved forever.** Step 5 gives stock back on a decline. The reconciliation job in step 6 doesn't say it does, and it doesn't say what happens when the provider has no record of the charge.
- **Case:** an instance crashes right after step 2 commits and before step 3 calls the provider. The order stays `PENDING`, stock is reduced, and no charge exists. Ten minutes later the job asks the provider, which says "charge not found."
- **What the doc leaves open:** whether that order becomes `PAID` or `FAILED`, and whether the stock comes back.
- **What it should say:** "not found" after 2 minutes means `FAILED`. Every move to `FAILED`, from step 5 or from the job, restores stock in the same transaction.

**2. Status changes need to be conditional, or stock can be restored twice.** Make every status change `UPDATE orders SET status = :new WHERE id = :id AND status = 'PENDING'`, and restore stock only if that update changed a row.
- **Case:** the request handler marks a declined order `FAILED` and restores stock. At the same moment the job settles that order too and restores the stock again. You now have one more unit than you own.
- With the conditional update, only one of them wins. This also makes it safe that both instances will run the 5-minute job unless you add a lock. Postgres `pg_try_advisory_lock` is enough here.

**3. Reserving several items at once can deadlock.**
- **Case:** order A reserves SKU `x`, then `y`. At the same moment order B reserves `y`, then `x`. Postgres kills one transaction with a deadlock error. Nothing in the flow handles that error, so the customer gets a `500`.
- **Fix:** sort the SKUs before running the updates in step 2, and merge duplicate SKUs in the cart into one line.

**4. The doc never says where `unit_price` comes from.** Step 1 says the client sends "the cart," and the data model has no product or price table.
- **Case:** if the server stores whatever price the client sends, a request with `unit_price: 0.01` gets charged one cent.
- **What it should say:** which module owns prices and that the server looks the price up. If the catalog is another service, say so.

**5. A client that gets `202` has no way to find the result.** Add `GET /orders/{id}` or a webhook, so the client can see the order settle to `PAID` or `FAILED`.

## Worth deciding, not blocking

- **Module boundaries conflict with step 2.** One transaction both writes `stock` (inventory's table) and inserts into `orders`, but the doc also says no module touches another module's tables. Write down the intended pattern: inventory exposes `reserve(tx, items)` and `release(tx, items)`, and `OrderCheckout` owns the transaction. Otherwise the first person to implement it will either break the rule or split the transaction.
- **A confirmation email can be lost.** In step 4, if the instance dies between committing `PAID` and queueing the email, that email never goes out. Writing an outbox row in the same transaction as the `PAID` update closes this. If you skip it at this volume, call it out as known debt.
- **The idempotency-key rules are loose.** The doc doesn't say whether the unique constraint is global or per customer. Per customer, `(customer_id, idempotency_key)`, is safer. It also doesn't say what happens when the same key arrives with a different cart; returning `422` is the usual answer. And two simultaneous duplicate requests will hit a unique-constraint error, which the code has to catch and turn into "return the existing order."
- **The schema lists no indexes or keys.** You need primary keys on `stock.sku` and on `order_items (order_id, sku)`, and an index on `orders (status, created_at)` for the reconciliation query.

## Tests to add

The current list covers the request path. It's missing:
- the reconciliation job settling an order as `PAID`, as `FAILED`, and as "not found" (that last one with stock restored)
- a crash between committing the order and calling the provider
- decline and reconciliation racing on the same order, with stock restored exactly once
- two buyers competing for the last unit at the same time (the current test is one buyer)
- two simultaneous `POST /orders` with the same key
- the same key reused with a different cart
- two carts with overlapping SKUs in opposite order (the deadlock case)
- a client-supplied price being ignored

Here is the order lifecycle once fixes 1 and 2 are in:

```mermaid
stateDiagram-v2
    [*] --> PENDING: POST /orders reserves stock
    PENDING --> PAID: charge succeeds (request or reconciliation job)
    PENDING --> FAILED: declined, or provider has no charge after 2 min
    FAILED --> [*]: stock restored in the same transaction
    PAID --> [*]: email queued
```

Each arrow is the conditional update from fix 2: only one path can move an order out of `PENDING`.

VERDICT: READY WITH CHANGES
