Jafar Sadhik works at Atoa, the UK Pay by Bank and card payments platform. Writes about taking payments, open banking and payment APIs for UK businesses and developers.
The timeout case is the one that bites. I'd store the refund record with its idempotency key before calling the provider, so a retried request finds the pending row and waits for the webhook instead of sending a second refund.
Paul Hartness
The timeout case is the one that bites. I'd store the refund record with its idempotency key before calling the provider, so a retried request finds the pending row and waits for the webhook instead of sending a second refund.