Same idempotency key, different amount: the gateway returned the old charge
Found this in a basket flow where the customer could edit the cart after a failed payment attempt.
The client generated the idempotency key once per checkout session and reused it for every attempt. First attempt: $80, soft decline from the issuer. The customer removed an item and retried at $60 with the same key.
The gateway did what idempotency is supposed to do. It matched the key and replayed the stored response, which was the original decline for $80. The customer saw "declined" again, tried a different card, got the same replay, and then opened a ticket. Nothing reached the issuer on attempts 2 and 3. Our logs showed three POSTs and three failures, so it looked like three real declines.
Some gateways return a 4xx when the key matches but the body differs. Others just replay the first response, and you only notice if you compare the amount in the response to the amount you sent.
The fix was small. The key is now derived from order_id plus a hash of amount, currency and payment method, and the client asserts that the response amount equals the request amount before it trusts the result.
Does your gateway reject a mismatched body on a reused key, or does it replay silently? Did you find out in testing or in production?
Payneteasy runs this kind of gateway for PSPs and payment companies — see how it works.