Calling a flaky payment gateway: timeouts, retries and circuit breakers in .NET
Payment gateways time out, return 502s and go down for maintenance. Retrying blindly can charge a customer twice. Which calls to retry, which never to, and the .NET 10 code for both.