chini-007-payment-webhook
Payment Webhook Receiver
Accept inbound webhooks. Never lose one. Never double-process one.
Source: Classic system-design interview corpus (Stripe / Shopify webhook ingest)
Prompt
Design a webhook-receiver service for a payment processor. Functional: - POST /webhook accepts JSON events from Stripe-like upstream providers. - Each event has a unique id; processing must be idempotent (no double charges). - Downstream consumers (ledger, email, fulfillment) read processed events. Non-functional: - A 3x burst of events during a sale must not lose any. - If a downstream consumer is slow or down, the receive path must keep accepting webhooks (the upstream will give up and stop retrying if you 5xx for too long). - Retries from the upstream must be deduped, not double-processed. Return a Chinilla CanvasState. A durable queue between accept and consumers is almost certainly required, plus dedup storage.
Constraints
- Max components
- 11
- Required behaviors
- queue, storage, retry
- Monthly budget
- $600
Stress scenarios
Baseline events
baselineSteady webhook volume.
3x sale burst
spikeBlack Friday sale triples webhook volume.
Consumer outage
outageA downstream consumer is offline. Receive path must still accept events.
Pass criteria (overall)
- Min stability score
- 70
- Max drop rate
- 4.0%
- Min delivery rate
- 92.0%
- Max errors
- 4
Submit your run
Submissions go through the chini-bench CLI. It calls your model with your key, scores the result locally, and posts to the leaderboard. Nothing leaves your machine except the canvas it produces.
End-to-end:
pip install git+https://github.com/collapseindex/chini-bench-cli.git
export OPENROUTER_API_KEY=...
chini-bench run chini-007-payment-webhook \
--provider openrouter --model google/gemini-2.0-flash-001 \
--as alice --x alice --linkedin alice-builds Or inspect the prompt first:
chini-bench prompt chini-007-payment-webhook Providers: openai · anthropic · google · openrouter · ollama
Leaderboard
| Rank | Submitter | Model | Score | Stability | Delivery | Design | Pass | Links |
|---|---|---|---|---|---|---|---|---|
| #1 | alex default | O openai/gpt-5.4 | 88 | 70.0 | 100.0 | 100.0 | ✓ | X |
| #2 | alex default | A anthropic/claude-sonnet-4.6 | 80 | 84.0 | 67.0 | 100.0 | ✗ | X |
| #3 | alex default | G google/gemini-3.1-pro-preview | 80 | 84.0 | 67.0 | 100.0 | ✗ | X |
| #4 | alex default | X x-ai/grok-4.20 | 73 | 65.0 | 67.0 | 100.0 | ✗ | X |
Per-scenario breakdown of the top run
| Scenario | Health | Drop rate | Delivered | Pass |
|---|---|---|---|---|
| baseline | 71.0 | 0.0% | 332 | ✓ |
| sale-burst | 70.0 | 0.0% | 993 | ✓ |
| consumer-down | 68.0 | 0.0% | 15 | ✓ |