Verify Webhook Signatures
Signature header
Brale signs webhook deliveries with HMAC-SHA256. Each request includes:- The header value is the lowercase hex-encoded HMAC-SHA256 digest (no prefix like
v1=, no version, no timestamp). - The HMAC is computed over the exact raw request body bytes (no canonicalization).
- The HMAC key is the Base64URL-decoded
sharedSecretvalue returned when creating the subscription.
Shared secret
When you create a webhook subscription, Brale returns asharedSecret.
Node.js / TypeScript example
Express example
Mount the webhook route withexpress.raw() before express.json().