**The design is close, but it has three gaps you should close before you start building.** The overall shape is sound: the stock reservation is atomic, the charge happens outside the transaction, there's a provider-side idempotency key, and the reconciliation job and alert are in place. The scale numbers are small enough that the architecture is fine.

## Fix before building

1. **A crash between step 2 and step 3 leaves the order unresolved.**
   - Example: the service commits a `PENDING` order and reserves stock, then the instance dies before it calls the provider.
   - The reconciliation job (step 6) asks the provider about that order and finds no charge.
   - The doc doesn't say what happens next. It could charge the order, mark it `FAILED` and restore the stock, or wait.
   - Add a rule for "provider has no record of this order id". Marking it `FAILED` after a grace period is the simplest.
   - Also say what happens when the client retries with the same `Idempotency-Key` and finds a `PENDING` order. Does it resume the charge, or only return the order?

2. **Steps 5 and 6 can both settle the same order, and the doc doesn't prevent a double stock restore.**
   - Example: a request is in its retry loop when the reconciler picks up the same order. Both mark it `FAILED` and both add the stock back, so stock is inflated.
   - Require every status change to be conditional, for example `UPDATE orders SET status=... WHERE id=:id AND status='PENDING'`. Restore stock only if that update changed a row.

3. **The reconciliation job isn't safe with two instances.**
   - Both instances run it every 5 minutes, so they will process the same orders.
   - Pick a mechanism: `SELECT ... FOR UPDATE SKIP LOCKED`, an advisory lock, or running the job on one instance only.
   - Also say what the job does when the provider reports the charge as still processing. It should leave the order `PENDING` and not settle it.

## Fill in during the build (not blockers)

- **Schema constraints:** the doc has no primary keys, foreign keys or indexes.
  - Add the unique constraint on `idempotency_key`; scope it to `customer_id` if keys are client-generated.
  - Add `CHECK (available >= 0)` on stock.
  - Add an index on `(status, created_at)` for the reconciler.
- **Same key, different cart:** a repeated key with a different cart should return an error, not the old order.
- **Pricing and identity:** the doc doesn't say where `unit_price` and `total` come from. They must be computed server-side, not taken from the client cart. It also doesn't say how `customer_id` is authenticated.
- **Email loss:** step 4 queues the email after the commit, so a crash in between loses it. At 2,000 orders a day you can accept that if you write it down, or write the email to an outbox table inside the same transaction.
- **Decline vs. error:** say how provider responses map to outcomes (decline, 5xx, timeout). Only a real decline should go to `FAILED`.
- **Tests:** add cases for the crash-before-charge path, a reconciler/request race, concurrent duplicate `POST`s with the same key, and the reconciler running on two instances.

VERDICT: READY WITH CHANGES
