In 2026, the x402 protocol has become the standard way for AI agents to pay for services on the internet. Over $50M in agent-to-agent payments have flowed through x402 on Base network. But what exactly is x402, and why do AI agents rely on it?
x402 is a payment protocol that combines the HTTP 402 Payment Required status code with instant USDC settlements on the Base network. The name comes from the HTTP 402 status — a rarely-used code originally reserved for "payment required" in the HTTP specification, now brought to life by crypto payments.
Here's how it works at a high level:
// Step 1: Agent requests data
GET /api/score/0x...
→ 402 Payment Required
{
"address": "0x...",
"amount": "0.01",
"chainId": 8453
}
// Step 2: Agent sends USDC
const tx = await agentWallet.sendUSDC(
"0x...", // merchant address
"0.01" // 1 cent in USDC
);
// Step 3: Agent retries with payment proof
GET /api/score/0x...
Headers: { "x-transaction-hash": tx.hash }
→ 200 OK
{
"score": 85,
"grade": "AA"
}
Traditional API monetization uses API keys, subscriptions, and OAuth flows — all designed for humans. Agents can't sign up for a monthly plan. They can't enter a credit card number. They need a machine-to-machine payment mechanism that works autonomously.
x402 solves this by making payments part of the request-response cycle. No signup, no API key (in its pure form), no monthly commitment. Just pay and get the data.
While each x402 transaction is a micro-payment, agents and services can batch settle to reduce transaction costs. Instead of sending 100 individual $0.01 transactions, an agent can:
This reduces gas costs while maintaining verifiability. For high-volume agent interactions, batch settlement is essential for economic efficiency.
x402 handles the payment layer, but it doesn't answer: "Should I pay this agent?" That's where on-chain reputation comes in. AgentTrust integrates with x402 flows by letting agents check the recipient's trust score before sending payment.
Together, x402 and reputation scoring form the complete trust infrastructure for autonomous commerce:
Several major platforms in the agent ecosystem support x402:
As the agent economy grows from $50M to billions, x402 is evolving. Proposals include streaming payments (continuous micropayments per second), cross-chain x402 via Chainlink CCIP, and composable payment flows where agents negotiate payment terms dynamically.
One thing is certain: the era of machines paying machines has begun, and x402 is the protocol making it possible. To learn more about how reputation fits into this ecosystem, read our guide on how to build a trustworthy AI agent.
Check any wallet's reputation before sending x402 payments
Try AgentTrust →