
Tollbooth
An x402 payment gateway that turns any API into a paid endpoint — per-request USDC settlement, one YAML config, no API keys.
x402 payment gateway for APIs
Tollbooth sits in front of any HTTP API and gates it behind a per-request USDC payment using the x402 protocol. No subscriptions, no API keys, no billing database — the gateway returns 402 Payment Required with payment instructions, verifies the client's on-chain payment, and forwards the call upstream.
The problem
Most API providers want to charge per use, but the path from "I have an endpoint" to "I have billing" is months of work — auth, metering, invoicing, dunning. Tollbooth replaces all of that with a YAML file.
How it works
A reverse proxy intercepts incoming requests and enforces the payment gate. Pricing can be static per route, token-based for LLM APIs that bill per token, or fully custom via a TypeScript function. Discovery metadata is served at /.well-known/x402 so compliant clients can find the price automatically.
Developer surface
A single YAML config covers the common case. For anything bespoke, there are lifecycle hooks in TypeScript, OpenAPI import/export with pricing extensions, and pluggable settlement strategies (facilitator, nanopayments, MPP, or custom). Rate limiting and verification caching are built in.
Who it's for
API providers looking to monetise endpoints without standing up billing infrastructure, AI agent developers who need machine-to-machine payments, and anyone retrofitting pay-per-request pricing onto an existing service.