The new signature (recommended)
Verifyx-wiaxy-signature-256. It is computed over the exact body of each request, so it proves both authenticity (only someone with your secret key could produce it) and integrity (any change to the body invalidates it).
To verify:
- Read
x-wiaxy-timestampand the raw, unparsed request body. - Build the string
"{timestamp}.{rawBody}". - Compute
HMAC-SHA256of that string with your secret key, as hex. - Compare it to
x-wiaxy-signature-256using a constant-time comparison. - Reject the request if the timestamp is older than a few minutes, to stop replays.
The legacy signature
Older integrations may still checkx-wiaxy-signature, a static md5(secret_key). Because it never changes between requests, it does not prove the body is intact and is weaker than the HMAC signature.
It is still sent for backward compatibility, but new integrations should verify x-wiaxy-signature-256 instead.
Both headers are sent on every webhook, so you can migrate from the legacy signature to the new one without any change on our side : just start verifying
x-wiaxy-signature-256.