#ian_subscriptionschedule-event
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1232031562829398160
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
When a schedule changes phase, it sends a webhook event of type customer.subscription.updated, given the payload provided with this event, what would be the right way to identify that this event was a phase change?
Example payload provided to the webhook:
@pale bronze there's nothing specific in that Event to indicate if it's a phase change unfortunately
ian_subscriptionschedule-event
So is there no way via a webhook to identify phase change?
not that I know of. You'll have to infer from the Event such as whether there's a new list of items for example
for example in your Event inside previous_attributes you can see items is changing
but that's not perfect since the same could happen if you explicitly made a request to change the list of items
Hmm. So even if we put metadata on the phase like type, that metadata wont show up in the previous attributes?
sure metadata could work per the docs here https://docs.stripe.com/api/subscription_schedules/create#create_subscription_schedule-phases-metadata