**Not quite ready to start as written, but close: it needs about six small decisions written into the doc first.** The core flow is sound and right-sized for 2,000 orders a day and a team of four. Reserving stock in a short transaction, charging outside any transaction, using the order id as the provider's idempotency key, and reconciling `PENDING` orders is the right shape. The gaps are all in step 6 (reconciliation), where the doc is vague about what happens after something fails.

## Fix before building

1. **Reconciliation settling `FAILED` doesn't say it restores stock.** Step 5 restores stock on a decline, but step 6 only says "settles them". Concrete case: the service crashes after step 2 and before the charge, so the order sits `PENDING` with stock reserved and no charge. Reconciliation finds nothing at the provider and marks it `FAILED`. If it doesn't also restore stock, that stock is gone for good. Make "mark `FAILED` + restore stock" one shared operation used by both paths.

2. **Status changes need a guard against double-applying.** Make every transition conditional, for example `UPDATE ... SET status='FAILED' WHERE id=:id AND status='PENDING'`, and restore stock only if that update changed a row. Without it, the request path and the reconciliation job can both fail the same order and restore its stock twice.

3. **The reconciliation job runs on both instances.** The doc has two instances and a job every 5 minutes, so both will run it. Specify how they avoid working on the same order, for example `SELECT ... FOR UPDATE SKIP LOCKED` or a Postgres advisory lock.

4. **What does reconciliation do when the provider answers "not found" or "still processing"?** Marking `FAILED` on "not found" risks a late charge succeeding afterward, which leaves a customer charged for a `FAILED` order. Decide the rule, for example: leave it `PENDING` until it is older than some cutoff, then fail it and cancel or refund any late charge.

5. **Confirm the provider can look up a charge by your idempotency key.** The whole reconciliation design depends on this. Check the provider's API docs now. If it can't, you need to store the provider's charge id, which means a `payment_ref` column that isn't in the schema yet.

6. **Reconciliation tests are missing.** The test list has no case for step 6 at all. Add: a stuck `PENDING` order settled as `PAID`, one settled as `FAILED` with stock restored, "crash before charge", two reconciler runs at once, and the provider answering "unknown". Also add a decline test that asserts stock is restored, and a concurrency test for two simultaneous requests with the same `Idempotency-Key`.

## Smaller items, can be decided during the build

- **Schema constraints are not stated.** Add primary keys (`orders.id`, `stock.sku`, `order_items (order_id, sku)`), foreign keys, a check constraint `available >= 0`, and a check on `status`. Decide whether the idempotency key is unique globally or per customer (I'd suggest `(customer_id, idempotency_key)`).
- **Duplicate-key handling.** A concurrent duplicate hits the unique violation in step 2 and rolls back, which is correct. The code must catch that and return the existing order instead of a `500`. Also decide what happens if the same key arrives with a different cart.
- **Request length.** Four attempts at 5 s each plus backoff can hold the HTTP request open for 20 s or more. Check that the load balancer timeout is longer, or shorten the retry budget.
- **Lost confirmation email.** A crash between the `PAID` commit and queuing the email loses the email. Writing the email job in the same transaction as the `PAID` update (an outbox table) fixes this, and reconciliation-settled `PAID` orders need to queue the email too.
- **Prices.** The doc doesn't say whether `unit_price` and `total` come from the client's cart or from a server-side catalog. They should come from the server.

VERDICT: READY WITH CHANGES
