x402 Payment Demo
Watch a real x402 payment happen on Radius.
The demo wallet signs an ERC-2612 permit, pays a seller endpoint, and settles on-chain — all in a few seconds.
1import { createX402Client } from "@stablecoin.xyz/x402/evm"23// Create a payment-enabled client4const client = createX402Client({ signer })56// Use it like fetch — 402 + permits handled automatically7const res = await client.fetch("https://api.example.com/data")8const data = await res.json()
That's it. The SDK handles 402, permits, and retries.
Live Flow
1
Check SBC balance
2
Request paid endpoint
3
Parse payment requirements
4
Sign ERC-2612 permit
5
Retry with X-PAYMENT header
6
On-chain settlement
7
Receive data
8
Balance diff