#hallmatt - webhook events
1 messages ยท Page 1 of 1 (latest)
Hello! Just starting a thread for you -- I'll review and respond as soon as I can ๐
It likely depends on whether the source/card/PM etc is attached to a customer or not
wherever that was attached I'd expect customer to be set with the ID of the customer it was attached to
Though for deleted i guess that should always be true
These are different layers of legacy APIs yes, so an integration that's existed through different iterations might need to manage multiple types
Do you have example events I can look at to compare/
sure!
eg evt_123 vs evt_456?
evt_1L6b9fB7y5mN6h0Ls1f2X2oN
evt_1L6aCHB7y5mN6h0LZtjrRM1Q
seemingly the same api version, but the 2nd one does not have a customer - which i was expecting ๐
i think both were attached to a customer...
one is a live event and one is test
@novel nebula any thoughts on why these two event types send through different params?
Yep because as i noted the source was never attached to a customer as far as i can see
oh nope wait, it was, apologies, i misread
๐
for evt_1L6aCHB7y5mN6h0LZtjrRM1Q it was deleted through the Dashboard, and was attached to a Customer. i dont even know how to attach/delete sources/pm/cards without attaching them to a Customer ๐
so its just weird that some come through webhooks w/ a customer and others dont
Right, this appears to be expected for the source event
If you need that information an updated payment_method.detached event is also generated that includes the customer info:
eg https://dashboard.stripe.com/events/evt_1L6aCHB7y5mN6h0LYzEmW9u8 for this detachment
so sometimes a source event has a customer and other times it does not? it seems strange because it's the customer.source.deleted event. meaning, there's a customer associated with the event
Hi ๐ I'm stepping in for @novel nebula Give me a sec to catch up
Sources are a much older API with some less than ideal behavior. This may be the cause of this situation
Just before I step away, the other event you shared was not customer.source.deleted it is customer.card.deleted: https://dashboard.stripe.com/test/events/evt_1L6b9fB7y5mN6h0Ls1f2X2oN
so these are just different events and have different data shapes