#brettski-subscription-events

1 messages ยท Page 1 of 1 (latest)

neon ginkgo
#

Hello! Are you looking for a doc link, or are you asking for general guidance about which event we'd recommend for this situation?

nocturne charm
#

I guess both. A link so I can look stuff up, and recommendations, because that's a good thing ๐Ÿ™‚

neon ginkgo
#

๐Ÿ‘ So if you're just looking for a webhook event specifically for subscription expiration, I'd recommend the customer.subscription.updated since that will tell you if the expiration date changed.

nocturne charm
#

So it sounds like custom.subscription.upated is the correct event to watch for all subscription updates. If it is canceled (don't renew) this will update, if it successfully renews, this will update with a new date.

Do I need to look in the changed field section or focusing on the data get me all I need?

neon ginkgo
#

It depends - if you want to know if a specific field has changed or if you want to do certain actions only if certain things have changed, then previous_attributes is useful. For example, if you have logic to email a customer after every cycle, you don't want to accidentally trigger that if the only that changed was the subscription metadata

nocturne charm
#

Okay, that makes sense. How many days before the subscription ends does the renewal go through again, I don't recall

gilded spear
nocturne charm
#

Oh yes, it's all coming back to me now. Thank you. It's amazing how much you forget in 6 months