Use these handlers as your starting point. Each example verifies the X-Webhook-Signature header against the raw request body using your endpoint secret.
Always verify against the raw request body before parsing JSON. Any body transformation can invalidate the signature.

Reusable verify function

Express (Node.js)

Next.js (App Router)

Flask (Python)

Response codes

Current delivery behavior is based only on HTTP success vs failure:
  • 2xx → delivery succeeds and stops retrying.
  • Non-2xx → delivery is marked failed and retried if attempts remain.
  • Timeout after 10 seconds → delivery is marked failed and retried if attempts remain.
Keep your handler small: verify, enqueue, return 200. Do not do slow business logic inline.