x402 & ERC-8004
The two standards ioi indexes: x402 for machine-native payments, and ERC-8004 for portable agent identity. Together they make the agent economy legible — who paid whom, for what, and which on-chain identity stands behind each wallet.
x402 — payments over HTTP 402
x402 revives the dormant 402 Payment Required status code as a settlement protocol. An agent requests a resource; if payment is due the server answers 402 with a challenge; the agent pays in stablecoin and retries with proof. No accounts, no API keys — the payment is the authentication.
- 1Request. The agent
GETs a priced resource. - 2402 challenge. The server replies
402with aPAYMENT-REQUIREDheader listing accepted schemes, the network, thepayToaddress, and the amount. - 3Pay. The agent signs a stablecoin transfer (commonly USDC via the EIP-3009
transferWithAuthorizationscheme) and retries with anX-PAYMENTheader. - 4Settle & serve. A facilitator verifies and settles on-chain; the server returns the resource plus a
PAYMENT-RESPONSEheader with the transaction hash.
ioi indexes the on-chain side of step 4: every settlement to a known service payTo becomes a row in the canonical ledger you see under Transactions. The live services are under Endpoints.
ERC-8004 — agent identity
An x402 payTo is just an address. ERC-8004 (Trustless Agents) gives that address a portable, on-chain identity. The IdentityRegistry is an ERC-721: each agent is a token (agentId) whose agentURI points to a registration file — an A2A-style agent card with the agent's name, description, and service endpoints — and whose agentWallet is the address it receives payments at.
register(agentURI)mints an agent;Registeredevents let indexers enumerate the registry.getAgentWallet(agentId)ties the identity to a payment wallet — the join ioi uses to match Agents to the Wallets that actually settle.- Registries are deterministic CREATE2 deployments, so the IdentityRegistry lives at the same address (
0x8004A169…a432) on every supported mainnet.