From 34a47c7767b4a456afc32cc02f088c25cf7387c3 Mon Sep 17 00:00:00 2001 From: M Fahru Date: Thu, 31 Jul 2025 10:09:52 -0700 Subject: [PATCH] Merge pull request #27551 from overleaf/kh-fix-failing-webhook-event [web] prefer metadata over email for invoice.paid events GitOrigin-RevId: cfb06333b62dfb5018bcdee0f153a812d19ff328 --- services/web/types/stripe/webhook-event.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/services/web/types/stripe/webhook-event.ts b/services/web/types/stripe/webhook-event.ts index 219be7a1d7..6f73ba8112 100644 --- a/services/web/types/stripe/webhook-event.ts +++ b/services/web/types/stripe/webhook-event.ts @@ -53,7 +53,15 @@ export type CustomerSubscriptionsDeletedWebhookEvent = { export type InvoicePaidWebhookEvent = { type: 'invoice.paid' data: { - object: Stripe.Invoice + object: Stripe.Invoice & { + parent: Stripe.Invoice.Parent & { + subscription_details: Stripe.Invoice.Parent.SubscriptionDetails & { + metadata: { + adminUserId?: string + } + } + } + } } request: Stripe.Event.Request }