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.

  1. 1Request. The agent GETs a priced resource.
  2. 2402 challenge. The server replies 402 with a PAYMENT-REQUIRED header listing accepted schemes, the network, the payTo address, and the amount.
  3. 3Pay. The agent signs a stablecoin transfer (commonly USDC via the EIP-3009 transferWithAuthorization scheme) and retries with an X-PAYMENT header.
  4. 4Settle & serve. A facilitator verifies and settles on-chain; the server returns the resource plus a PAYMENT-RESPONSE header 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; Registered events 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.