#Jayy

1 messages · Page 1 of 1 (latest)

junior grottoBOT
next valve
#

hi there,
Could you please provide further details what and why you want to achieve this ?

cancel them and then schedule new subscriptions to be charged/activated one the cancelled ones reach their cycle
If you cancel a subscription, their will be no cycle to reach, not sure I'm following here

mild sleet
#

Yes sure!
With the way my client wants their products they want to achieve the following:
they have multiple products (monthly subscriptions in this case)
each product has it's own related addons each with a different pricing.

so let's say i am subscribed to a silver package that has a special addons for $5 a month, and i would like to downgrade to the wood package the client requires all of their current addons to be removed in this case.
i do not want to use stripe.subscriptions.del() or stripe.subscriptions.cancel() as they cancel everything instantly as i saw

I want the customer to keep using their benefits until the next payment which is when the subscriptions will cancel (we will not charge them) and charge them for the wood package they chose

#

in this scenario we will be scheduling both the silver package and it's special addon to cancel at current_period_end of the subscription itself
and at the same time i want the wood package subscription to start

next valve
#

Thanks for the explanation,
Why you don't just upgrade the subscription plan ?
https://stripe.com/docs/billing/subscriptions/upgrade-downgrade
You set proration behavior to none (in order not to create proration):
https://stripe.com/docs/api/subscriptions/update#update_subscription-proration_behavior
and you keep the billing_cycle_anchor unchanged:
https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_cycle_anchor
So that when the current plan ends the new addon will be started

mild sleet
#

i'll have a look at it 😄

#

1 more question. updating the plan itself would cause data inconsistency in my database. as when the billing cycle is reached and the customer is charged for the new plan, i wouldn't know that the actual plan is changed

the customer.subscription.updated is called the moment we update the subscription. it would cause the customer to instantly lose benefits if so.. wouldn't it ?

next valve
#

updating the plan itself would cause data inconsistency in my database
You need to update/modelize your database to track the current remaining phase and the next plan change and when it starts

mild sleet
#

Alright, thank you! x

mild sleet
#

Does the webhook customer.subscription.updated get called on each payment?

mossy narwhal
#

It would fire at each billing cycle regardless of whether the invoice payment succeeded/failed