topic
Verified 2026-09-18

Idempotency-Key

Idempotency-Key lets an API recognize retries of the same non-idempotent operation.

Accept a unique key for operations such as payment or order creation, store the first result, and return the same result for a safe retry according to the API contract.

httpapiretriesreliability

Reference (http)

POST /payments HTTP/1.1
Idempotency-Key: 7f3c2d2e-1a4e-4c8c-a65c-2b2f9b7d1e18

Accept a unique key for operations such as payment or order creation, store the first result, and return the same result for a safe retry according to the API contract.

Common mistakes

  • Using the same key for different operations or treating a key as a substitute for authorization.
Permalink: https://merginit.com/reference/http/idempotency-key