We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cdc177d commit 82e846bCopy full SHA for 82e846b
packages/billing/src/api/webhookHandler.ts
@@ -208,6 +208,10 @@ export const webhookHandler = async (
208
previous.status !== "unpaid" &&
209
!existingWorkspace.isQuarantined
210
) {
211
+ if (!subscription.cancel_at_period_end)
212
+ await stripe.subscriptions.update(subscription.id, {
213
+ cancel_at_period_end: true,
214
+ });
215
await prisma.workspace.updateMany({
216
where: {
217
id: existingWorkspace.id,
0 commit comments