What is Idempotency?
Turkish: İdempotentlik (Ödeme Entegrasyonu)
Idempotency ensures a repeated API or payment request produces one intended result instead of duplicating the operation.
What is Idempotency?
Idempotency makes a critical request produce a single intended result even when it is sent more than once because of a network failure, user double-click, or provider retry. It is especially important for payments, order creation, invoice generation, and subscription renewal.
How It Works
The client adds a unique Idempotency-Key to each critical request. The server stores that key together with a fingerprint of the request body and the produced result. If the same key arrives again, the operation is not executed again; the server returns the previous response or rejects the call if the payload does not match.
For example, a user may press “Pay” and lose connectivity before the payment response reaches the browser. The application can retry the request. Without idempotency, the card might be charged twice. With the right design, the second request reads the existing payment result.
Design Considerations
Key lifetime, mismatched payloads under the same key, concurrent request races, and database locking behavior need explicit rules. The idempotency key is the practical mechanism, while an idempotent operation is one where repetition does not change the outcome.
Payment capture, shipping label creation, marketplace order import, and recurring payment flows commonly rely on idempotency.
Related Terms
An idempotency key is a unique token on retryable API requests that prevents duplicate payments, orders, or records.
IdempotentAn idempotent operation leaves the system in the same final state whether the same request runs once or several times.
Recurring Payment (Subscription Billing)A recurring payment automatically collects approved subscription or service fees from a customer at fixed intervals through a saved payment method.