WebhooksVerify SignaturesAsk a question|Copy page|View as Markdown|More actionsSimZ signs webhook deliveries with HMAC-SHA256 when the webhook has a secret. Headers HeaderValueX-Webhook-Signaturesha256=<hex HMAC>X-Webhook-TimestampUnix timestamp in seconds Signed payload HMAC-SHA256(secret, "<X-Webhook-Timestamp>.<raw request body>") Node.js example const crypto = require("crypto");function verifySimzWebhook(rawBody, headers, secret) { const signatureHeader = headers["x-webhook-signature"] || ""; const timestamp = headers["x-webhook-timestamp"] || ""; const expected = "sha256=" + crypto .createHmac("sha256", secret) .update(`${timestamp}.${rawBody}`) .digest("hex"); const a = Buffer.from(signatureHeader); const b = Buffer.from(expected); return a.length === b.length && crypto.timingSafeEqual(a, b);}