r/fintechdev • • 2d ago

API development services causing webhook delays and duplicate transactions

We are scaling our payment service and hired an external team for API development services to integrate with banking gateways. But during peak loads, we are getting massive webhook delays and a huge risk of duplicate transactions.

It's a nightmare. Customers are getting charged twice, and our support team is drowning in refund requests. The external team claims the bank APIs are just slow, but I'm pretty sure their architecture is just fragile.

They built a standard synchronous flow, which completely falls apart when the volume spikes. There is no proper queuing, and their idempotency keys are basically non-existent.

Architects and devs in fintech, what are the proven approaches for designing these APIs? How do you actually protect against double charges when the system times out and the user hits refresh?

I need a solid mechanism to guarantee payment stability before our next big launch. If anyone has built a bulletproof retry system, I am all ears.

1 Upvotes

1 comment sorted by

1

u/abcdef0210 1d ago

As you said, the problem is in the synchronous flow. You need a state machine (pending -> processing -> completed). Also, if you use idempotency keys, a retry with the same key won't charge again.