How should I price an x402 API?
Short answer
Start with a flat price per call. The x402 documentation lists four common models: flat per-call pricing, different prices for different endpoints, up-to pricing where the buyer authorizes a maximum and pays for actual use, and batch settlement for very small amounts. Set the price above your cost per request plus the cost of settling the payment.
The four models
| Model | How it works | Scheme | Good for |
|---|---|---|---|
| Flat per call | Every request to a route costs the same | exact | Lookups, searches, conversions: work with a predictable cost |
| Tiered endpoints | Separate routes at separate prices, such as a basic and a detailed version | exact | Offering a cheap option and a thorough one |
| Up-to | The buyer authorizes a ceiling. You charge what the request actually used | upto | Model calls and anything whose cost you only know afterwards |
| Batch settlement | The buyer funds a balance and signs small vouchers that settle together | batch-settlement | Very many tiny charges |
These are the options the x402 FAQ gives for pricing an endpoint. Most sellers start with the first.
Working out a floor
Your price needs to cover three things.
- What the request costs you. Compute, and any upstream API you pay for.
- What settling costs. Each
exactpayment is one blockchain transaction. Someone pays for it, and if your facilitator charges, that is you. Coinbase's CDP facilitator, for example, lists the first 1,000 onchain transactions a month as free and $0.001 each after that. Other facilitators differ. See fees and gas. - Failures. Some paid requests will fail on your side and should not be charged.
If a settlement costs you a tenth of a cent, a price of a tenth of a cent earns nothing. That is the case batch settlement exists for: many small charges, one transaction.
How the price is written
In the reference middleware you write a dollar amount, and it is converted to USDC for you:
accepts: [{ scheme: "exact", price: "$0.001", network: "eip155:8453", payTo }]
In the 402 reply itself the price appears as a whole number in the token's smallest unit. USDC has six decimal places, so 1000 is $0.001.
With exact, the buyer must pay precisely that amount. There is no tipping and no rounding.
Practical advice
- Price per unit of value, not per unit of effort. A buyer compares your price to what the answer is worth to them, and to the next seller.
- Keep prices stable. Agents and their owners set spending ceilings. A price that jumps above a ceiling silently loses you the call.
- Say what the buyer gets. The
descriptionin your offer is what an agent reads to decide. A clear description does more than a low price. - Do not charge for errors. If your handler fails, do not settle. A buyer who pays for nothing will not return, and an agent may be told to avoid you.
- Offer more than one network. It does not change your price, but it widens who can pay it.
- Offer a free taste if you can. A free route or a sample response lets a buyer check quality before paying. x402 has no built-in trial, so this is something you add.
Plans, credits and subscriptions
x402 itself is pay per call. It has no plans or monthly billing. If you want those, the FAQ notes you can meter and aggregate usage in a separate billing system and use x402 only to collect the money.
Subscriptions are built into MPP, a related protocol, as one of its payment types.
Check what buyers see
After you set a price, paste your endpoint into the 402 checker. It shows the amount in dollars, the token and the network, exactly as a client reads them. A misplaced decimal is easy to make and easy to spot there.
Then look at how others in your category price. The services directory lists sellers, and the Bazaar lists endpoints with their prices.
Sources
- x402 FAQ
- Schemes overview, x402 documentation
- Coinbase CDP facilitator documentation
- Quickstart for sellers, x402 documentation
Facts checked against these sources on . Protocols change, so the official specification wins if it disagrees with this page. Read this page as Markdown.
Related questions
Who writes this. Ask402 is published by Havok Holdings LLC, which also runs Agent402, one of the x402 services covered here. Agent402 is labelled wherever it appears. Everything else is described from each project’s own documentation, and nobody pays to be listed.