@bates-solutions/stripe API Reference - v2.2.1
    Preparing search index...

    Function processWebhookEvent

    • Process a webhook event by calling the handler registered for its type.

      Parameters

      • event: Event

        The parsed webhook event

      • config: WebhookConfig

        Webhook configuration with handlers

      Returns Promise<void>

      await processWebhookEvent(event, {
      signingSecret: process.env.STRIPE_WEBHOOK_SECRET!,
      handlers: {
      'payment_intent.succeeded': async (event) => {
      console.log('Paid:', event.data.object.id);
      },
      },
      });