**Short answer:** the core of this design is solid, and you can start building tomorrow once you settle a few gaps. Most of them are small decisions you can write down in about an hour.

**What's strong**
- The charge happens outside any database transaction. That avoids holding row locks during a slow network call, and it's the mistake designs like this most often make.
- The conditional stock update (`available >= :qty`) prevents overselling without explicit locking.
- Sending the order id as the provider's idempotency key makes retries safe.
- The `PENDING` → reconciliation job → alert path covers the "result unknown" case. The test list also hits the right scenarios.
- Scale is modest, so one Postgres and two instances is the right amount of machinery.

**Decide before you build (these affect the code)**

1. **Settling an order must be a guarded update.** Both the request path (step 5) and the reconciler (step 6) can settle the same order. Example: the reconciler marks order X `FAILED` and restores 2 units, then a slow request thread also gets a decline and restores 2 more, so stock is now 2 too high. Fix: `UPDATE orders SET status=... WHERE id=:id AND status='PENDING'`, and restore stock only if that update changed a row. Add this to the design.

2. **What does the reconciler do when the provider says "no such charge"?** This happens if the service crashes after step 2 commits and before the charge is sent. The design says orders get settled as `PAID` or `FAILED`, but this third case has no answer. Options: re-send the charge (safe, since the order id is the idempotency key), or mark `FAILED` after a grace period. Pick one.

3. **The reconciler runs on both instances.** With two instances, both will pick up the same orders every 5 minutes. Use `SELECT ... FOR UPDATE SKIP LOCKED` or a Postgres advisory lock. It's a few lines, but it should be stated.

4. **Where do prices come from?** The flow starts from "the cart", but `unit_price` and `total` should be computed server-side from a catalog or price source, not trusted from the client. The design doesn't say where that source is. Name it, even if it's just "a `products` table, out of scope for v1".

5. **Lock ordering for stock updates.** If one order reserves A then B and another reserves B then A, Postgres will deadlock them. Sort items by `sku` before updating. It's a one-line fix, but it's easy to miss.

6. **Duplicate-key race in step 1.** Two simultaneous requests with the same key will both pass any "look it up first" check, and one will hit the unique violation and roll back. That's correct. The design should say the loser catches the violation and returns the winner's order. Also decide whether the key is unique per customer or global, and what happens if the same key arrives with a different cart.

**Smaller items (fine to note as debt)**
- The schema table has no constraints or indexes. You'll need a unique index on the idempotency key, a primary key on `stock.sku`, an index on `order_items.order_id`, and an index on `(status, created_at)` for the reconciler.
- Committing `PAID` and then queuing the email can lose the email if the service crashes in between. At 2,000 orders a day that's acceptable. An outbox table is the cleanup path if it ever matters.
- The request can stay open for roughly 20 seconds or more with 5 s timeouts and 3 retries plus backoff. Consider returning `202` sooner.
- The test plan should add: a reconciler test for each outcome, including the "no such charge" case; a double-settle test for item 1; and a concurrent "last unit" test. As written, "buying the last unit" could pass with two sequential requests and prove nothing about the race.

None of these require rethinking the architecture. Items 1 to 3 are the ones I'd write into design.md before the first commit, since they change the shape of the code. The rest can be settled as you build.

VERDICT: READY WITH CHANGES
