x402 Work Demo Base mainnet
A minimal paid API: POST /work with any JSON payload, pay
$0.001 USDC per call via the x402 payment
protocol, and receive the payload's SHA-256 digest with delivery deduplication.
It is the reference workload of the open-source
NEAR x402 Facilitator,
which settles USDC on NEAR and Base.
Try it
curl -i -X POST https://x402-demo-base.mikedotexe.com/work \
-H 'Content-Type: application/json' \
-d '{"hello":"x402"}'
- The unpaid call above returns
402 Payment Requiredwith aPAYMENT-REQUIREDheader (base64 JSON) describing the accepted payment. - An x402 client signs the payment and retries with a
PAYMENT-SIGNATUREheader. - The server settles through the facilitator and returns the digest plus a
PAYMENT-RESPONSEheader with the on-chain transaction.
This demo dual-emits: the canonical x402 v2 PAYMENT-REQUIRED header plus a legacy v1 JSON body for 0.x clients, and accepts both PAYMENT-SIGNATURE (v2) and legacy X-PAYMENT (v1) payments.
Payment details
| Price | 1000 atomic units = $0.001 USDC per call |
|---|---|
| Scheme | exact (x402 v2) |
| Network | eip155:8453 |
| Asset | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913Circle USDC (ERC-20) |
| Pay to | 0x7Ff46ab88688D528bCE3e59c470240c6901cF88c |
| EIP-712 domain | {"name":"USD Coin","version":"2"} |
| Indexed by | x402scan |
For agents & machines
| OpenAPI | /openapi.json — includes x-payment-info and x-guidance |
|---|---|
| Discovery | /.well-known/x402 |
| Paid endpoint | POST /work (only unpaid calls are free — they return 402) |
| Facilitator | https://base.x402.mikedotexe.com — see /supported |