@distant oriole pressed the 📡 API button in #help to ask a question:
Question
We want to integrate stripe in our Saas.
The users can subscribe to 1 of available 3 plans.
He can also add some 'addons', like additional storage, which gets added to the same subscription as the plan in subscription items.
The logic we want to have is when a user upgrades his plan or when he buys more addons or their quantities, the change is done immediately with proration.
In the case of downgrade, we want the user to keep the features he already paid for until the next billing cycle.
All those updates needs to be done via pending_if_incomplete, so that the changes aren't applied until t
Related Request ID(s)
req_0nHBmArl2Ucaxf, req_aShpzH3yunGNS6, req_EwihyqVtcDYA06
What have you already attempted?
What we've tried is using pending if incomplete during downgrades, and when the invoice is paid, we update the subscription schedules based on the schedules.
In the case of the downgrade, we just update the subscription schedule.
The downgrade works without issue, but in the case of the upgrade, let's say we upgrade the storage to 10GB, then we downgrade to 5GB, which creates a schedule, next time we upgrade to 12GB for example, it cancels the next downgrade, which is good, make the user pay for the addition 2GB on top of the 10, but then immediately cancel that change
What are you working on?
Saas for advisories