Webhook verification
Verify HMAC signatures on inbound webhook requests.
Algorithm
- Read raw request body (before JSON parse)
- Concatenate
{timestamp}.{rawBody} - HMAC-SHA256 with your webhook secret
- Compare hex digest to
X-Eventyvo-Signature(constant-time)
Node.js (@eventyvo/embed)
import { verifyWebhookSignature } from "@eventyvo/embed";
const ok = verifyWebhookSignature({
payload: rawBody,
secret: process.env.WEBHOOK_SECRET,
signature: req.headers["x-eventyvo-signature"],
timestamp: req.headers["x-eventyvo-timestamp"],
});
Timestamp tolerance
Reject requests older than 5 minutes to prevent replay attacks.
Response
Return 2xx quickly — process asynchronously. Non-2xx triggers retries.