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

    Type Alias WebhookHandlers

    WebhookHandlers: {
        [K in WebhookEventType]?: WebhookHandler<
            Extract<Stripe.Event, { type: K }>,
        >
    }

    Map of event types to their handlers. Each handler receives the event narrowed to its specific type.

    const handlers: WebhookHandlers = {
    'payment_intent.succeeded': (event) => {
    // event.data.object is a Stripe.PaymentIntent here
    console.log(event.data.object.amount);
    },
    };