Code RoomStripe webhook receiver
MediumPrep Room Coding #4261

Stripe webhook receiver

Vibe & agenticAlgorithms & data structuresMid–Senior~22 min

You're using an AI agent to build a Stripe webhook receiver in Python (FastAPI) from scratch: it must verify signatures, be idempotent, and trigger downstream order fulfillment. Lay out the build plan you'd give the agent — the framework/resources choices, the order you build it in, and the acceptance criteria. Call out exactly where a careless prompt ('write me a Stripe webhook endpoint') goes wrong.

Implement
decide_webhook_responses(deliveries: list[str], expected_signature: str, now_epoch: int) → list[str]
Examples
in[["evt_1|1700000000|sig_ok|checkout.session.completed","evt_1|1700000000|sig_ok|checkout.session.completed","evt_2|1699999900|sig_ok|invoice.created"],"sig_ok",1700000000]out["200_fulfill","200_duplicate","200_ignored"]
in[["evt_3|1700000000|sig_bad|payment_intent.succeeded","evt_4|1699999000|sig_ok|payment_intent.succeeded","evt_5|1700000000|sig_ok"],"sig_ok",1700000000]out["400_bad_signature","400_stale","400_malformed"]
What a strong answer looks like

Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it (tests, edge cases, reading critically), and how you’d re-prompt or decompose to get it right.

0:00 of about 22 min

Vibe & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.

Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.