2
0

🐛 (billing) Set invoicing behavior to "always invoice" to fix double payment issue

This commit is contained in:
Baptiste Arnaud
2023-11-14 16:00:10 +01:00
parent 6c0f28b3e4
commit a1d7415227
4 changed files with 73 additions and 2 deletions

View File

@@ -125,10 +125,10 @@ export const updateSubscription = authenticatedProcedure
})
}
}
await stripe.subscriptions.update(subscription.id, {
items,
proration_behavior:
plan === 'PRO' ? 'always_invoice' : 'create_prorations',
proration_behavior: 'always_invoice',
})
} else {
const checkoutUrl = await createCheckoutSessionUrl(stripe)({