Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

fix: use 3 calendar months instead of 90 days for subscription pause

Cursor Agent83d4f6dcdeb3
diff --git a/ee/features/billing/cancellation/api/pause-route.ts b/ee/features/billing/cancellation/api/pause-route.ts
index 944bdf7b..ca9f1609 100644
--- a/ee/features/billing/cancellation/api/pause-route.ts
+++ b/ee/features/billing/cancellation/api/pause-route.ts
@@ -77,7 +77,8 @@ export async function handleRoute(req: NextApiRequest, res: NextApiResponse) {
const pauseStartsAt = stripePeriodEnd > now ? stripePeriodEnd : now;
const pauseEndsAt = new Date(pauseStartsAt);
- pauseEndsAt.setDate(pauseStartsAt.getDate() + 90);
+ // Use 3 calendar months instead of 90 days to properly align with billing cycles
+ pauseEndsAt.setMonth(pauseStartsAt.getMonth() + 3);
const reminderAt = new Date(pauseEndsAt);
reminderAt.setDate(pauseEndsAt.getDate() - 3);
diff --git a/ee/features/billing/cancellation/components/pause-subscription-modal.tsx b/ee/features/billing/cancellation/components/pause-subscription-modal.tsx
index bd830bbd..1db630c2 100644
--- a/ee/features/billing/cancellation/components/pause-subscription-modal.tsx
+++ b/ee/features/billing/cancellation/components/pause-subscription-modal.tsx
@@ -82,7 +82,8 @@ export function PauseSubscriptionModal({
const endsAtDate = endsAt ? new Date(endsAt) : now;
const pauseStartsAt = endsAtDate > now ? endsAtDate : now;
const pauseEndsAt = new Date(pauseStartsAt);
- pauseEndsAt.setDate(pauseStartsAt.getDate() + 90);
+ // Use 3 calendar months instead of 90 days to properly align with billing cycles
+ pauseEndsAt.setMonth(pauseStartsAt.getMonth() + 3);
const pauseStartsAtString = new Date(pauseStartsAt).toLocaleDateString(
"en-US",