#gabrielctavares-events-metadata
1 messages ยท Page 1 of 1 (latest)
Hi ๐ all of our available Event types are listed here:
https://stripe.com/docs/api/events/types
You can also use test clocks to simulate a Subscription moving through it's lifecycle in your account, which will allow you to see exactly what type of Events are generated and when, so you can decide which ones you'd like to listen to and take action on:
https://stripe.com/docs/billing/testing/test-clocks
I would not recommend listening to all Events that correspond with a payment successfully being completed when working Subscriptions, if you also accept one-time payments similar Events will fire and your event handler may crash if it can't find related Subscription objects.
One more question, how can I send special information about the client on the frontend? for ex my local id to retrieve it in the webhook endpoint
or even the local id of my signature so I can retrieve it easily
In the case of a signature, the costumer property is always filled in, right?
Storing information that is important to your flows that we don't already collect is typically accomplished via the metadata field that exists on most of our objects:
https://stripe.com/docs/api/metadata
It allows you to store your own key/value pairs on those objects.
gabrielctavares-events-metadata
I checked the listing and I'm still a little unsure, could you tell me exactly which events refer to authorization and a cancellation of a subscription?
๐ stepping in here as toby needs to step away
Ok
Have you taken a read through https://stripe.com/docs/billing/subscriptions/webhooks yet?
Not exactly, toby recommended me this one
https://stripe.com/docs/api/events/types
Gotcha yeah that one will note all of the event types but the one above will give you the specific events that we recommend for Subscriptions
You mostly want to use customer.subscription.updated for an active Subscription and then you can use customer.subscription.deleted when one is canceled.
More details are in the doc I linked above