/weather endpoint with two prices. Any payer can use the standard $0.01 tier. An agent can use the $0.006 tier only if it signs a human proof and its DID holds an ownership attestation.
Before you start
- Node.js 20.11.0 or later.
- An EVM address to receive payments.
- An x402 facilitator URL that supports Base Sepolia (
eip155:84532). The example useshttps://x402.org/facilitator. See the x402 facilitator docs for others.
@billionsnetwork/x402-human-proof-server 0.1.9, @x402/express 2.28 and Node.js 24. Payments are test payments on Base Sepolia. Pairings are checked on production, where the Verified Agent Identity skill records them. See Environments.
1. Create the project
.env file:
2. Write and run the server
The server code lives in the Server SDK reference:- Setup makes the server x402-compatible (Step 1), then adds human proof (Step 2). Already running x402? Go straight to Step 2.
- Complete Example has both steps in one
server.ts, with the command to run it and the402response you should see.
Learn more
x402 Human Proof
How human proof fits into the x402 payment flow, and a live demo.
Server SDK
Usage caps with
maxUse, events, storage, rollback hooks, replay protection, testing with an agent, and every option.