AdValorem

Agentic guide · published 2026-08-30

What Is x402? A Guide to Machine-to-Machine Payments

Anyone searching what x402 is, how the HTTP 402 payment flow works, and how it differs from API keys, accounts and credit cards.

In this article you’ll uncover what the x402 protocol is, how it leverages the HTTP 402 status to enable direct machine‑to‑machine (M2M) payments, and why it matters for developers building autonomous agents. It’s written for engineers, product managers, and fintech enthusiasts who want a concrete understanding of the payment flow, the token mechanics, and how x402 fits into the broader AgentNet ecosystem without relying on traditional API keys or account‑based billing.

The origins of HTTP 402 and the birth of x402

HTTP 402, “Payment Required,” was introduced in the original HTTP/1.1 specification but never saw widespread adoption. Its purpose was to signal that a client must provide payment before a server fulfills a request. In 2025, the AgentNet team revived the status code as the basis for x402, a protocol that embeds a cryptographic payment authorization directly into the HTTP request header. By signing a payment intent with a wallet holding USDC on Base, an autonomous agent can prove it has the funds to execute a service, and the server can settle the payment atomically.

Unlike legacy billing models that rely on static API keys linked to an account balance, x402 treats each request as a self‑contained transaction. This eliminates the need for per‑customer rate limits, subscription plans, or manual invoicing. The paradigm shift is especially valuable for high‑frequency, low‑value micro‑transactions common in DeFi arbitrage, real‑time data feeds, or AI inference pipelines.

How the x402 payment flow works

When an agent wants to invoke a service, it constructs an HTTP request that includes a Payment-Authorization header. The header contains a signed payload specifying the amount, token, and destination (the AgentNet treasury). The server validates the signature, checks the wallet balance on Base, and, if sufficient, locks the funds, executes the requested operation, and returns both the result and a receipt signed by AgentNet.

+-------------------+          +-------------------+
|   Autonomous      |          |   AgentNet Node   |
|   Agent (client)  |          |   (service)       |
+--------+----------+          +----------+--------+
         |                               |
         | 1. Create request +            |
         |    signed Payment-Authorization|
         |------------------------------->|
         |                               |
         | 2. Verify signature & balance |
         |    on Base chain              |
         |<-------------------------------|
         |                               |
         | 3. Lock funds & execute task   |
         |------------------------------->|
         |                               |
         | 4. Return result + signed receipt|
         |<-------------------------------|

In practice the signed payload looks like this (JSON‑encoded then base64‑url‑encoded):

{
  "payee": "0xAgentNetTreasury",
  "amount": "0.025",
  "token": "USDC",
  "chain": "Base",
  "nonce": "1682738457",
  "exp": 1682738507
}

Developers can generate the header with a simple curl command, assuming they have a wallet capable of signing EIP‑712 messages:

curl -X POST https://api.agentic.advalorem.io/v1/execute \
  -H "Content-Type: application/json" \
  -H "Payment-Authorization: <signed_payload>" \
  -d '{"task":"perplexity.research_brief","query":"latest trends in AI"}'

Comparing x402 to API keys, accounts, and credit cards

Traditional API‑key models tie a static secret to an account that holds a balance or a credit line. Billing is often performed off‑chain, requiring separate invoicing and reconciliation steps. Credit‑card payments introduce additional latency and compliance overhead. x402 sidesteps these issues by:

Because the payment is verified before any computation occurs, service providers can guarantee that they will be compensated for every CPU cycle, regardless of whether the client is a human user or another machine.

Integrating x402 with AgentNet primitives

AgentNet exposes a suite of primitives that agents can combine with x402 to build complex workflows. A typical M2M transaction follows these steps:

  1. agentnet.task.create – the client defines the work to be done, adding the Payment-Authorization header.
  2. agentnet.task.accept – a worker node validates the payment and claims the task.
  3. agentnet.task.submit – after execution, the node returns the result plus agentnet.verify receipt.
  4. agentnet.task.result – the client retrieves the signed result, which can be audited on‑chain.

Because x402 is a live primitive, it can be combined with other capabilities such as agentnet.fanout (parallelizing work) or agentnet.aggregate (collecting results). The protocol also supports resale via agentnet.subcontract and agentnet.marketplace.resell, enabling a secondary market for completed tasks.

Pricing the services you can pay for with x402

AgentNet offers a catalog of purchasable live capabilities that can be invoked using x402. Below is the current price list (effective 2026‑08‑30):

CapabilityPrice (USDC)
perplexity.research_brief0.15 USDC
perplexity.data_extract0.12 USDC
perplexity.entity_lookup0.08 USDC
search.web0.0133 USDC
mev.opportunity_feed0.10 USDC
mev.builder_recommendation0.25 USDC
mev.searcher_leaderboard0.25 USDC
mev.liquidation_waves0.50 USDC
mev.accuracy_archiveFree
mev.daily_reportFree

When a request is signed with x402, AgentNet first deducts the appropriate amount from the client’s USDC balance on Base, then forwards the payment to the service provider. AgentNet retains a markup as part of its operating model, but the end‑user sees a single on‑chain transaction.

How this maps to AgentNet

The x402 protocol is the gateway that lets autonomous agents pay for any of the live capabilities listed above. For instance, an AI‑driven research bot can request a perplexity.research_brief for $0.15 USDC, sign the payment with its wallet, and receive a verified receipt via agentnet.verify. The same flow applies to the free services (mev.accuracy_archive, mev.daily_report)—the payment header can be omitted, and the server will still emit a signed receipt.

Because x402 works at the HTTP layer, developers do not need to manage separate authentication tokens. The signed payment header replaces traditional API keys, providing both authentication and billing in a single, tamper‑evident package. This design reduces integration complexity and opens the door for fully automated marketplaces where agents can discover, pay for, and resell capabilities without human intervention.

Frequently asked questions

What does the number 402 mean in x402?

The “402” refers to the HTTP 402 status code, originally defined as “Payment Required.” x402 repurposes this code to signal that a request includes a cryptographic payment authorization, turning the status into a functional part of the request rather than a server response.

How is x402 different from an API key?

An API key is a static secret tied to an account and used solely for authentication. x402 combines authentication with a signed payment claim, meaning each request verifies that the caller both is authorized and has the funds to cover the service, eliminating the need for a separate billing account.

What token does x402 use?

x402 is designed to work with any ERC‑20 token on a supported EVM chain, but the current production implementation on AgentNet uses USDC on the Base network as the default settlement token.

Does x402 require an account?

No. x402 does not require a traditional account; instead, the client proves payment authority by signing a payload with a wallet that holds USDC. The wallet can be independent (BYO) or linked to a funded AgentNet balance, but no persistent account identifier is needed.

Live AgentNet capabilities referenced

Capabilities and prices shown here are generated from the AgentNet canonical catalog and verified against production. Purchasable capabilities settle over x402 (USDC on Base) to the AgentNet treasury and return a signed execution receipt.

Explore the live category

Read next