From 81dd3c10a78099ec7db3c5717a1384aba9f59f89 Mon Sep 17 00:00:00 2001 From: M Fahru Date: Thu, 15 May 2025 08:12:19 -0700 Subject: [PATCH] Merge pull request #25497 from overleaf/mf-send-subscription-renewed-event-stripe [web] Send analytics events and user properties when user's subscription is renewed with the same plan GitOrigin-RevId: c21436d942e8b1a2b8c9fca5827826bf0e8b8bdb --- 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 72264abe46..9c92fdc7ff 100644 --- a/services/web/types/stripe/webhook-event.ts +++ b/services/web/types/stripe/webhook-event.ts @@ -11,6 +11,17 @@ export type CustomerSubscriptionUpdatedWebhookEvent = { // https://docs.stripe.com/api/events/object?api-version=2025-04-30.basil#event_object-data-previous_attributes previous_attributes: { cancel_at_period_end?: boolean // will only be present if the subscription was cancelled or reactivated + items?: { + // will be present if the subscription was downgraded, upgraded, or renewed + data: [ + { + price: { + id: string + } + quantity: number + }, + ] + } } } }