402 Payment Required: the server answers a first call with its price, the
client pays and calls again with proof of payment, and the server answers with
the data. On CCTools one route works this way, next to the API-key routes. You
need no key and no account, only a Canton wallet that can pay.
Keyed use is separate: get a key at cctools.network/profile/api and try every keyed endpoint at cctools.network/api-docs.
The paid route
The price lives in the route’s own
402 answer, and that answer is the
authority. Read it before you pay rather than relying on the figures above."0" means the exchange reported none.
How a paid call works
1
Call without paying
The route answers
402 with a PAYMENT-REQUIRED header: base64-encoded
JSON whose accepts array holds one entry per asset you can pay in. Each
entry’s amount is in atomic units with ten decimal places, so
1000000000 is 0.1.2
Sign a transfer for one entry
Your client signs a Canton transfer that matches exactly one entry, then
calls again with it in the
PAYMENT-SIGNATURE header, echoing that entry.
An x402 client does this step for you.3
Receive the data and the receipt
The facilitator checks the transfer and settles it on the ledger, and the
route answers
200 with the data and a PAYMENT-RESPONSE header that
carries the settlement receipt.Pay from an agent
FTP, which runs the facilitator, publishes a self-custody agent wallet with a command line client,@ftptech/canton-agent-wallet.
These steps follow
FTP’s agent guide and the package’s
README (version 2.3.1, read on 15 October 2026):
pay reads the 402, pays one entry and prints the answer. --max caps what
one payment may cost, in CC unless you pick another asset, and the wallet
refuses before it signs anything above it. To pay in USDCx or cETH instead,
add --asset USDCx (or cETH) and first opt in to spending that token with
CANTON_AGENT_PAYABLE_INSTRUMENTS, as FTP’s guide describes.
From code, the same package exports makePayingFetch, a fetch that pays any
402 it meets:
Machine-readable details
- The
402answer describes the route in the x402 Bazaar discovery format:extensions.bazaarholds the call (aGETwith no parameters), a JSON Schema of the answer and one example row, andresourcecarries a description with the price per asset. - The OpenAPI spec marks the
route with an
x-x402block: scheme, network, facilitator, the three headers, and the price per asset with the time it was read. - cctools.network/llms.txt lists the route for language models.
Answers and limits
- One route. The tickers route is the only paid route today.
- Payment first. The payment settles before the data is sent. When the
data is missing or its last good read is more than 30 minutes old, the route
answers
503before it asks for any payment. - Latency. FTP reports that a payment after the first usually completes in 10 to 25 seconds on mainnet; the first one after a cold start takes longer.
- Per call. Each call is priced and paid on its own. There is no subscription and no prepaid balance on the CCTools side.
