From 95f5b6a7b341c8bb0e3bebcdc0c46e22779f428a Mon Sep 17 00:00:00 2001 From: ved015 Date: Wed, 10 Jun 2026 13:28:54 +0530 Subject: [PATCH] fix(billing): capture cancellation after success --- apps/web/components/settings/billing.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/web/components/settings/billing.tsx b/apps/web/components/settings/billing.tsx index ee747ef8..3627b220 100644 --- a/apps/web/components/settings/billing.tsx +++ b/apps/web/components/settings/billing.tsx @@ -674,6 +674,10 @@ export default function Billing() { if (!cancellablePlanId) return setIsCancelling(true) try { + await autumn.updateSubscription({ + planId: cancellablePlanId, + cancelAction: "cancel_end_of_cycle", + }) if (posthog?.__loaded) { posthog.capture("subscription_cancelled", { reason: cancelReason, @@ -683,10 +687,6 @@ export default function Billing() { surface: "nova", }) } - await autumn.updateSubscription({ - planId: cancellablePlanId, - cancelAction: "cancel_end_of_cycle", - }) autumn.refetch?.() setIsCancelDialogOpen(false) resetCancelForm()