From 1c4b55fff4a12fd0d1457145caaa02c71fd88afb Mon Sep 17 00:00:00 2001 From: M Fahru Date: Mon, 4 Aug 2025 09:05:41 -0700 Subject: [PATCH] Merge pull request #27498 from overleaf/mf-fix-subscriptionX-segmentation-stripe [web] Only send one subscriptionId data in event segmentation for Stripe subscription to follow recurly GitOrigin-RevId: 9e514d2991df768ea7e77bd5fa5f9d851c4ee8f0 --- .../web/app/src/Features/Subscription/RecurlyEventHandler.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/web/app/src/Features/Subscription/RecurlyEventHandler.js b/services/web/app/src/Features/Subscription/RecurlyEventHandler.js index c131ee10ec..e03edca319 100644 --- a/services/web/app/src/Features/Subscription/RecurlyEventHandler.js +++ b/services/web/app/src/Features/Subscription/RecurlyEventHandler.js @@ -329,6 +329,8 @@ async function _sendInvoicePaidEvent(userId, eventData) { const country = invoice.address?.country const collectionMethod = invoice.collection_method const subscriptionIds = {} + // This logic is currently only resulting in `subscriptionId1` being set, because real data shows that + // there is only one subscription_id per invoice for recurly. invoice.subscription_ids?.forEach((e, idx) => { if (idx < INVOICE_SUBSCRIPTION_LIMIT) { subscriptionIds[`subscriptionId${idx + 1}`] = e