The on-call page
Hearth is a marketplace with a wallet endpoint, POST /buy. Customers use wallet credit at checkout, so a balance below zero is both a ledger problem and a promise the company cannot keep.
At 10:17 on Tuesday, the wallet alert reported one negative balance. Cora-17 then told support that one 75.00 credit purchase appeared twice, even though the account had only 100.00. The API returned two successful responses. The PSP team also reported a slow period: charge latency was 150ms locally and 500ms during the busiest minute. Wallet API errors stayed at 0.2%, and Postgres was accepting connections.
A deploy to the wallet service happened 18 minutes before the alert. The PSP was slow, but its team found no duplicate charge ids. You have 30 minutes to reproduce and contain the issue. You may not drop the wallet or purchase tables, reset the whole database, or restart the service as a substitute for a fix.
Lab boundary
Implemented: a wallet API, Postgres tables, a fake PSP with controllable latency, request evidence, lock-wait metrics, and a deterministic two-buyer load command. Simulated: the customer load and payment gateway are local, and the two requests stand in for concurrent traffic. Design doc: PSP settlement reconciliation, idempotency across regions, and the production ledger migration plan.
Starter
Use the template at https://github.com/Tserewara/starter-money-from-nowhere.