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 4d79c09 commit cdc177dCopy full SHA for cdc177d
packages/billing/src/api/webhookHandler.ts
@@ -226,6 +226,11 @@ export const webhookHandler = async (
226
(previous.status === "past_due" || previous?.status === "unpaid") &&
227
existingWorkspace.isPastDue
228
) {
229
+ if (subscription.cancel_at_period_end)
230
+ await stripe.subscriptions.update(subscription.id, {
231
+ cancel_at_period_end: false,
232
+ });
233
+
234
await prisma.workspace.updateMany({
235
where: {
236
id: existingWorkspace.id,
0 commit comments