webhook.verification) are not signed.
Transport Requirements
Webhook endpoints must:- Use HTTPS
- Support TLS 1.2 or higher
- Present a valid certificate
Signature Header
Each event delivery includes the header:tis the Unix timestamp (seconds)v1is generated using the current secretv0is generated using the previous secret during the transition window
Signed Payload Format
The signature is generated from:- Use the exact raw request body.
- Do not reformat or reserialize JSON before verification.
- Any change to whitespace or formatting will invalidate the signature.
Verification Process
To validate a delivery:- Extract the timestamp from the
X-Alvys-Signatureheader. - Extract the signature value.
- Read the raw request body exactly as received.
- Construct the signed payload string.
- Compute an HMAC-SHA256 hash using your webhook secret.
- Compare the computed value to the signature(s) provided.
- Process the event only if a match is found.
Replay Protection
It is recommended to reject requests where:Secret Management
Each webhook has a unique signing secret. The secret:- Is generated when the webhook is created.
- Can be regenerated using the Regenerate Secret Key option in the UI.
- Should be stored securely.
- Must never be exposed in client-side code or logs.
If Signature Validation Fails
If the signature cannot be verified:- Return HTTP
401 Unauthorized. - Do not process the event.