Architecture in Motion · Episode 015

One payment. Three emails. Why?

Maya buys $120 headphones. Her bank shows one payment. Follow the notification and its downstream effects.

Lose the ACK. Compare the consequences.

Illustrative model. No live payments, emails or shipments. Counters are teaching state, not production measurements. Previous/Reset rebuild this state; they do not undo real actions.

Select a component to inspect its responsibility.

Animated packet = visual replay only; it never changes counters.

Protected acceptance: one local commit

Raw-body signature + merchant verification

↓

Inbox → guarded payment → outbox

↓ commit, then ACK

Worker → destination idempotency

What this model proves—and what it does not

The state model demonstrates durable-design invariants conceptually. The browser stores no durable inbox, connects to no provider and cannot prove transaction isolation. Separate PostgreSQL integration tests exercise the real constraints. Destination deduplication here assumes support for stable keys; without it, ambiguous external sends require reconciliation.

The unsafe path may repeat work three times, while the actual payment changes from PENDING to SUCCEEDED only once. Processing attempts are not successful state transitions.

Check your understanding

1. The same event returns after a lost ACK. What prevents repeated acceptance?

2. A new event ID reports the same payment. What blocks a second success intent?

3. Does the outbox alone guarantee one physical email?