AI Agent Payment New Era: How do x 402, AP 2, and ERC-8004 jointly build the foundation of the machine economy?

PANews
AGENT2,54%

As AI Agents gradually evolve from tool-like attributes to autonomous economic entities, AIAgents become participants capable of independent decision-making, executing operations, and engaging in value exchange. However, traditional payment infrastructure cannot meet a series of core needs such as autonomous transactions, cross-ecosystem interactions, and verifiable identities for Agents.

These bottlenecks have driven the emergence of a new generation of protocols—the x 402, Agent Payments Protocol ( AP 2 ), and ERC-8004—building a reliable foundation for value exchange in the upcoming machine economy. This article will analyze the technical principles, application scenarios, and ecosystem status of these three major protocols, revealing how they collectively shape the future payment landscape of the AIAgent economy.

![] ( https://img-cdn.gateio.im/social/moments-f 8 a 84661 da 3 b 3223 c 824 ab 2 c 2 cadc 3 f 7 )

x 402: Native HTTP On-Chain Payment Protocol

x 402 was introduced by Coinbase, with its core innovation being the activation of the underutilized HTTP 402 status code (“PaymentRequired”), embedding payment logic directly into web request-response flows to enable “API calls as payments.” Settlement is completed using stablecoins or other cryptocurrencies, addressing the high friction of traditional payments.

Protocol Details

Since x 402 is an open protocol built on the HTTP 402 status code, its architecture follows a client/server model. The client is the buyer of services/products, and the server provides those services/products. Based on this client/server structure, Coinbase offers facilitators to simplify verification and settlement between buyers and sellers.

Taking Canza, the top-ranked server in the x 402 scan (which provides transaction information via AI), as an example: the user initiates a request from the client to access Canza’s paid service.

![] ( https://img-cdn.gateio.im/social/moments- 4 f 562918407 b 8 c 6 d 44 d 85 aaf 72 de 30 b 6 )

Next, Canza’s server responds with an HTTP 402 indicating a payment requirement: the client must provide an X-PAYMENT header and pay with USDC on the Base chain. The diagram below illustrates this:

![] ( https://img-cdn.gateio.im/social/moments- 72 db 5 ed 3693 dcad 8223 f 342 f 1 be 14558 )

After parsing the 402 Response JSON content, the wallet prompts the user to sign a TransferWithAuthorization message (implemented via ERC-3009). This message allows the signer to delegate a third-party EOA address or contract address to transfer USDC from the signer’s address without Gas fees. In this example, we delegate Canza’s recipient address 0x4e9bCe2547A9491b09ed092c433B19888e665edB to transfer USDC from our wallet.

![] ( https://img-cdn.gateio.im/social/moments-ced 25702 a 668725 f 0 d 611 e 908 bfaebb 0 )

The user signs this message, and the client submits the payload with the base64-encoded X-PAYMENT header. Upon receiving the payload, the facilitator ( Facilitators ) verifies it and settles the payment on the blockchain for the server. Once Canza confirms the payment, it provides the requested service to the user.

The operation flow of the x 402 protocol can be summarized as follows:

![] ( https://img-cdn.gateio.im/social/moments-aa 24950 f 66 af 54874 bd 099 ad 64 a 9 dbe 8 )

Notably, the x 402 protocol supports multiple blockchains (Base, Avalanche, and other EVM chains, Solana) and various crypto assets (requiring ERC-3009 support, default USDC) for payments, with only server-side configuration needed:

![] ( https://img-cdn.gateio.im/social/moments- 9 bef 6355 fe 7269 cc 5 ac 08 f 119377 c 363 )

( Agent Payments Protocol (AP 2): Trusted Payment System for the Agent Ecosystem

AP 2 is an open payment framework based on the Agent-to-Agent (A2A) communication protocol and the Model Context Protocol (MCP) extension. Its core goal is to address three key issues in Agent commerce: authorization verification (proving that the Agent has user permission), authenticity (ensuring transactions reflect genuine user needs), and transaction accountability (clarifying responsibility in disputes). This enables secure transactions between AIAgents and any compliant merchants.

The workflow of the AP 2 protocol revolves around digital mandates ) Mandates ###—tamper-proof, cryptographically signed digital contracts serving as verifiable evidence of user instructions. There are three types of mandates:

1. Intent Mandate ( Intent Mandate )

Used for automated transactions where the user is not present. The user pre-provides operational instructions to the AIAgent, including explicit conditions, such as “purchase concert tickets with a budget not exceeding 500 yuan.”

![] ( https://img-cdn.gateio.im/social/moments-a 370234 d 3 d 86 da 6913 cc 5 e 3338930569 )

2. Cart Mandate ( Cart Mandate )

Used for transactions confirmed in person. When the agent prepares specific goods and prices for user approval, it generates this mandate. The user signs the cart mandate, creating a secure, immutable record of the exact items and prices, ensuring “what you see is what you pay.”

![] ( https://img-cdn.gateio.im/social/moments- 720852 d 4 fe 6 f 0636 e 2 d 64271993973 ab )

3. Payment Mandate ( Payment Mandate )

An independent credential shared with the payment network and issuer, designed to convey information about AI Agent participation and user presence, aiding in dispute resolution, risk assessment, and regulation.

![] ( https://img-cdn.gateio.im/social/moments- 810 a 9480851 e 7 e 4 ef 2 a 7 ae 46 e 7 eb 4 e 24 )

( ERC-8004: Decentralized Identification and Reputation System for AIAgents

ERC-8004 is a decentralized identification solution on Ethereum for AIAgents, addressing issues of identity authenticity, behavior record reliability, and verifiability. Unlike AP 2, ERC-8004 focuses on building trust among AIAgents rather than transaction trust among users, AIAgents, and merchants.

ERC-8004’s design is based on three lightweight registries, each responsible for different trust aspects:

1. Identity Registry

Built on the ERC-721 standard with extended URIStorage functionality, enabling AIAgent identities to be compatible with existing NFT ecosystems.

![] ) https://img-cdn.gateio.im/social/moments- 7251 bc 0031726 b 9 d 8 d 1 acee 3 c 5257 ff 6 ###

Each AIAgent registers via the register function, obtaining a unique agentId (the ERC-721 tokenId). During registration, the agent provides a tokenURI pointing to its registration file, which follows a standardized JSON format containing the agent’s name, description, endpoints, and supported trust models.

2. Reputation Registry

Provides a standard interface for publishing and retrieving AIAgent service feedback, supporting a 0-100 rating system, tag classification, and payment proof linkage. It employs a hybrid on-chain/off-chain architecture, ensuring core data is on-chain for composability while complex aggregation is handled off-chain for efficiency.

![] ( https://img-cdn.gateio.im/social/moments- 3 f 55 c 5102 f 78 dd 664 faf 90 fceff 7 f 016 )

The reputation registry contract is tightly coupled with the identity registry—its deployment requires the address of the identity registry, ensuring only registered AIAgents can receive reputation records.

3. Validation Registry

Provides general hooks for requesting and recording independent validation results, supporting various mechanisms including economic staking (validators rerunning tasks) and cryptographic proofs (TEE proofs, zkML verification). This design allows different security requirements to coexist within the same ecosystem.

The validation registry’s contract interface is simple, mainly including two functions: ValidationRequest for submitting validation requests, and ValidationResponse for recording results.

ERC-8004 is the identity layer protocol for the AIAgent ecosystem. It provides verifiable identities, reputation systems, and registration mechanisms for on-chain AI Agents, forming a key foundation for building trust in the machine economy.

The combination of x 402, AP 2, and ERC-8004 constitutes a complete AIAgent payment system: ERC-8004 addresses the identity of AIAgents, x 402 solves the problem of “how to perform high-frequency micro-payments with cryptocurrencies,” and AP 2 offers a secure, standardized framework for the payment protocol. This setup establishes independent economic boundaries for AI Agents, enabling them to process information, hold and control assets, and truly participate in commercial value exchange—driving a new economy driven by autonomous machines.

View Original
Disclaimer: The information on this page may come from third parties and does not represent the views or opinions of Gate. The content displayed on this page is for reference only and does not constitute any financial, investment, or legal advice. Gate does not guarantee the accuracy or completeness of the information and shall not be liable for any losses arising from the use of this information. Virtual asset investments carry high risks and are subject to significant price volatility. You may lose all of your invested principal. Please fully understand the relevant risks and make prudent decisions based on your own financial situation and risk tolerance. For details, please refer to Disclaimer.
Comment
0/400
No comments