**The structure is solid, and the payment step needs one small redesign before you build. The fix is cheap to make now and painful to retrofit.**

## What's working
- The module boundaries are good: no cross-module table reads, thin routes, and the flow in `OrderCheckout`.
- The scale fits the architecture. A single Postgres instance and a synchronous flow are fine at 200 to 2,000 orders a day, and you haven't over-engineered it.
- You wrote down the reason for accepting the stale inventory cache, which is the right habit.

## Must fix before building: payment can double-charge or lose orders (steps 3 to 6)
Take one case: the charge API times out at 5 s, but the provider did process it.
- **Step 4 retries the charge, so the customer is charged twice.** Nothing in the design makes the retry safe. Send an idempotency key (the order id works) with every charge call. Most providers support this.
- **If all 3 attempts time out, step 6 rolls back and returns an error.** The customer may still have been charged, and you now have no order record. Support will have nothing to look up.
- **The same loss happens if the process crashes between a successful charge and the commit.** The money has moved, but the `PENDING` row never existed.
- **The charge runs inside an open DB transaction.** That holds a connection for up to about 15 s. It's harmless at today's volume, but it's an easy habit to avoid.

**Suggested flow:**
1. Insert the order as `PENDING` and commit it.
2. Charge with the order id as the idempotency key. Keep the retries.
3. In a second transaction, mark the order `PAID` or `PAYMENT_FAILED`.
4. Run a small reconciliation job that finds orders stuck in `PENDING` and asks the provider for their real status.

This also makes the `PENDING` state mean something. In the current flow it's rolled back on failure, so nobody can ever observe it.

## Should decide (a sentence each is enough)
- **Overselling:** the cache is up to 5 minutes stale and the design never reserves stock. That's probably an acceptable risk at your volume. Write it down as accepted, along with what happens when it occurs (cancel and refund, or backorder).
- **Confirmation email:** say what happens if it fails after the commit. Retrying it from the order's status is enough. The order must not fail because of it.
- **Nightly backups:** a failure could lose up to 24 hours of orders. Payments are already captured at the provider, so the reconciliation job above helps. Consider point-in-time recovery (WAL archiving), which is cheap on managed Postgres.

## Tests
One happy-path integration test won't cover the risky part of this design. Add these before or alongside the code:
- Charge times out, then succeeds on retry: exactly one charge, same idempotency key.
- All retries fail: the order ends in `PAYMENT_FAILED`, not deleted.
- Crash after charge, before the `PAID` update: reconciliation fixes the order.
- Stock check fails: no order is created.

You're close. The module layout and test approach need no changes. Only steps 3 to 6 of the flow need reworking, which is roughly an hour of design, so starting tomorrow is realistic.

VERDICT: READY WITH CHANGES
