🪝 Webhooks Official Documentation

⋙ Unwrap Webhook Event

Validate signature and parse the webhook payload into an event object.

msg.payload Properties

payload string
Raw webhook request body string.
headers object
Request headers containing webhook signature fields.
secret string
Webhook secret. If omitted, SDK-level webhook secret is used.
tolerance integer
Maximum webhook age in seconds. Default is 300.

⋙ Verify Webhook Signature

Validate a webhook signature without parsing the event body.

msg.payload Properties

payload string
Raw webhook request body string.
headers object
Request headers containing webhook signature fields.
secret string
Webhook secret. If omitted, SDK-level webhook secret is used.
tolerance integer
Maximum webhook age in seconds. Default is 300.

The verify method returns { verified: true } on success.