Skip to main content
Every webhook is signed with HMAC-SHA256 using your project’s signing secret. Verify the signature before processing any event.

Signature format

The X-Reap-Webhook-Signature header looks like this:
t is a Unix timestamp (seconds). v1 is the hex-encoded HMAC-SHA256 signature.

How to verify

1

Parse the header

Split X-Reap-Webhook-Signature on ,. Extract the t= timestamp and v1= signature.
2

Build the signed payload

Concatenate timestamp and raw request body with a . separator: {timestamp}.{raw_body}
Use the raw request body, not a re-serialized version. Re-stringifying JSON changes whitespace and key order, which breaks verification.
3

Compare signatures

Compute HMAC-SHA256 of the signed payload using your secret. Compare the hex digest to v1 using constant-time comparison.
4

Check timestamp freshness

Reject requests where the timestamp is more than 5 minutes old to prevent replay attacks.

JavaScript example

Express.js example

Capture the raw body before JSON parsing:

Security notes

  • Always use constant-time comparison (timingSafeEqual). String equality leaks timing information.
  • 5 minutes is the recommended timestamp tolerance.
  • Keep your signing secret safe. If it leaks, rotate it via Rotate the signing secret. The previous value is invalidated immediately.