SoloHard35mPro Scenario

The Webhook That Charged Twice

#billing-p1 — Stripe retries double-charged a customer

Finance: user_123 was billed 3× $49.99 for one invoice. Stripe shows a single evt_retry_1 delivered three times after 5xx.

The trap: The copilot will offer a process-local PROCESSED = set(). That dies across workers.

Your task

Triage in the Incident Workspace, use the copilot (verify its advice), then fix `handle_event()` in `webhook_handler.py` so event ids are applied once via event_store.

Book: catch the exception and move on. Prod: Stripe retries the same event_id — idempotency must be durable.

Skills you'll prove

pythonbackendwebhooksidempotencystripeai-fluencybook-vs-prod

Interview Tip

When asked about webhooks, say: "Stripe retries the same event_id after a 5xx. We double-charged because handle_event always called charge(). The copilot suggested a module-level set — that is not durable across workers. I persisted processed ids in EventStore, returned duplicate=True without charging again, and treated the model as a hypothesis until tests proved it."

Unlock this scenario with Pro

Acted scenarios inject real failures and grade your judgment, not just your tests. Upgrade to start.