#Leonardogranetto99-Invoice
1 messages · Page 1 of 1 (latest)
Hi, this is a common ask and it's correct that we can't guarantee the events order, in case they are generated simultaneously. We actually do send them in order, but still it's affected by the network between Stripe and your server, internet etc, which is ultimately impossible to guaranteed. That's why you are seeing they works in most cases, but there are cases they comes in reversed orders
My advice is try to build your webhook handler in a graceful way that can handle both cases
Like, listen to payment_intent.succeeded only and take the Invoice information from there
what about the invoice.payment_succeeded event. This event refers the payment_intent. What is the difference between that event and the payment_intent.succeeded event?
Well they are mostly identical in your use case. In other usecase, i.e. a PaymentIntent is created without an Invoice, there will be only payment_intent.succeeded triggered
The order is still off. Looks like its off every time. It doesn't seem to be a random thing
I guess I'll have to work with the invoice.payment_succeeded event then.
👍