#JR24-subscription-events

1 messages ยท Page 1 of 1 (latest)

olive jungle
#

Hi there ๐Ÿ‘‹ customer.subscription.updated is the best type of event to listen to for changes being made to Subscriptions, but it does capture all changes made to Subscriptions so you'll likely need to add some filtering/logic in your event handler to make sure you're only catching/actioning on the events that you care about.

true leaf
#

What about subscription_schedule.updated?

olive jungle
#

That triggers when changes are made to the Subscription Schedule object itself.

true leaf
#

Would that update based on what phase is active?

#

*trigger based on a new phase

olive jungle
#

Hm, it might, double checking with my teammates.

true leaf
#

Thanks

olive jungle
#

We think listening for subscription_schedule.updated will accomplish what you're looking for, but are running some tests to confirm.

#

While we're doing that, I also wanted to take a moment to share our new(ish) Test Clock functionality with you.
https://stripe.com/docs/billing/testing/test-clocks

It lets you build small simulations inside of a sandbox within your account, and then allows you manually advance time so you can skip forward to see how objects will change in the future.

I use this a lot when testing flows of this nature, and it's particularly useful since it allows you to set up your flow exactly how you normally would, and then see how that behaves moving forward.

true leaf
#

Awesome, thank you!

true leaf
#

Any update on the subscription_schedule.updated event?

olive jungle
#

Apologies (things have been a bit hectic today). My teammates were able to confirm that the subscription_schedule.updated event did not get triggered when the schedule moved from one phase to the next, so for now I would recommend leveraging customer.subscription.updated.

My teammates did capture this use-case along with their testing results and raised that to the appropriate team to consider adjusting that so subscription_schedule.updated could be used in the fashion you were hoping.

true leaf
#

sounds good, thank you for checking. Good luck with the hectic day

olive jungle
#

Thank you so much, that made my day ๐Ÿ˜‚