Idempotency keys in Go: the version that survives a double tap and a dead inverter
Customer taps Pay. The request goes out on a 3G connection in Onitsha, reaches our API, the charge succeeds, and the response dies somewhere on the way back. The app sees a timeout and retries. Without protection, that is two charges and one very angry customer calling the merchant, who calls us. Same thing happens when NEPA takes light in the middle of a request and the client's inverter takes three seconds to kick…