#Shaun - Customer Updated Event

1 messages ยท Page 1 of 1 (latest)

paper granite
#

Hi ๐Ÿ‘‹

#

You can check the previous_attributes property on the subscription.

#

Do you have an example event ID I could use as a reference?
Event IDs start with evt_

next fern
#

Ah I see, so I want to check if previous_attributes contains my old plan

#
if(!data.previous_attributes.items) return

This should do it ๐Ÿ˜„

paper granite
#

Just do double check I would review the Events in your dashboard and look at some customer.subscription.updated events where you tested a customer change in price/plan

next fern
#

Yea that's what I did ๐Ÿ™‚

paper granite
#

Okay great. There's a lot of properties, especially with Subscriptions, so I always double check the shape of the data I receive.

next fern
#

Great stuff, thank you sir/ma'am!