#gpatra
1 messages · Page 1 of 1 (latest)
Hi there!
Hi Soma
You want to know all the events triggered when calling https://stripe.com/docs/api/customers/delete on a customer with an active subscription?
yes correct
If i am deleting customer from stripe dashboard with an active subscription
I just tested and I see: customer.deleted and customer.subscription.deleted
Can you confirm me which event comes first ?
Stripe doesn't garentee the order of events: https://stripe.com/docs/webhooks/best-practices#event-ordering
Okey no issues! Reason for asking is when i am deleting any subscription i am handling customer.subscription.deleted event where in my db based on customer id i am doing some query. So if customer deleted event comes first i will clear that customer reference from db
This can happen, so you'll need to handle that case in your code.
It is possible , but if i am deleting a customer and i can get customer delete event i will just update according to that , if subscription deleted event comes first , i cant differentiate it is happended due to customer delete or subscription cancel
Is there any way i able to know customer subscription delete event fires due to delete of customer?