From 1440a47d5357388daca4ea6843971e5c8aa2dc6f Mon Sep 17 00:00:00 2001 From: M Fahru Date: Thu, 15 May 2025 08:13:06 -0700 Subject: [PATCH] Merge pull request #25560 from overleaf/mf-stripe-analytics-invoice-event [web] Handle stripe analytics for the `subscription-invoice-collected` event GitOrigin-RevId: cba56db820cac92a66307a05350c779e1198cbf3 --- services/web/types/stripe/webhook-event.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/services/web/types/stripe/webhook-event.ts b/services/web/types/stripe/webhook-event.ts index 9c92fdc7ff..f6e36b8b0a 100644 --- a/services/web/types/stripe/webhook-event.ts +++ b/services/web/types/stripe/webhook-event.ts @@ -48,7 +48,18 @@ export type CustomerSubscriptionsDeletedWebhookEvent = { } } +export type InvoicePaidWebhookEvent = { + type: 'invoice.paid' + data: { + object: Stripe.Invoice + } +} + export type CustomerSubscriptionWebhookEvent = | CustomerSubscriptionUpdatedWebhookEvent | CustomerSubscriptionCreatedWebhookEvent | CustomerSubscriptionsDeletedWebhookEvent + +export type WebhookEvent = + | CustomerSubscriptionWebhookEvent + | InvoicePaidWebhookEvent