#juliuskiesian
1 messages · Page 1 of 1 (latest)
Hi! Let me help you with this.
Hi!
Yes, that's correct.
When a new billing period starts, a few attributes are updated on the Subscription, such as current_period_start, current_period_end and latest_invoice. This triggers the customer.subscription.changed event
what if i just want to receive such kind of events only when the price is changed?
As part of the Event object, you receive the data.previous_attributes parameter. It contains attributes that has changed. You can check if price is present in this object and proceed with your logic, otherwise, discard the event: https://stripe.com/docs/api/events/object#event_object-data-previous_attributes
ok, that makes sense. thanks!
Happy to help. Let me know if you have any other questions.