Skip to main content

Method

Parameters

*VerifyWebhookOptions
required
The webhook verification parameters
string
required
The raw webhook payload body as a string
WebhookHeaders
required
The webhook verification headers
string
required
The svix-id header value
string
required
The svix-timestamp header value
string
required
The svix-signature header value
string
required
The signing secret from webhook creation (starts with whsec_)

Response

Returns nil if verification succeeds, or an error if verification fails.

Example

Notes

  • The verification implements HMAC-SHA256 signature validation
  • Timestamp validation prevents replay attacks (default tolerance: 5 minutes)
  • The signing secret is provided once when creating the webhook
  • All three headers (svix-id, svix-timestamp, svix-signature) are required