Process a webhook event by calling the handler registered for its type.
The parsed webhook event
Webhook configuration with handlers
await processWebhookEvent(event, { signingSecret: process.env.STRIPE_WEBHOOK_SECRET!, handlers: { 'payment_intent.succeeded': async (event) => { console.log('Paid:', event.data.object.id); }, },}); Copy
await processWebhookEvent(event, { signingSecret: process.env.STRIPE_WEBHOOK_SECRET!, handlers: { 'payment_intent.succeeded': async (event) => { console.log('Paid:', event.data.object.id); }, },});
Process a webhook event by calling the handler registered for its type.