Parse and verify a webhook request
The raw request body string
The signature from headers
Your webhook signature key, or a list of keys during rotation
Optional
Optional notification URL for verification
Parsed and verified webhook request
Error if verification or parsing fails
const { event } = parseAndVerifyWebhook( rawBody, signature, process.env.SQUARE_WEBHOOK_KEY!); Copy
const { event } = parseAndVerifyWebhook( rawBody, signature, process.env.SQUARE_WEBHOOK_KEY!);
Parse and verify a webhook request