#hiroshi nishio
1 messages · Page 1 of 1 (latest)
Hi there, you can listen to the customer.subscription.updated event (https://stripe.com/docs/api/events/types#event_types-customer.source.updated) to get notify about any changes to the subscription.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
That means there is no corresponding properties to know in the subscription object?
You can check event data's previous_attributes to see what changed (https://stripe.com/docs/api/events/object?lang=node#event_object-data-previous_attributes)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Thank you😊
You mean I can just webhook the event? I understand that, but this time I wanted to know the update time from the subscription object,
Is it possible to do that?
The event will be fired when the subscription change happens, so by looking at the event's created timestamp (https://stripe.com/docs/api/events/object?lang=node#event_object-created), you'll know when it hapeens.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I may have misunderstood, could it be possible to go get the event object later without having to listen to the event object as a webhook?
Yes you can do that as well.
But you'll need to list and search the event by yourself.
the timestamp of the change? no.