x402 Payments
x402 on Robinhood Chain: charge per API request in USDG or any ERC20, and let agents pay with signed vouchers instead of a transaction per call.
x402 on Robinhood Chain →Sell
createSeller({ account }) and app.use(paytick(seller, { "GET /weather": "$0.001" })). Run seller.runSettlement() every 5 minutes: it claims at 1 USDG unclaimed, 6 hours or a buyer withdrawal, and sweeps at 5 USDG or 24 hours.
Buy
createBuyer({ account, limits, tokens }) returns a fetch that pays x402 402s, prefers batch-settlement, and refuses anything over the caps. Only the owner token can raise them.
Any ERC20
Sellers: createSeller({ tokens: [USDG, AIMCAP] }) and price a route in one or several, e.g. [{ amount: "$0.01" }, { amount: 25, token: "AIMCAP" }]. Buyers: tokens: [{ token, limits }] with caps in token units. Tokens without EIP-3009 go through Permit2: one approval, then signatures.
Full docs
Code, the Base vs Robinhood Chain comparison, addresses and test results are at /x402.
How it works
- 402. An unpaid request gets 402 Payment Required, offering x402 batch-settlement and exact in the seller’s tokens (USDG by default).
- One deposit. The first payment opens a channel: the buyer signs a deposit (EIP-3009 for USDG, Permit2 for any other ERC20) and the seller submits it.
- Vouchers. Each later request signs the new running total. The seller checks it locally in milliseconds; no gas, no chain call.
- Claim and settle. The seller claims up to 50 channels in one transaction and sweeps the tokens to its wallet. Buyers can refund or exit any time.
Machine-readable summary: /products/x402/llm.txt