I am currently managing two subscription-based products, Monthly and Yearly, which are paid. When upgrading a user from Monthly to Yearly, my current approach involves subscribing the user to the new product (Yearly) and then deleting the previous product (Monthly) from the subscription. This results in the user being temporarily subscribed to both products. Could you please advise on the best practice for handling this scenario?
Additionally, my business logic for downgrades (e.g., moving from Yearly to Monthly) is not to cancel the current subscription immediately. For instance, if a user downgrades from Yearly to Monthly, the Monthly subscription starts only after the Yearly subscription has ended. Presently, I am managing this by:
1:-Setting cancel_at_period_end: true to cancel the current subscription at the end of its cycle.
2:- Starting the next subscription (Monthly) on a monthly basis, so that the user is charged monthly after the Yearly period ends.
However, this entire approach seems complex and counterintuitive. Could you please provide guidance on the best way to handle upgrades and downgrades using Stripe’s API, particularly with the subscription update method? I am using Node.js for my implementation.
Thank you in advance for your assistance.