Idempotency
What is Idempotency?
Idempotency is a property of certain API requests where making the same request multiple times has the same effect as making it once. In the context of payments, it ensures that a customer isn’t charged twice if a network error occurs during a transaction.
Why It Matters
-
It prevents duplicate records and inconsistent data states in the event of network failures.
-
Idempotency allows clients to safely retry failed requests without worrying about unintended side effects.
-
It is a critical requirement for building reliable and fault-tolerant distributed systems.