| Network | Asset (USDC) | PayTo address |
|---|---|---|
| eip155:1329 - SEI | 0xe15fC38F6D8c56aF07bbCBe3BAf5708A2Bf42392 | 0x3803A19280DeeFe533D177C4A169412BD341101b |
| eip155:8453 - Base | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 | 0x3803A19280DeeFe533D177C4A169412BD341101b |
| eip155:42161 - Arbitrum | 0xaf88d065e77c8cC2239327C5EDb3A432268e5831 | 0x3803A19280DeeFe533D177C4A169412BD341101b |
| eip155:56 - Binance Smart Chain | 0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d | 0x3803A19280DeeFe533D177C4A169412BD341101b |
| solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp - Solana | EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v | sLJ4uneGcD1mg6hKtkLYsY5HCw1nJ8GpNAmbzBWPBgk |
x402 - это открытый платёжный стандарт, который позволяет продавать доступ к контенту или результату работы сайта или сервера прямо внутри обычного HTTP-запроса. Продавать так можно всё, что ваш сервер умеет отдавать по запросу: ответы API, результаты вычислений, генерацию текста или изображений, доступ к базе данных, отчёты, аналитику, файлы, стримы - всё, что имеет смысл монетизировать за вызов.
Стандарт построен вокруг старого кода ответа 402 Payment Required, который десятилетиями существовал в спецификации HTTP, но почти не использовался. x402 возвращает его к жизни: теперь сервер может сказать клиенту «заплати, и получишь ответ» без аккаунтов, API-ключей и сессий.
Если вы продавец, x402 позволяет вам брать микроплатежи за каждый запрос к вашему API. Если вы покупатель - человек или AI-агент - вы можете автоматически оплачивать доступ к платным ресурсам без необходимости регистрироваться и вводить карточные данные.
На стороне клиента всё происходит в потоке из двух HTTP-запросов к серверу - в первом указывается желаемый товар и получается счёт с реквизитами, во втором отправляется подпись для оплаты:
Шаг 0. Откуда клиент узнаёт, что можно купить. Условно говоря, «документация» x402 - это сам ответ сервера. В базовом сценарии клиент не знает заранее ни цену, ни схему эндпоинта: он делает запрос и получает 402 с машиночитаемыми условиями. Этого достаточно, чтобы агент мог принять решение. Дополнительно сервис может публиковать discovery-манифест - например, каталог в Bazaar или /.well-known/x402, - чтобы агенты и агрегаторы могли находить его платные ресурсы и узнавать цену до первого запроса. Но это опция, а не обязательное требование протокола: даже без манифеста любой клиент может начать с обычного запроса.
Шаг 1. Запрос без оплаты. Клиент (например, AI-агент или ваше приложение) отправляет обычный HTTP-запрос к защищённому оплатой эндпоинту. В запросе нет никаких платёжных данных.
Шаг 2. Сервер отвечает 402 Payment Required. Сервер проверяет, что запрос не оплачен, и возвращает ответ с кодом 402. В этом ответе содержатся машиночитаемые условия оплаты: сколько стоит запрос, в каком токене и сети можно платить, на какой адрес кошелька должны поступать средства и сколько времени действует предложение.
Шаг 3. Клиент подписывает платёж. Клиент формирует платёжную авторизацию и подписывает её своим кошельком. На EVM-сетях обычно используется механизм вроде EIP-3009, который позволяет авторизовать перевод токенов подписью, не отправляя отдельную транзакцию и не платя gas.
Шаг 4. Клиент повторяет запрос с подписью. Подписанная авторизация прикрепляется к исходному запросу в заголовке PAYMENT-SIGNATURE, и запрос отправляется повторно.
Шаг 5. Сервер проверяет и рассчитывает платёж. Сервер может проверить подпись и завершить расчёт самостоятельно или через фасилитатора - сервис, который берёт на себя проверку и on-chain расчёт. Фасилитатор не хранит средства покупателя и не может изменить сумму или получателя: он лишь транслирует уже подписанный покупателем перевод.
Шаг 6. Клиент получает ответ. Если платёж прошёл, сервер возвращает запрошенный ресурс. Если запрос к источнику завершился ошибкой (4xx/5xx), расчёт пропускается, и покупатель не платит.
Если вы запускаете сервер, который продаёт ответы через x402, вы можете:
Что нужно, чтобы начать продавать:
Дополнительно: продажа MCP-tools. Если ваш сервер отдаёт не только HTTP-эндпоинты, но и MCP-инструменты (tools), x402 работает и там. Цикл тот же - клиент вызывает tool без оплаты, сервер возвращает требование платежа, клиент подписывает и повторяет вызов, после чего tool выполняется. Разница только в «упаковке»: вместо HTTP-заголовков используются поля MCP-сообщения. Для продавца это означает, что один и тот же кошелёк и одна и та же логика ценообразования могут обслуживать и REST-клиентов, и AI-агентов, подключённых по MCP.
Если вы хотите автоматизировать свои процессы или доверить выполнение задач агенту - научите его обрабатывать 402, и вы получите возможность:
402, подписывает платёж и повторяет запрос, если у него есть доступ к кошельку и бюджету.
Если ваш агент работает через MCP. Агенты, подключённые к инструментам по Model Context Protocol (Claude Desktop, Cursor и др.), могут покупать вызовы tools по той же логике. MCP-клиент вызывает tool, сервер возвращает ошибку с требованием оплаты, клиент подписывает платёж и повторяет вызов. С точки зрения покупателя разница только в «упаковке»: вместо HTTP-заголовков PAYMENT-REQUIRED / PAYMENT-SIGNATURE используются поля MCP-сообщения. Если вы уже дали агенту кошелёк и подключили x402-клиент для HTTP, для MCP-инструментов нужен совместимый MCP-сервер с поддержкой x402 - например, payclaw или аналогичный - который берёт на себя обработку требования оплаты и подпись.
Что нужно, чтобы начать покупать:
402, подписывать платёж и повторять запрос.Чтобы научить своего агента покупать:
402, подпишет платёж и повторит запрос.x402 is an open payment standard that lets you sell access to content or the output of a website or server right inside a regular HTTP request. You can sell anything your server can return on request: API responses, computation results, text or image generation, database access, reports, analytics, files, streams - anything worth monetizing per call.
The standard is built around the old 402 Payment Required response code, which has existed in the HTTP specification for decades but was rarely used. x402 brings it back to life: a server can now tell a client "pay, and you'll get the response" - with no accounts, API keys, or sessions.
If you're a seller, x402 lets you charge micropayments for every request to your API. If you're a buyer - a human or an AI agent - you can automatically pay for access to paid resources without signing up or entering card details.
On the client side, everything happens in a stream of two HTTP requests to the server - the first specifies the desired item and receives an invoice with payment details, the second sends the signature to pay:
Step 0. How the client knows what's for sale. Loosely speaking, x402's "documentation" is the server's own response. In the basic scenario, the client doesn't know the price or the endpoint schema in advance: it makes a request and receives a 402 with machine-readable terms. That's enough for an agent to decide. Optionally, a server can publish a discovery manifest - for example, a listing in Bazaar or at /.well-known/x402 - so agents and aggregators can find paid resources and learn the price before the first request. But this is an option, not a protocol requirement: even without a manifest, any client can start with a regular request.
Step 1. Request without payment. The client (an AI agent or your application, for example) sends a regular HTTP request to a payment-protected endpoint. The request contains no payment data.
Step 2. The server responds with 402 Payment Required. The server checks that the request hasn't been paid and returns a 402 response. That response contains machine-readable payment terms: the price of the request, the token and network you can pay in, the wallet address that should receive the funds, and how long the offer is valid.
Step 3. The client signs the payment. The client creates a payment authorization and signs it with its wallet. On EVM networks, a mechanism like EIP-3009 is typically used, which lets you authorize a token transfer with a signature - without sending a separate transaction or paying gas.
Step 4. The client repeats the request with the signature. The signed authorization is attached to the original request in the PAYMENT-SIGNATURE header, and the request is sent again.
Step 5. The server verifies and settles the payment. The server can verify the signature and complete settlement itself, or use a facilitator - a service that handles verification and on-chain settlement. The facilitator doesn't hold the buyer's funds and can't change the amount or the recipient: it only relays a transfer the buyer has already signed.
Step 6. The client receives the response. If the payment goes through, the server returns the requested resource. If the upstream request fails (4xx/5xx), settlement is skipped and the buyer doesn't pay.
If you run a server that sells responses via x402, you can:
What you need to start selling:
Bonus: selling MCP tools. If your server exposes not only HTTP endpoints but also MCP tools, x402 works there too. The cycle is the same - the client calls a tool without payment, the server returns a payment requirement, the client signs and repeats the call, and the tool executes. The only difference is the "packaging": MCP message fields are used instead of HTTP headers. For a seller, this means the same wallet and the same pricing logic can serve both REST clients and AI agents connected over MCP.
If you want to automate your processes or delegate tasks to an agent - teach it to handle 402, and you'll be able to:
402, signs the payment, and repeats the request, provided it has access to a wallet and a budget.
If your agent works over MCP. Agents connected to tools via the Model Context Protocol (Claude Desktop, Cursor, and others) can buy tool calls using the same logic. The MCP client calls a tool, the server returns an error with a payment requirement, the client signs the payment and repeats the call. From the buyer's perspective, the only difference is the "packaging": MCP message fields are used instead of the PAYMENT-REQUIRED / PAYMENT-SIGNATURE HTTP headers. If you've already given your agent a wallet and wired up an x402 client for HTTP, MCP tools need an x402-compatible MCP server - such as payclaw or an equivalent - that handles the payment requirement and signing.
What you need to start buying:
402, sign the payment, and retry the request.To teach your agent to buy:
402, sign the payment, and retry the request.This server also exposes an MCP endpoint - AI agents (Claude, Cursor, etc.) can discover and call endpoints as native tools.
| Tool | Payment | Description |
|---|---|---|
search_endpoints |
🔓 FREE |
FREE search for paid API endpoints (x402) by task in natural language.
Pass query (the planner splits it) or pre-split queries[].
Returns a plan[] with candidates; each candidate contains a routeId.
To execute - pass routeId to call_endpoint, do not call the URL directly.
Optional budget.maxTotalPrice and maxRoutesPerQuery (1–5, default 3).
|
call_endpoint |
💰 paid |
Executes an endpoint found via search_endpoints.
Accepts routeId + arguments.
Accepts USDC on Arbitrum, Base, BNB, Solana, SEI.
|
buy_gift_cards |
💰 paid |
Simple direct way to buy a digital gift card (Amazon, Steam, Apple, Netflix, Google Play, PlayStation, Xbox, IKEA, Airbnb, …) via natural language.
the agent must sign and retry with _meta["x402/payment"].
Accepts USDC on Arbitrum, Base, BNB, Solana, SEI.
|
get_day_summary |
🔓 FREE |
"Morning brief" in one call: current weather, S&P 500 / Dow / NASDAQ, BTC/ETH/SOL with 24h change, top-5 news.
Optional weatherreg (city) and newsreg (2-letter country code).
Rate limit: 20 calls / 5 min per agent.
|
get_my_history |
🔓 FREE |
Read-only access to your own successful paid calls history.
Pass buyerID - the 8-char hex value of meta.yourID from any successful paid response e.g. https://x402helper.xyz/test-billing or or via the MCP tool `call_endpoint` (e.g. routeId `34f3gf:r1`).
Returns aggregate counters + per-route events (timestamp, endpoint, network, amount, facilitator, params).
Rate limit: 15 calls / 10 min per IP.
Also viewable in browser: getmyhistory.html
|
{
"mcpServers": {
"x402helper": {
"url": "https://x402helper.xyz/mcp"
}
}
}
Ask anything - get structured data.
One API, any request, paid by microtransactions.
describe what you need → pay with USDC → get structured data
Add your paid endpoints to x402 bazaar so AI agents can discover them via x402 / A2A.
Fields marked * are required.
Click a button to send request...
/.well-known/x402.json
| Endpoint & method | Description | Price / asset | Network details |
|---|---|---|---|
| Loading configuration from x402.json... | |||
| Network | Asset (USDC) | PayTo address |
|---|---|---|
| eip155:1329 - SEI | 0xe15fC38F6D8c56aF07bbCBe3BAf5708A2Bf42392 | 0x3803A19280DeeFe533D177C4A169412BD341101b |
| eip155:8453 - Base | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 | 0x3803A19280DeeFe533D177C4A169412BD341101b |
| eip155:42161 - Arbitrum | 0xaf88d065e77c8cC2239327C5EDb3A432268e5831 | 0x3803A19280DeeFe533D177C4A169412BD341101b |
| eip155:56 - Binance Smart Chain | 0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d | 0x3803A19280DeeFe533D177C4A169412BD341101b |
| solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp - Solana | EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v | sLJ4uneGcD1mg6hKtkLYsY5HCw1nJ8GpNAmbzBWPBgk |