Verify and parse a webhook request.
The raw request body string
The stripe-signature header value
stripe-signature
Your webhook signing secret
Optional
Verification options
The parsed and verified webhook request
Error if verification or parsing fails
const { event } = parseAndVerifyWebhook( rawBody, signature, process.env.STRIPE_WEBHOOK_SECRET!); Copy
const { event } = parseAndVerifyWebhook( rawBody, signature, process.env.STRIPE_WEBHOOK_SECRET!);
Verify and parse a webhook request.