x402 facilitator: how to charge per API call

An x402 facilitator is the missing piece of pay per API call billing: it verifies stablecoin payments so you can sell individual calls — 5¢, 1¢, any price — without accounts, API keys, or invoicing. NanoTab runs a public facilitator on Base mainnet at 2% managed (0.1% when you self-host).

1 · Protect your endpoint

Point your paid route at the NanoTab gateway (or self-host the verifier). Unpaid requests get a machine-readable 402:

{"code":402,"price":"0.05","asset":"USDC@8453","merchant":"0xYourWallet"}

Set price to anything ≥ $0.01. Human buyers see a wallet-pay card; agents handle the 402 programmatically.

2 · The gateway verifies, then proxies

  1. Buyer GETs your endpoint → gateway answers 402 with price, your wallet, and the USDC asset id.
  2. Buyer signs a USDC intent (EIP-191) and retries with an X-Payment header.
  3. Facilitator verifies — amount ≥ price, correct merchant, USDC on Base (8453), valid signature.
  4. On pass, the gateway proxies to your origin and returns the data. On fail, another 402 with the reason.

3 · Fee split, in words

Picture the buyer's 5¢ USDC transfer splitting mid-flight, atomically, in one transaction:

  1. 4.995¢ → you (the merchant wallet you configured). Settles instantly — no 2-day payout hold.
  2. 0.005¢ → protocol self-host (0.1%, 10 bps) · 0.1¢ on the managed gateway (2%).
  3. Zero fixed fee — unlike Stripe's 30¢, there is no per-transaction floor, so 1¢ prices stay profitable.

No invoices, no dunning, no chargebacks — push payments can't be reversed.

Why sellers choose per-call billing

FAQ

What is an x402 facilitator?
The service that verifies USDC payments for sellers — checking amount, merchant, asset, and signature — then proxies to the origin. NanoTab's public facilitator lives at gateway.nanotab.dev.
How do I charge per API call?
Return 402 with a machine-readable price. Buyers pay USDC and retry; the facilitator verifies and forwards. Minimum 1¢, fee 0.1% self-host (2% managed gateway).
How does the fee split work?
The fee (0.1% self-host, 2% gateway) is split atomically in the same transfer — you get the net amount instantly, no invoicing or payout delay.

Related: Cheaper than Stripe · Micropayments for APIs · Give your agent a wallet · nanotab.dev · GitHub