x402node
Precise, deterministic tools an LLM cannot guess — on-chain data, parsing, crypto, conversion, text and more — priced and structured for autonomous agents, settled trustlessly over x402.
01 Quick start
Install (JS / TypeScript)
npm i x402-fetch viem import { wrapFetchWithPayment } from "x402-fetch";
import { createWalletClient, http } from "viem";
import { privateKeyToAccount } from "viem/accounts";
import { base } from "viem/chains";
const account = privateKeyToAccount("0xYOUR_KEY");
const wallet = createWalletClient({ account, chain: base, transport: http() });
const pay = wrapFetchWithPayment(fetch, wallet);
const r = await pay("https://api.x402node.dev/chain/tx-decode?tx=0x...");
console.log(await r.json()); // 402 -> auto-sign EIP-3009 -> 200 + data Inspect from the command line
curl -i https://api.x402node.dev/dev/uuid
# HTTP/1.1 402 Payment Required
# the body carries the x402 payment terms (network, amount, asset)
# a paying client signs EIP-3009 and retries with the X-PAYMENT header Any x402-capable client or agent works — the protocol is plain HTTP. Python client and MCP server are on the way.
02 How it works
x402 is HTTP's native payment standard. The server returns 402 Payment Required with payment terms; the client signs an EIP-3009 authorization; the Coinbase CDP facilitator settles on Base; the request is fulfilled. End-to-end in roughly one second. No account, no key, no subscription — the agent simply pays per call.
03 Links
04 Get your API on x402
x402 onboarding service
Have an API or data feed you want agents to pay for? We handle the full x402 integration — payment gating, pricing, on-chain settlement, manifest and directory listing — and get you live and discoverable for autonomous agents.
business@cn402.com →