What Is an Idempotency Key?

An idempotency key is a unique token a client attaches to a request so the server performs the operation at most once, even if the request is retried after a timeout or a network failure. For payments it is the difference between a safe retry and a double charge. Autonomous agents retry aggressively and without a human to notice a duplicate, so an idempotency key on every state-changing call is a baseline requirement for agent-initiated money movement.

Guarantee
At-most-once execution under retries
Prevents
Double charges on a retried payment
Agent relevance
Agents retry without human oversight

Safe retries for machines

A network failure leaves a client unsure whether a request succeeded. A human pauses and checks; an agent retries. Without idempotency, that retry can charge twice, place two orders, or send two payments. With it, the server recognises the repeated key and returns the original result instead of acting again.

It is unglamorous and load-bearing: agent-initiated commerce is a stream of retried, unattended requests, and idempotency is what keeps that stream from doing damage.

Related standards

IETF — The Idempotency-Key HTTP Header Field

Questions

Is an idempotency key the same as a transaction id?

Related but distinct: the client supplies the idempotency key to make a retry safe; the server’s transaction id identifies the resulting record.

Which requests need one?

Any state-changing, non-idempotent operation — payments, orders, transfers. Pure reads do not need one.

Keep reading

related
What Is JSON-RPC?
related
How Do Autonomous Agents Pay?
related
Micropayments for AI Agents
related
Machine-Readable Invoices and Cryptographic Receipts for Agents
referenced by
What Is a Webhook?
Payments & Economic Agency
What Is an AI Agent Wallet?
Payments & Economic Agency
x402 and HTTP 402 for AI Agents
Payments & Economic Agency
What Is Agentic Commerce?
Payments & Economic Agency
What Is Machine-to-Machine Commerce?
Payments & Economic Agency
Why Stablecoins Fit AI Agent Payments
Payments & Economic Agency
What Is an Agent Marketplace?
Payments & Economic Agency
How Do AI Agents Negotiate Terms and Price?
Payments & Economic Agency
What Is Agent Escrow?
Payments & Economic Agency
Custodial vs Non-Custodial: Who Holds the Keys?

By Michael Gord · published 2026-10-09 · part of the Agentic Encyclopedia. Dates are the day of publication; events are cited at their own dates.