Claude Templates / B-tier · Situational
Infrastructure
The Webhook Receiver Playbook
Receiving third-party webhooks — and sending your own — without losing events.
WEBHOOK-RECEIVER-PLAYBOOK.md · 6 sections · 1,658 words · 13 KB · markdown
Signature verification, an idempotency table, fast-ack-then-process, and retry with backoff. Covers both directions: webhooks you receive from providers and webhooks you push to your customers' endpoints.
What's inside
- //Signature verification per provider
- //An event-dedupe table and the fast-ack pattern
- //Retry with exponential backoff and a dead-letter path
- //Outbound webhook delivery with per-customer secrets
- //A replay tool for events that failed processing
When to use it
As needed.
Build these first
Straight from the file
Covers: HMAC signing, SSRF guards, retry with backoff, contract versioning, idempotency, signature verification, dead-letter queues.
Table of contents
- 0. Use this spec
- 1. Two flows, one mental model
- 2. Inbound webhooks
- 3. Outbound webhooks
- 4. Common pitfalls
- 5. Kickoff prompt
How to run it
Drop WEBHOOK-RECEIVER-PLAYBOOK.md into your repo, then tell Claude Code: “Read WEBHOOK-RECEIVER-PLAYBOOK.md and implement it in this codebase.” It's written for an agent to execute end to end. Search the file for angle-bracket placeholders and swap in your own project names, domains, and keys before the first run.
More infrastructure playbooks
Email Infrastructure
Postmark, the SPF/DKIM/DMARC recipe, drip campaigns, and transactional vs marketing routing.
Read + download →A-tierTrigger.dev Workers
The three-file pattern for anything that can't finish inside an HTTP request.
Read + download →B-tierScheduler Engine
One queue for every future-dated action — drips, reminders, scheduled sends.
Read + download →