HTTP 402 · x402 · USDC on Base

Put a toll on any API or AI tool.

Agents pay per call with x402. Paste a URL, set a price, get a link. No database. No signup.

HOW IT WORKS

Three steps. Zero accounts.

  1. 01

    Paste the upstream

    Any HTTPS API endpoint, or a remote MCP server over Streamable HTTP. Add a secret header if your upstream needs a key.

  2. 02

    Set price + wallet

    From $0.001 per call, paid in USDC on Base straight to your payout wallet. No middle account holds funds.

  3. 03

    Share the toll link

    Agents hit the link, get HTTP 402 with a price tag, sign a USDC payment and retry. The call goes through. You get paid.

TWO MODES

APIs and MCP tools

One link format, two kinds of upstream. Turnpike understands enough of MCP to keep discovery free.

API

Any HTTP endpoint

Pick a method (or ANY). Every call through the toll link costs your price. Query string, body, content-type and accept are forwarded; cookies and auth headers from the caller are stripped.

GET /t/…  → 402 PAYMENT-REQUIRED
GET /t/…  + PAYMENT-SIGNATURE → 200
MCP

Remote MCP servers

tools/list is free, tools/call is tolled. initialize, ping and notifications pass through without payment so agents can discover your tools before they spend anything.

tools/list  → 200 (free)
tools/call  → 402 → pay → 200

TOLL BOOTH — LIVE

Watch payments clear

Every row is a real x402 payment settled through this server, with a link to the transaction on Basescan. Nothing is seeded.

Explore listed tolls
TOLL BOOTH · LIVE
polls every 5s
  • Opening the booth…

Live from this server instance. Resets on redeploy. Every row links to its on-chain transaction.

FOR AGENTS

Pay a toll in a few lines

Agents use the official x402 client. The wrapped fetch sees the 402, signs a USDC authorization, retries, and returns the upstream response.

// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client, decodePaymentResponseHeader } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const signer = privateKeyToAccount(process.env.AGENT_PRIVATE_KEY as `0x${string}`);
const client = x402Client.fromConfig({
  schemes: [{ network: "eip155:*", client: new ExactEvmScheme(signer) }],
  spendControls: { maxAmountPerPayment: "$1" }, // default cap is $1 per call
});
const fetchWithPayment = wrapFetchWithPayment(fetch, client);

const res = await fetchWithPayment("https://turnpike.site/t/YOUR_TOKEN", { method: "GET" });
console.log(res.status, await res.text());

const receipt = res.headers.get("PAYMENT-RESPONSE");
if (receipt) console.log("paid, tx:", decodePaymentResponseHeader(receipt).transaction);

WHY STATELESS

The link is the whole config

Sealed link

Upstream URL, price, wallet and any secret header are encrypted with AES-256-GCM inside the token. Agents can't read the upstream, so they can't skip the toll. Tampering breaks the seal.

Nothing stored

No database, no accounts, no logs of your config. Payments go from the agent's wallet to yours through the facilitator. Lose the link and you make a new one.

Self-host it

One env var (TOLL_SECRET) and a Vercel deploy. Testnet works with a keyless facilitator; mainnet needs free Coinbase CDP keys.