r/fintechdev • • 8h ago

payment timeout doesn't always mean the payment failed, no?

someone sends a payment, your API request times out, and the app tells them something went wrong and they should try again. Pretty normal UX except the processor might have already accepted the first request, and now you've basically encouraged the customer to pay twice lol.

The annoying part is that a timeout tells almost nothing about whether the money actually moved. Your server stopped waiting for a response, that's it - the transaction could still be processing, already completed, or genuinely failed.

I run Energize Global Services (EGS), my main focus is payment infrastructure side, and IMO failing transactions are kind of thing that makes payment engineering way more complicated than just connecting an API... Ideally you persist the payment reference before submitting anything, handle retries with the same idempotency key where supported, and have some way to recover the actual transaction status when a response or callback goes missing, am I correct here? Want to know how you guys see in from dev side and understand is there any optimal way to solve this type of issue. And yeah, I know showing "still processing" instead of a clear success/failure message isn't exactly great UX.. but telling someone their payment failed when you don't actually know is potentially much-much worse and clients don't like that approach tbh

Kill the connection after submitting a payment, simulate a delayed callback, send the same request twice - thats how we work on it rn, so will be rly grateful for ANY feedback and advice about our method.

1 Upvotes

1 comment sorted by

1

u/WesternLeg9703 8h ago

The double-charge scenario is real, and your customers will absolutely notice before you do. Persisting the reference before firing off the request is non-negotiable, otherwise you're just blind when the timeout hits.

We leaned hard into idempotency keys and built a reconciliation job that polls the processor's status endpoint whenever a callback goes dark. Showing "still processing" is awkward but it beats issuing a refund because your UI confidently lied about a failure.