Charge AI agents for your API.
Permit402 puts a pay-per-call toll in front of any API or MCP server. Agents pay in USDC with x402, straight into your wallet. You set the prices. You don't change your code.
How it works
You get a gateway URL that sits in front of your existing API. Give agents that URL instead of your own. Everything about payment happens at the gateway.
- Point it at your APIAdd your API's URL, your wallet address and a price for each endpoint or MCP tool.
- Agents get a priceCalls to a paid endpoint get HTTP 402 with the price. x402 agents pay automatically.
- We forward the callOnce the payment checks out, the request goes to your API with a secret header so you know it came from us.
- You get paidThe payment only settles if your API succeeds. The USDC goes straight to your wallet.
Works with MCP servers too
Price individual tools. Agents see the price in the tool list, pay inside the tool call using the x402 MCP standard, and only pay when the tool succeeds.
| Your wallet, your money | Payments go directly to your address. We never hold your funds. |
| Failed calls are free | If your API returns an error, the payment isn't taken. |
| No double-spending | Each payment buys exactly one call, even under parallel retries. |
| Test first | Start on Base Sepolia test USDC, then switch to mainnet when you're ready. |
One header to check
Every request from the gateway carries your secret. Reject anything without it, so agents can't skip the toll by calling you directly.
// Express
app.use((req, res, next) =>
req.get("x-permit402-secret") === process.env.PERMIT402_SECRET
? next()
: res.status(403).send("Use the Permit402 gateway"));
// Who paid: req.get("x-permit402-payer")
Agents can find you
An API agents can't find earns nothing. Every gateway publishes itself in the formats agents look for, and you can be listed in our directory with one tick.
- llms.txt, made for youA plain summary of what you sell and how to pay, at your gateway's
/llms.txt. - DirectoriesOpt in to the Permit402 directory. Paid calls also describe themselves for x402 Bazaar.
- MCP RegistrySelling an MCP server? We write the
server.jsonfor the official MCP Registry. - Your own sitePaste one snippet into your website's llms.txt so agents use your paid API instead of scraping.
Questions
- Do I need to know about crypto?
- You need a wallet address on Base that can receive USDC. Coinbase and most wallet apps give you one. Agents do the paying; you just watch the balance.
- Can someone put a toll in front of an API that isn't theirs?
- Not for real money. Before a gateway can take mainnet payments, you prove you control the API by publishing a token at
/.well-known/permit402.txton its domain. - Which agents can pay?
- Any client that speaks x402 v2: the official x402 SDKs, x402 MCP clients and agent wallets built on them. Requests to paths without a price pass straight through, or you can choose to block them.
- What does it cost?
- Permit402 is free while in beta. We don't take a cut of payments.