Verify the X-Hadawi-Signature header against the raw request body.
Returns true if the signature is valid.
Prefer constructEvent() which combines verification + parsing.
Verify the signature and parse the raw body into a typed HadawiWebhookEvent.
Throws HadawiWebhookError if the signature is invalid.
Important: use express.raw() (or equivalent) to get the raw body —
do NOT parse the body as JSON before passing it to this method.
Utilities for verifying and parsing incoming Hadawi webhook events.
Hadawi signs every outgoing webhook POST with HMAC-SHA256 over the raw JSON body using your
webhookSecret. The hex digest is sent in theX-Hadawi-Signaturerequest header.Example