#ibgoldbergs
1 messages · Page 1 of 1 (latest)
so even though there are subscription schedule events, it won't fire to one of those, only to the subscription.updated
Right
Because the susbcription schedule is what's mutating the subscription object
Your subscription would have changed on phase transition
Hmm but would the subscription.updated event provide any details that it finished a phase and was moving to the next phase?
I'm trying to key on a specific phase change and see if I can hook into it via metadata and its not clear to me that the data will be easily found.
What specifically are you looking at?
Like what data specifically is changing that you need to inspect
Ah there is this too: https://docs.stripe.com/api/events/types#event_types-subscription_schedule.updated
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
That'll be fired as well
we have multiple phases on our subscription schedule with various metadata on each phase like
Phase1: metadata.type = a
Phase2 metadata.type = b
Phase3: metadata.type = c
When the subscription changes from a phase with type a to type b, we want to perform an action on our end.
yeah use above event then
current_phase param will change on phase change: https://docs.stripe.com/api/subscription_schedules/object#subscription_schedule_object-current_phase
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
cool and since its an .updated event it should, theoretically, provide us with the previous_data which includes the previous phase -- right?