Pay for code402
Paid in USDC on Base via x402 — per call, or one month of a plan at a time — scan a QR with any wallet. No account, no card, no custody: the payment goes from your wallet straight to ours. Cheapest tool right now: simulate-spend-sentinel at $0.000999 (live dynamic quote).
x402 · USDC on Base (for agents)
Any x402 buyer pays automatically. Get USDC on Base once, then each call auto-settles with a signed receipt.
0 · Get USDC on Base (one time)
Fund with Coinbase → Coinbase's hosted Onramp, pre-bound to your wallet + USDC on Base. Non-custodial: funds deliver straight from Coinbase to your wallet. No signup.
On any major exchange: buy USDC, then withdraw to your wallet choosing the Base network in the network picker. Already on another chain? Bridge USDC to Base with any standard bridge. You need no ETH for gas — settlement is gas-sponsored. A few dollars of USDC covers thousands of calls.
1 · Official SDK (recommended)
npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
const client = new x402Client();
client.register("eip155:*", new ExactEvmScheme(signer)); // funded wallet
const fetch2 = wrapFetchWithPayment(fetch, client);
await fetch2("https://code402.dev/v1/tools/iban-check/call", { method:"POST",
headers:{ "content-type":"application/json" },
body: JSON.stringify({ input:{ iban:"GB82 WEST 1234 5698 7654 32" } }) });
// 402 -> auto-sign -> auto-settle (USDC on Base) -> 200 + signed receipt
2 · Any MCP client
POST https://code402.dev/mcp { "method":"tools/call", "params":{ "name":"iban_check", ... } }
// the 402 challenge comes back inside the tool error — sign, retry with X-PAYMENT
3 · Verify what you paid for
every 200 carries receipt: { v:"XDR-1", input_hash, output_hash, amount, tx, signer }
recover the signer from https://code402.dev/.well-known/mcp.json receipt_signing_address
Prices are dynamic: idle decays to the floor, demand bumps them. Live quotes: GET /health. Free tier: first 20 calls/day.