Farebox is a one-command x402 paywall proxy. Drop it in front of any HTTP API or MCP server and agents pay you USDC on Base — or USDG on Robinhood Chain — per request, straight to your own wallet.
$ npx farebox --target http://localhost:8080 --pay-to 0xYourWallet --price 0.005
Cloudflare's Monetization Gateway, except it's open, self-custodial, works in front of anything, and you can use it today.
How it works
Farebox speaks the open x402 payment protocol over plain HTTP. No accounts, no API keys, no dashboard — just a proxy that charges a fare.
Any x402-capable client hits the Farebox URL like a normal HTTP request.
HTTP 402 Payment Required with x402 v2 payment requirements: price, asset, your payTo address.
The client signs a USDC payment on Base (or Base Sepolia for testing) and retries with the payment attached.
Farebox verifies, settles, and proxies the request upstream. USDC lands in your own wallet.
Features
Farebox never holds funds and never asks you to sign up for anything. It's a proxy, not a platform.
Payments settle directly to the --pay-to wallet you choose. Farebox never touches, pools, or escrows your money. There is no balance to withdraw because the money was never anywhere else.
With --settler-key, Farebox broadcasts the USDC transferWithAuthorization itself from your own gas wallet. No third-party facilitator, no API keys, no accounts. Gas on Base is a fraction of a cent.
A $5 VPS, a localhost tunnel, Railway, a Python script, an MCP server — if it speaks HTTP, you can put a fare on it. No Cloudflare account, no AWS, no waitlist.
Compatible with the open x402 standard (the Coinbase/Cloudflare x402 Foundation, now under a Linux Foundation body). Any x402-paying agent — including ones built on Cloudflare's Agents SDK — can pay a Farebox endpoint.
Comparison
The big clouds are building agent-payment gateways too. Here's where Farebox stands, plainly.
| Farebox | Cloudflare Monetization Gateway | AWS | |
|---|---|---|---|
| Works outside their cloud | Yes — any HTTP endpoint | No | No |
| Self-custodial | Yes — pays your wallet directly | No | No |
| Available today, no waitlist | Yes | No | No |
| Open source | Yes (MIT) | No | No |
| Per-request USDC to your wallet | Yes | No | No |
Cloudflare and AWS offerings as publicly described at time of writing. No affiliation or endorsement implied.
Quickstart
Install globally with npm i -g farebox, or just use npx.
# proxy localhost:8080 at $0.005/request, paid in USDC on Base
npx farebox --target http://localhost:8080 --pay-to 0xYourWallet --price 0.005
# optional: self-settle from your own gas wallet — no facilitator at all
npx farebox --target http://localhost:8080 --pay-to 0xYourWallet --price 0.005 --settler-key 0xGasWalletKey
import { wrapFetchWithPayment } from "@x402/fetch";
const fetchWithPay = wrapFetchWithPayment(fetch, walletClient);
// 402 is handled automatically: sign, pay, retry
const res = await fetchWithPay("https://api.example.com/data");
console.log(await res.json());
FAQ
402 Payment Required status code. A server answers 402 with payment requirements; the client pays (USDC on Base, in Farebox's case) and retries. It was started by Coinbase and Cloudflare and the x402 Foundation now sits under a Linux Foundation body. Farebox implements x402 v2.transferWithAuthorization — they never submit a transaction, so they need no ETH for gas. Settlement pays the gas: in self-settle mode that's your --settler-key wallet, and gas on Base costs a fraction of a cent.--pay-to. Farebox is non-custodial and never holds funds — there's no platform balance, no payout schedule, no withdrawal step. USDC lands in your own wallet per request.