#Nick - webhooks
1 messages · Page 1 of 1 (latest)
Stripe will generate events for everything. It's up to you to tell your webhook which events you want sent
It's recommended to explicitly only configure your webhook endpoint to send the events you need (not all events)
I'm more asking about multiple events of the same type
For example, adding a sub item fires customer.subscription.updated but updating the subscription metadata also fires that same event. If you do the 2 in quick succession it gets weird in the handler
Ah no. You could set some metadata on the request and use that to ignore the event
But no more explicit way
As in just a metadata value for the entity we're updating? Or is there a more generic "Event" metadata value?
Or even a way to know what the event ID is going to be for such an update?
the latter may be a chicken and egg problem
Quick follow up question then - sort of unrelated, we can open a new thread if necessary
You can ask in here
I can update subscription items via the subscription update method (rather than explicitly calling subitem.New, and then adding the trial). Do I have to pass through the existing ones, or can I just pass through the new item?
Is it like metadata where not sending the value has no effect? Or do you explicitly have to tell it exactly which items you want each time you update?
I don't know 100% off the top of my head but I believe you have to specify existing items. I recommend testing this out in test mode