#stefano-subscription

1 messages · Page 1 of 1 (latest)

untold lily
alpine sentinel
#

Hi Karllekko!

I am not a Developer but a Data Analyst but I suppose that the answer to your question is yes if it changes the fields in the subscription item cancel_at_period_end, cancel_at, etc.

untold lily
#

it's hard to give an accurate answer then

if you are using cancel_at_period_end then a good approach to start with is to list events on your account filtered to the customer.subscription.updated type https://stripe.com/docs/api/events/list

#

that gives you a list of recent updates to subscriptions and you can parse from that what changed(there's a previous_attributes field in the data.object field that helps) and give you the information you'd need

alpine sentinel
#

This is exactly what I was looking for!

I would do:

  1. list all events by type customer.subscription.updated
  2. filter in the previous_attributes field at least cancel_at_period_end

In this way I would have all the subscription renew changes, is it correct?

#

I found one example:

untold lily
#

I think it would be a good start yep