Pay one request.
Watch it settle.
This page is wired to a real x402-protected endpoint. Anyone can pay it 0.000001 XNO and receive a hello world — request, sign, settle, serve. Exactly what your own API would do.
https://x402nano.org/api/x402/demoexact · nano:mainnetprice: 0.000001 XNOlive request console
same-origin · no api keyConsole idle — fire an unpaid request to watch the 402 handshake.▍
1.See the 402
Fire an unpaid request in the console — the endpoint answers 402 with a PAYMENT-REQUIRED header. That is the whole protocol, live.
2.Pay with your wallet
Run pay-demo.mjs: it signs a 0.000001 XNO send block with your seed and retries the request.
3.Get the hello world
The facilitator verifies the block, broadcasts it, and returns the content plus the on-chain transaction hash.
4.Watch it on the scanner
Your settlement lands in the public ledger below. The same feed every facilitator payment appears in.
Pay it yourself
how it works$ export NANO_RPC_URL=https://rpc.nano.to
$ node pay-demo.mjs
Needs a funded Nano account (any amount above 0.000001 XNO) and its private seed. The seed never leaves your machine — the script signs the block locally.
What a paid response looks like
200 · body
{
message: 'hello world — this
request was paid with x402',
paid: {
price: '0.000001',
blockHash: 'F2E5…',
sender: 'nano_1q…'
}
}response header
payment-response:
base64 { success: true,
transaction: 'F2E5…',
network: 'nano:mainnet' }on-chain
block F2E5… confirmed on nano:mainnet feeless — nothing skimmed
/api/x402/demoprice 0.000001 XNO · exact · nano:mainnetBuild it into your own API
The demo endpoint is a normal @x402/next route — the docs show the same pattern for your servers.