#napolean_solo

1 messages · Page 1 of 1 (latest)

steel krakenBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

proud inlet
#

In the customer.subscription.updated event, a previous_attributes will be included: https://stripe.com/docs/api/events/object#event_object-data-previous_attributes

previous_attributes will include the old price plan which can be used to compare with the current price plan to find out whether the price plan is upgraded or downgraded

modest plinth
#

I don't specifically want to know whether it was upgraded or downgraded rather it was a change in plan event.

So is it okay if I just check whether that attribute previous_attributes exists to know whether it was a change of plan event?

proud inlet
#

previous_attributes contains the changes of any parameters in the Subscription object in customer.subscription.updated event. You should look for items.data.price for the change of price plan on a subscription under previous_attributes. I'd recommend giving a try in test mode