From 8804df2ef3c7f653e017efc4ced2b389a8ee60ef Mon Sep 17 00:00:00 2001 From: M Fahru Date: Tue, 29 Jul 2025 08:34:36 -0700 Subject: [PATCH] Merge pull request #27188 from overleaf/mf-admin-stripe-sync-subscription [web] Make admin able to sync out-of-sync expired Stripe subscription from the admin panel GitOrigin-RevId: 1198eaa3f58756800ee078f9ff8e1d432ce32ef3 --- .../subscription/util/handle-stripe-payment-action.ts | 2 +- services/web/frontend/js/utils/meta.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/services/web/frontend/js/features/subscription/util/handle-stripe-payment-action.ts b/services/web/frontend/js/features/subscription/util/handle-stripe-payment-action.ts index 61540551fa..97952dedd5 100644 --- a/services/web/frontend/js/features/subscription/util/handle-stripe-payment-action.ts +++ b/services/web/frontend/js/features/subscription/util/handle-stripe-payment-action.ts @@ -24,7 +24,7 @@ export default async function handleStripePaymentAction( return { handled: false } } else { try { - await postJSON('/user/subscription/sync') + await postJSON(`/user/subscription/sync`) } catch (error) { // if the sync fails, there may be stale data until the webhook is // processed but we can't do any special handling for that in here diff --git a/services/web/frontend/js/utils/meta.ts b/services/web/frontend/js/utils/meta.ts index 6fefc26676..0195dd8803 100644 --- a/services/web/frontend/js/utils/meta.ts +++ b/services/web/frontend/js/utils/meta.ts @@ -252,7 +252,10 @@ export interface Meta { 'ol-ssoDisabled': boolean 'ol-ssoErrorMessage': string 'ol-stripeAccountId': string - 'ol-stripeCustomerId': string + 'ol-stripeSubscriptionData': { + customerId: string + subscriptionState: string | null + } 'ol-subscription': any // TODO: mixed types, split into two fields 'ol-subscriptionChangePreview': SubscriptionChangePreview 'ol-subscriptionFeatures': {