MAINNET POC·x402 over account blocks

A live demonstration on Zenon

x402 Pay for Content on Zenon

x402 is a way for a server to charge for a request. Ask without paying and the answer is 402 Payment Required with a price. Ask again with a signed payment attached and the answer is what you paid for. Here the payment is a Zenon transaction, and the server publishes it itself.

01 · The exchange

Secret content behind a 1 ZBTOKEN payment.

Ask for the content and the server answers 402 Payment Required with its price. Send the payment, and the same request returns the content.

  1. 01Requestask for the secret content
  2. 02402the server names its price
  3. 03Sendthe payment, covered by the demo
  4. 04Revealconfirmed, then shown
02 · The price

The 402 says what to pay.

The server’s 402 response lists the price, the token, the address to pay and the network. A program can read it and pay without a person in the loop.

Request the message to see the real 402.

03 · The payment

The server sends the payment to the network.

Our wallet signs a 1 ZBTOKEN payment, and your browser sends it with the second request. The server sends it to the network, waits until it is confirmed, then replies with the content.

Pay to see the payment.

Built on

The protocol is edgepillar/zenon-x402-poc. The wire format, the intent digest and the preflight are its design, ported here. It ships mock mode only; this page adds a pinned mainnet chain profile and settles for real. Its limitations still apply.