Resources / Guides
Webhook receivers done right: Stripe, GitHub and Shopify
How to receive webhooks reliably: signature verification, idempotency, fast acknowledgements and logs you can replay.
A webhook is an HTTP request another service sends you when something happens: a payment succeeded, a pull request merged, an order shipped. Receiving them looks trivial — until you get a forged request, a duplicate, or a timeout.
The four rules
- Verify the signature. Stripe, GitHub and Shopify sign every webhook with a shared secret. Check it with the raw request body before doing anything else.
- Be idempotent. Providers retry. Store the event id and ignore ones you've already processed.
- Answer fast. Return 2xx within a few seconds; do slow work afterwards or in a job.
- Log everything. When something goes wrong you need the exact payload — and ideally a way to replay it.
A minimal Stripe handler
verify signature with the raw body and STRIPE_WEBHOOK_SECRET
if event.id already processed → return 200
switch on event.type → update your records
store event.id → return 200
Serverless is a natural fit
Webhooks are bursty and idle most of the time — exactly what serverless functions are built for.
In Wisp
"A webhook for Stripe that verifies the signature and marks the user as paid in kv" is a one-sentence endpoint. Every delivery appears in the invocation log, and Replay re-sends a logged request to the draft or live version and shows a diff of the response.
Try it: Template: Stripe webhook to Slack · Template: GitHub webhook to Discord · Template: Slack slash command
Build it with Wisp — describe an API, get it live.