Skip to content

Commit

Permalink
Subscriptions should be cancelled only on the next billing period.
Browse files Browse the repository at this point in the history
  • Loading branch information
igoramadas committed Dec 21, 2024
1 parent bad1df9 commit dade20b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/paddle/subscriptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ export class PaddleSubscriptions {
*/
cancelSubscription = async (user: UserData): Promise<void> => {
try {
await api.client.subscriptions.cancel(user.subscriptionId, {effectiveFrom: "immediately"})
await api.client.subscriptions.cancel(user.subscriptionId, {effectiveFrom: "next_billing_period"})
logger.info("Paddle.cancelSubscription", logHelper.user(user), `Cancelled: ${user.subscriptionId}`)
} catch (ex) {
if (ex.code == "subscription_update_when_canceled") {
Expand Down

0 comments on commit dade20b

Please sign in to comment.