Skip to content
route402.dev
Documentation
read as markdown

Pricing and settlement

How a dollar price becomes an on-chain amount, what settles when, and what is never charged for.

You price in dollars

Set a price per endpoint in US dollars — 0.001 means a tenth of a cent per call. The facilitator resolves that dollar amount to an asset and an atomic amount for the network you selected, and puts it in the accepts array of the 402 response.

Pricing in dollars rather than token units means the price does not move when the token does.

Networks

Network CAIP-2 Use it for
Coston2 eip155:114 Testing. Start here.
Flare eip155:14 Production.

Flare is already in the x402 default-asset registry, so a dollar price resolves on it without any special handling on the client side.

What settles, and when

Settlement happens after your upstream returns successfully, never before:

  • Your upstream returned 5xx or timed out. Nothing settles. The caller is not charged for your outage, and the upstream status is passed through unchanged.
  • Your upstream returned 4xx. It settles. The call was served exactly as the caller asked, and a bad request is the caller's fault.
  • Verification succeeded but settlement failed afterwards. The response is served and settlement retries. Exposure is tracked per payer and cut off past a limit.
  • The facilitator is unreachable. The gateway answers 402 and serves nothing. Failing open would give your API away for free.

Where the money goes

Straight to the payTo address on your service. x402 settles seller ↔ buyer directly; route402 is the index and the gate, not a merchant of record and not a party to the payment.

Publishing is blocked until payTo is set, because a listing without one quotes a price that cannot be paid.

Batching

Per-call on-chain settlement is uneconomic at a tenth of a cent. The x402 batch-settlement scheme addresses this: a buyer deposits once into escrow, each call carries a signed off-chain cumulative voucher — no transaction, no gas, no wait — and one periodic transaction claims many vouchers across many buyers.

Gas amortises across every payment in the epoch. The buyer's escrow deposit is also their spend cap, which is what makes autonomous agent spending safe by construction rather than by policy.