Skip to main content
Anyone who knows your webhook URL can send it a request. Before acting on a webhook, check that BundleUp sent it and that it isn’t an old message being replayed.

How the signature works

Each webhook has its own signing secret, shown when you create it in Settings → Webhooks. BundleUp computes an HMAC-SHA256 of the raw request body using that secret, and sends it hex-encoded in the BundleUp-Signature header.
  1. Take the raw request body, exactly as received.
  2. Compute HMAC-SHA256 over it with your signing secret, hex-encoded.
  3. Compare it with BundleUp-Signature using a constant-time comparison.
  4. Parse the JSON and check that webhookTimestamp (milliseconds) is within 60 seconds of your server’s clock.
Use the raw body. If you parse the JSON and serialize it again, whitespace or key order can change and the signature won’t match.

Examples

Troubleshooting

Keeping the secret safe

Store the signing secret with your other server secrets, never in client code. If it leaks, create a new webhook with a new secret, switch your endpoint to it, and delete the old one.