Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(subscription upgrade): Upgrade subscriptions previously considered downgrade on amount increase #2823

Merged
merged 5 commits into from
Nov 15, 2024

Conversation

ancorcruz
Copy link
Contributor

@ancorcruz ancorcruz commented Nov 14, 2024

Context

Currently, when a user updates the subscription fee amount for a plan associated with a pending downgrade (scheduled to activate at the end of the billing period), the system does not treat the pending subscription as an upgrade. As a result, the new subscription is not activated, and the previous one is not terminated.

Description

This change extracts the subscription upgrade logic into a dedicated service, ensuring it can be consistently applied across flows that trigger subscription upgrades. Currently, this includes plan updates and initial subscription creation.

An additional edge case, involving plan subscription overrides, is not addressed in this PR. Handling this scenario introduces extra technical and product complexities that require further consideration.

@ancorcruz ancorcruz self-assigned this Nov 14, 2024
@ancorcruz ancorcruz changed the title fix(subscription upgrade): fix(subscription upgrade): Upgrade subscriptions previously considered downgrade on amount increase Nov 14, 2024
@ancorcruz ancorcruz added the 🐞 Bug Something isn't working label Nov 14, 2024
Copy link
Collaborator

@vincent-pochet vincent-pochet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great one 🚀

@ancorcruz ancorcruz merged commit 2789b30 into main Nov 15, 2024
6 checks passed
@ancorcruz ancorcruz deleted the fix/invoice-boundaries-downupgrade branch November 15, 2024 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants