#jack_lim4
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- jack_lim4-account-support, 49 minutes ago, 3 messages
- jack_lim4-account-support, 20 hours ago, 4 messages
- jack_lim4, 23 hours ago, 6 messages
Can you share the example Payment Intent (pi_xxx) with the behaviour you described?
pi_3OWuYxFPBYgm0zl21xszEcJU
In test mode with dispute test card, the dispute will happen immediately to simulate disputed transaction. In the case of pi_3OWuYxFPBYgm0zl21xszEcJU, charge.dispute.created and payment_intent.succeeded events were created at the same time on 2024-01-10 05:48:07 UTC. Stripe doesn't guarantee event ordering in this case: https://stripe.com/docs/webhooks#event-ordering
In live mode, this is very rare, but may still happen if the customer raises dispute to the issuing bank immediately.
Okay got it, so the best way is to fetch the charge to see if there's any dispute to confirm when this happens?
If the charge.dispute.* comes first, it means that the payment has been paid successfully, but a dispute happened. This can be logged in your system without additional check with Stripe. When payment_intent.succeeded event comes later, your system would have known a dispute is raised
I see, currently my system is updating my DB invoice status to "paid" if payment_intent.succeeded webhook event is received
So I think I could update my DB invoice status to "disputed" if charge.dispute.* webhook event is received. When payment_intent.succeeded webhook event is received, instead of updating the invoice status to "paid" mindlessly, I should check if my DB invoice status is "disputed", and only update to "paid" if it's not
Does this makes sense?
Yes, this sounds right to me
Okay, thank you river!