#invester1357

1 messages · Page 1 of 1 (latest)

heavy zephyrBOT
swift sand
#

Are you looking for the way to identify whether the subscription is downgraded, so that your system can be notified?

ocean glen
#

well, I can tell that it's been downgraded on my end. but I don't want to downgrade them immediately. I want them to keep the yearly benefits until the end of the billing date that they initially signed up for.

#

so I want to zero out their invoice credit balance basically at the end of the yearly subscription

#

so if they do 500/year on feb 2nd 2024. they keep those benefits until feb 2nd 2025. regardless if they downgraded to another plan.

#

but on feb 2nd 2025, I want them to start paying the new price for their plan that they changed to somewhere in between the yearly plan.

swift sand
ocean glen
#

so when I listen to the webhook and it's event_type == 'customer.subscription.updated':
do I just modify the subscription schedule?

#

if it's a downgrade

#

because this looks like a custom solution, will webhooks work?

#

or do I need to create this subscription schedule on the customers initial purchase

swift sand
#

For future update on the subscription with Subscription Schedule, subscription_schedule.* events will be sent. Only when the yearly cycle ends and the actual subscription is changed to monthly price, then customer.subscription.updated' will be sent on the price changes

ocean glen
#

ok let me try it real quick now.

#

my main concern is, when I use the stripe customer portal and make a downgrade there, it sends a customer.subscription.updated event =/

swift sand
#

Ah! I'm afraid that Customer Portal doesn't support Subscription Schedule, i.e. only downgrade after the current cycle ends. This is only possible with direct API integration

ocean glen
#

gotcha....so if I want to avoid direct api integration

#

should I just credit the user and downgrade them as soon as they update the plan to a lower tier?

#

and manually change their invoice balance in a webhook upon the downgrade

swift sand
#

That will be up to your business decision on how you would like to handle the immediate downgrade

ocean glen
#

sounds good. ok thank you river