Webhook Delivery Handling
This page focuses on receiver behavior after you register webhook endpoints.
Delivery Model
- Each delivery includes Standard Webhooks headers:
webhook-id,webhook-timestamp, andwebhook-signature. webhook-idis unique per event and stable across retries.- Use
webhook-idas your idempotency key.
Receiver Processing Checklist
- Read the raw request body bytes.
- Verify signature and timestamp before processing.
- Deduplicate by
webhook-id. - Process business logic only once per idempotency key.
- Return a success response after processing.
Idempotency and Retry Guidance
Because webhook-id is stable across retries, retries should not produce duplicate side effects if your receiver is
idempotent.
Recommended pattern:
- Persist
webhook-idin durable storage before applying side effects. - If the same
webhook-idis seen again, treat it as a duplicate delivery. - Keep handlers deterministic and safe to re-run.
Failure Handling
If signature verification fails:
- Return a
4xxresponse (typically401or400). - Do not process the payload.
- Do not retry internally.
Common Pitfalls
- Verifying parsed JSON instead of the raw body bytes.
- Performing non-idempotent writes without checking
webhook-id. - Dropping duplicate deliveries without recording prior processing state.