We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e09b32a commit 154ed37Copy full SHA for 154ed37
1 file changed
apps/sim/lib/billing/client/upgrade.ts
@@ -57,6 +57,17 @@ export function useSubscriptionUpgrade() {
57
currentStripeSubscriptionId = undefined
58
}
59
60
+ if (currentSubscriptionRowId && !currentStripeSubscriptionId) {
61
+ logger.error('Active paid subscription is missing its Stripe subscription ID', {
62
+ userId,
63
+ subscriptionRowId: currentSubscriptionRowId,
64
+ targetPlan,
65
+ })
66
+ throw new Error(
67
+ 'We could not match your current plan with our payment provider. Please contact support before upgrading so you are not charged twice.'
68
+ )
69
+ }
70
+
71
let referenceId = userId
72
73
if (targetPlan === 'team') {
0 commit comments