Found this in a charge client with a 10 second HTTP timeout. The gateway usually answered in 1-3 seconds. During issuer slowness, a 3DS-less auth sometimes took 12-15 seconds.
Our code treated any exception the same way: mark the payment failed, show "payment failed, try again". The gateway had no idea we had given up. It finished the auth at second 13 and approved it.
Result: the customer clicks Pay again, gets approved a second time, and now holds two authorizations for one order. Support sees one failed attempt and one success. The issuer sees two holds. Roughly 1 in 400 attempts hit this during slow windows, which is small enough to hide for months.
The fix was a state, not a longer timeout:
- Timeout or connection reset after the request was sent means status = unknown, never failed.
- Send the same idempotency key on the retry, so the gateway returns the original result instead of starting a new auth.
- A reaper job polls the status endpoint by our merchant reference for anything stuck in unknown for more than 60 seconds, and resolves it to approved, declined, or voids the auth if the order has already moved on.
- The UI says "we're confirming your payment" instead of inviting a second click.
Only a clean decline response from the gateway is allowed to write failed.
How do you model unknown in your order state machine? Separate state, or a flag on pending?
Payneteasy handles this kind of payment flow for merchants and PSPs — see how it works.
Top comments (0)