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

Changing subscription count at the end of cycle #228

Closed
PabloHendriks opened this issue Mar 11, 2024 · 1 comment · May be fixed by #250
Closed

Changing subscription count at the end of cycle #228

PabloHendriks opened this issue Mar 11, 2024 · 1 comment · May be fixed by #250

Comments

@PabloHendriks
Copy link
Contributor

PabloHendriks commented Mar 11, 2024

Hi,

I wanted to change the subscription count of my customers at the end of the cycle.
So basically if a customer has 10 subscriptions and wants to downgrade to 7, I would like to update the subscription count at the beginning of the next subscription cycle.
Right now I did not find a way to do this. I could only manage to make the billing happen at the beginning of the next cycle instead of restarting the cycle(which is part of what I want), but then the subscription count is changed immediately, so my customer would be paying for 10 subscriptions while only having access to seven.

I could not find a way to do this, if there is, please let me know.
If there is no way of doing this, I thought the way to implement it could be to create a new nullable column called next_quantity or something like that, which would specify how many subscriptions will there be in the next cycle. Then create a new function updateQuantityNextCycle that would set this new field and create a new order_item inline with the new quantity.
This approach is very similar to the one that is currently taken with swapNextCycle().

Thank you very much for your time and attention,
Pablo

@sandervanhooft
Copy link
Collaborator

Hi @PabloHendriks,

Excellent question and the approach you mentioned is valid. This is not supported out of the box on this version. We're adding it to the list for the next major release. Meanwhile, feel free to send in a PR. Locally, you could add the column and override the model(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants