x402
Pay keylessly with x402
Prerequisites
- A wallet with USDC on Base
1. Trigger a 402
An unpaid metered call returns the price in machine-readable form.
ExampleIllustrative
HTTP/1.1 402 Payment Required
{ "accepts": [{ "scheme": "x402", "network": "eip155:8453",
"maxAmountRequired": "0.01", "asset": "USDC" }] }2. Pay and retry
Sign the payment and retry with an X-Payment header. The x402-kit does this for you.
ExampleIllustrative
# with @satelink x402-kit client
await x402fetch("https://rpc.satelink.network/rpc/polygon", { method: "POST", body });What you built: You paid for a call with no account, using only a wallet.