Function verifyWebhookSignature

  • Verify an x-wabery-signature header against the raw request body.

    Parameters

    • rawBody: string | Buffer<ArrayBufferLike>

      The raw, unparsed request body (string or Buffer). Do not JSON.parse and re-stringify — the bytes must match exactly.

    • signature: string

      The full header value, formatted sha256=<hex>.

    • secret: string

      Your endpoint's webhook signing secret.

    Returns boolean

    true when the signature matches, false otherwise. Never throws.