How paying per call works
x402 revives the HTTP 402 “Payment Required” status code. There is nothing to sign up for — the payment is the API key, and it settles on Base for each individual call.
Request. Call any endpoint with a normal GET request, like any REST API.
402 reply. The service answers HTTP 402 with the exact price for that call — never more than $0.02.
Sign. Your x402 client signs a USDC payment on Base. The signature is gasless — no ETH needed.
Data. Retry the same request with the payment attached and the JSON comes straight back.
// npm i x402-fetch viem — then this is the whole integration
import { createWalletClient, http } from "viem";
import { privateKeyToAccount } from "viem/accounts";
import { base } from "viem/chains";
import { wrapFetchWithPayment } from "x402-fetch";
const account = privateKeyToAccount("0xYOUR_PRIVATE_KEY");
const wallet = createWalletClient({ account, chain: base, transport: http() });
const fetchWithPayment = wrapFetchWithPayment(fetch, wallet);
// The 402 handshake, signing and retry all happen inside this call
const res = await fetchWithPayment(
"https://manteclaw-x402.fly.dev/defi/gas-tracker"
);
console.log(await res.json());
# Without a payment, every paid endpoint answers 402 with its price
curl -i https://manteclaw-x402.fly.dev/mcp/status
# HTTP/1.1 402 Payment Required
# payment-required: <base64 JSON> — decoded, it reads:
# { "x402Version": 2,
# "accepts": [{ "scheme": "exact", "network": "eip155:8453",
# "asset": "0x8335…2913 (USDC)", "amount": "10000",
# "payTo": "0xea0a…3175", "maxTimeoutSeconds": 300 }] }
# "amount": "10000" is $0.01 — USDC has 6 decimals.
# /health is free — no wallet needed, try it in any browser
curl https://manteclaw-x402.fly.dev/health
# { "status": "ok", "service": "x402-service", "version": "4.0",
# "network": "base", "rpc_connected": true, "endpoints": 200 }
Cheapest way to test a wallet setup end-to-end: GET /mcp/status at $0.01. Or skip the code entirely — connect a wallet at the top of this page and use any endpoint’s Pay & Call button below; the result comes back right on the card. Full developer docs are in the service README on GitHub.
What’s inside
Fifteen groups covering the questions apps and agents ask about Base all day — what’s a token worth, is it safe, what’s in this wallet, where’s the yield. Tap a group to jump to its endpoints.
Good first calls
The endpoints people usually start with — one free, the rest for a cent or less.
Full catalog
Every endpoint, exactly as published in the live machine-readable catalog. Endpoints marked “takes parameters” need a value in the path — an address, a transaction hash, a block number — where the {placeholder} sits.
Share it & plug it in
The live links developers and agent frameworks use to discover the service automatically.