x402 is an open payment standard that lets an AI agent, or any HTTP client, pay for an API call inside the request itself. The server answers an unpaid request with the long-unused 402 Payment Required status code and a price; the client signs a payment, usually in a stablecoin such as USDC, and retries; the server checks the payment and returns the data. There is no account, no API key and no monthly invoice. The current specification is protocol version 2, and on November 12, 2026 Brave opened its Search API to x402 payments at $0.005 a request.
Why this is in the news
Brave announced on November 12, 2026 that its Search API now accepts "agentic payments via the x402 protocol". The post reached Hacker News the same day (150 points and 84 comments when we checked). Search demand for the protocol already exists: Google autocomplete suggests "x402 protocol", "x402 payment protocol", "x402 protocol ai payments" and "agentic payments protocol". Autocomplete shows that people type those phrases, not how many do.
How x402 works
The version 2 HTTP transport puts all protocol information in three headers, each holding base64-encoded JSON. A paid request goes like this:
- Request. The client calls the resource as normal, with no payment.
- 402 with a price. The server replies
402 Payment Requiredwith aPAYMENT-REQUIREDheader. It describes the resource and lists one or more accepted payment options in anacceptsarray. - Signed payment. The client picks an option, signs a payment for it and repeats the request with a
PAYMENT-SIGNATUREheader. - Verify and settle. The server, usually through a facilitator, verifies the signature and settles the payment.
- Resource and receipt. The server returns the resource with a
PAYMENT-RESPONSEheader saying whether settlement succeeded, the payer, the network and the transaction reference.
The transport document says response bodies are up to the server, because "all x402 protocol information is communicated through headers". Older material about x402 sometimes describes a JSON body or X-PAYMENT headers; check which protocol version a library implements before you rely on either.
What a payment requirement contains
Each entry in accepts is a small object. The required fields in version 2 are:
scheme: how the payment works, for exampleexact.network: the chain in CAIP-2 form, such aseip155:8453for Base mainnet.amount: the price in the token's smallest units, as a string.asset: the token contract address, or an ISO 4217 currency code for fiat.payTo: the recipient.maxTimeoutSeconds: how long the client has to complete payment.
The resource itself (its URL, a description, MIME type and optional service name and tags) sits once at the top level rather than in each option. That makes a 402 response readable by an agent deciding whether a call is worth paying for.
Schemes
A scheme defines how money moves. The repository README describes three: exact, which "transfers a specific amount", upto, which authorizes a maximum per request and lets the seller settle actual usage up to that cap, and batch-settlement, which uses escrow and off-chain vouchers so many small charges are settled on-chain together. The version 2 specification also lists auth-capture. Usage-priced services such as LLM inference are the obvious fit for upto.
Facilitators
A facilitator lets a seller accept x402 without running blockchain code. The specification gives it three endpoints: POST /verify, which checks a payment and "MUST NOT" commit any payment state, POST /settle, which commits it (usually by broadcasting a transaction), and GET /supported, which lists the schemes, networks and signers it handles. The README warns sellers not to assume that the public x402.org facilitator is the default production path for mainnet EVM routes. Brave runs its own.
Networks and assets
Stablecoins are the main use. On EVM chains the exact scheme uses EIP-3009 transferWithAuthorization by default (USDC supports it), with Permit2 as a fallback for other ERC-20 tokens and ERC-7710 for smart accounts with delegation. The specification also covers SPL tokens on Solana, and the SDKs include packages for EVM, Solana, Aptos and Stellar. The README says the standard aims to support fiat too, and the specification accepts fiat currency codes and network identifiers such as ach:us, but none of the specification pages we read defines a fiat scheme yet.
A worked example: Brave Search API
Brave's launch is a useful picture of x402 in production:
- Endpoint: a separate host,
search.agent.s.brave.app, with the same paths asapi.search.brave.com. Brave's guide says "the signed payment is the credential", so there is no API key. - What you can buy: web, LLM Context, news, image, video and local search. Answers, Autosuggest and Spellcheck still need an API key.
- Price: $0.005 a request ($5 per 1,000), following Brave's published API rates. The guide calls the 402 response "the authoritative price of a request".
- Payment: USDC on Base through Brave's own facilitator, with other networks and stablecoins described as coming soon and gas fees covered "for a limited time".
- Client: Brave points to purl, a command-line wallet from Stripe. Its
--max-amountflag caps the payment in the token's base units, so--max-amount 10000is $0.01.
That last flag is the important design detail. An agent should never pay whatever a 402 asks for; it should pay only up to a limit you set.
x402 vs API keys
With an API key, the buyer signs up, agrees terms, stores a secret and pays an invoice later. The provider knows who the customer is and can rate-limit or cut them off. With x402, each request carries its own payment, so an agent can use a provider it found a minute ago, and the provider gets paid before or as it serves the request. The trade-offs:
- Good for: pay-per-use data and tools, agents that call many small providers, and sellers who want to serve machine traffic without onboarding every customer.
- Less good for: high-volume steady usage, where a contract and a key are simpler and often cheaper; regulated or enterprise buyers whose finance teams need invoices and named suppliers; anything where you cannot hold or account for stablecoins.
x402 is a payment rail for API calls, not a shopping protocol. If you sell physical goods to agents, the questions in agentic commerce still apply.
The security model, and what it does not cover
The protocol has sensible protections. Each EIP-3009 authorization carries a random 32-byte nonce to prevent replay and a validity window with an expiry. The payer signs every authorization, and the EVM exact scheme says the facilitator "cannot modify the amount or destination". The README sets a rule that no scheme may let the facilitator or resource server move funds other than as the client intended.
What it cannot do is decide whether your agent should be paying at all. The risks for an agent builder are the familiar ones, with money attached:
- Prompt injection. A page or tool output can tell an agent to call a paid endpoint the attacker controls. Treat "pay this URL" like any other tool call driven by untrusted input; see what prompt injection is.
- Wallet key custody. If the signing key sits in the agent's environment, anything that can read that environment can spend from it. Keep the key outside the model's reach, behind a signing service or a sandbox boundary (agent sandboxing covers the pattern).
- No overall budget in the protocol. A per-request cap does not stop a loop of thousands of requests. Fund a dedicated wallet with a small balance, add a daily limit in your own code and alert on unusual spend.
- Price changes. The 402 response is the price at that moment. Log what each call cost, so the bill and your cost estimates can be reconciled.
Whether paying in stablecoins suits your company is a question for your finance and legal teams; it is outside what a protocol explainer can answer.
Should you use x402?
As a buyer (your agent pays for data or tools): try it where a provider you want offers it and the alternative is managing many small API accounts. Start on a testnet such as Base Sepolia, which the specification lists, then use a small, separately funded wallet with per-request and daily caps and an allow-list of paid hosts.
As a seller (agents pay you): it is worth a look if you have an API that agents would call in small amounts and you do not want to onboard each customer. Use a facilitator rather than settling on-chain yourself, publish prices in the 402 response, and keep your keyed API for customers who want invoices.
Skip it for now if you cannot hold stablecoins or your buyers need fiat invoicing. Fiat support is a stated aim, not a defined scheme yet.
How we approach this
When an agent we build needs to pay for something, we treat payment as a tool with its own guardrails: an allow-list of endpoints, hard per-call and per-day limits enforced outside the model, a signing key the model never sees, and a log of every charge. The same review we apply to any tool that acts in the world, covered in our AI agent security checklist, applies here, with a closer look at anything that moves money.
Sources: Brave, "The Brave Search API now accepts agentic payments via the x402 protocol" (November 12, 2026), Brave Search API agent payments guide, x402.org, x402 repository README (Coinbase development fork of the x402 Foundation repository), x402 specification, protocol version 2, x402 v2 HTTP transport, x402 exact scheme for EVM. All read November 13, 2026.