1. Set up a route
In Node/Express:2. Create a subscription
3. Verify signatures
4. Dedupe with event_id
Deliveries can repeat (at-least-once semantics). Always check:5. Ack fast, process async
Respond in < 1 second:6. Handle specific events
7. Test locally
Two options: Tunnel to localhost with ngrok or Cloudflare Tunnel:8. Monitor delivery health
9. Recovery after downtime
If you had an outage and missed events, replay them:Checklist before production
- Webhook URL is HTTPS, not HTTP
- Route uses a raw-body parser
- Signatures are verified with
timingSafeEqual - Event IDs are deduplicated
- Handler acks in < 1 second, processes async
- Failures are alerted (monitor
webhook.failingevent) - Webhook secret stored in a secrets manager, not source
- Rotation procedure documented
- Replay procedure tested in sandbox
