Idempotency keys for payment APIs: what we got wrong the first time
Last year we had a customer charged twice for the same EMI. Not a big amount, but the customer was right to be angry and our support team spent one full day itself on it. The root cause was not the bank, not the gateway. It was us, and the way we did idempotency keys. Sharing what we got wrong, because since then I have seen the same mistakes in two other codebases. What an idempotency key is supposed to do The…