Reputation: 101
I have several customers subscribed to many other several Stripe plans on my website: These plans are all 'yearly' and have different subscribing amounts. Notice that I also have customers with a subscription status "active" and many others with "trialing".
Now, I need to automatically change their subscription plans to an unique new yearly plan, with a different subscription amount, at the end of their respective billing cycles.
I was looking for the properly event in order to do the change of plan programmatically within a webhook, but I don't know which to choose having both 'active' and 'trialing' subscriptions.
Any ideas?
Upvotes: 0
Views: 596
Reputation: 1431
I think invoice.upcoming
the event will work for both trailing and active. subscription.
you can configure invoice.upcoming webhook to arrive 1 day before and modify customer's subscription and invoice.
invoice.upcoming : Occurs X number of days before a subscription is scheduled to create an invoice that is charged automatically, where X is determined by your subscriptions settings. Note the received invoice object will not have an invoice ID.
Hope this helps you
Upvotes: 1