OpenClaw
ClawHub skillHand an OpenClaw agent a budget-bound wallet across every major chain. Install the ClawHub skill or add one mcp.servers entry — the eight piprail_* tools appear, capped by a spend policy.
clawhub install piprail Open x402 standard · verified live on mainnet
Any API charges for itself — any AI agent pays on its own. One line, every chain, straight to your wallet. No backend, no fee.
Live on every major chain
AI agents now earn and spend on their own — buying data, paying for compute, selling their work. But money online still assumes a human with a credit card, scattered across dozens of blockchains that each settle differently. An agent can’t swipe a card, and no endpoint can charge across them all.
The fragmented world
29 chains — each its own tokens, signing & gas
PipRail
one adapter · one line
The payoff
charges for itself · pays on its own
Name a chain — PipRail handles the token, the signing, the proof. One line, every chain, straight to your wallet. No backend, no custody, no fee.
The same package lets a server charge for a route and an agent pay for one. Pick your side — both are a couple of lines.
Gate any route so it charges for itself. Express, Next.js, or any edge runtime — no backend, no database.
import { requirePayment } from '@piprail/sdk'
app.get('/report',
requirePayment({
chain: 'solana',
token: 'USDC',
amount: '0.05',
payTo,
}),
(req, res) => res.json({ data }),
) Point an agent at a paid URL and it pays the 402 on its own — inside a budget it can’t exceed.
import { PipRailClient } from '@piprail/sdk'
const client = new PipRailClient({
chain: 'bnb',
wallet: { key: process.env.KEY },
})
// On a 402: pays, then retries.
const res = await client.fetch(url) Build a real 402 challenge and watch an agent price it — live, client-side, no install. The SDK loads from a CDN right on the page.
{
"amount": "50000",
"asset": "0x8335…2913",
"payTo": "0xYourWallet"
} One x402 line, one self-custodial driver per family — the same integration pays and gets paid across all 10 families, native coin or stablecoin. And PipRail reaches chains no other x402 SDK touches: TON, Tron, NEAR, Sui, Aptos, Algorand, Stellar & the XRP Ledger, alongside every major EVM chain.
+ 9 more families — each a native, self-custodial driver
Need a chain we don’t ship? Pass a { id, rpcUrl } —
any EVM chain works, no allowlist. Browse every chain →
A four-step round trip over plain HTTP. No facilitator, no custody. See the full flow →
Agent calls your route
It gets back a 402 quote — price, token, payTo, chain.
Agent pays on-chain
One transfer, straight to your wallet. PipRail never touches the funds.
You verify locally
Your server checks the tx against your own RPC: succeeded, recent, right amount + recipient.
You return the data
200 OK — and the same proof can never be spent twice.
x402 is the open payment rail the agent economy is converging on — and PipRail speaks it without ever putting anyone in the middle. Funds settle to your wallet, verified against your own RPC. Nobody to rate-limit you, take a cut, or shut you off — yet any x402 client in the world can still pay you.
Nobody in the middle
No facilitator, no relayer, no custody. The payer broadcasts their own transfer; you verify it against your own RPC. Funds land straight in your wallet — no one can take a cut, throttle you, or shut you off.
The open standard
x402 was donated to the Linux Foundation — the neutral rail the agent economy is converging on. PipRail’s envelope is v2-conformant, so any x402 client — Coinbase’s, the reference client, anyone’s — can pay your gate.
One gate, both rails
Advertise the backendless onchain-proof rail and the ratified exact (EIP-3009) rail at once — standard clients pick one, PipRail clients the other. Proven end-to-end against the official x402 reference client on Base mainnet.
Drop PipRail into the frameworks agents are built in — no payment code.
Each one wraps what already ships — @piprail/mcp or
@piprail/sdk — so the agent gets a budget-bound wallet straight to your own.
Hand an OpenClaw agent a budget-bound wallet across every major chain. Install the ClawHub skill or add one mcp.servers entry — the eight piprail_* tools appear, capped by a spend policy.
clawhub install piprail
Hand a Hermes agent a budget-bound wallet across every major chain. One command and the eight piprail_* tools appear — no facilitator, no fee, capped by a spend policy.
hermes mcp add piprail --command npx --args -y @piprail/mcp
Hand an elizaOS agent a budget-bound wallet across every major chain. Add one plugin and it gets six native payment actions — pay, quote, plan, discover, budget, guide — no facilitator, no fee, capped by a spend policy.
npm i @piprail/elizaos-plugin
Pay x402 URLs from any n8n workflow. Install one community node and a PipRail node appears with four operations — pay, plan, quote, estimate cost — callable by n8n AI Agent nodes and capped by a spend policy. EVM chains, no facilitator, no fee.
@piprail/n8n-nodes-piprail
The first x402 payment integration for Mastra. Wire @piprail/mcp in through Mastra's MCPClient and an agent gets all eight PipRail tools — pay, plan, quote, discover, budget and more — capped by a spend policy. Every chain, no facilitator, no fee.
npx -y @piprail/mcp x402 lets your endpoint charge — PipRail makes it discoverable, built on the open x402 indexes that already exist. No registry, no database, no fee — nothing PipRail-hosted. Three opt-in moves:
Emit
Turn your gate’s config into a crawlable /openapi.json — a static file on your own origin.
Register
client.register(url) lists you on 402 Index — no auth, no signature, no fee.
Discover
client.discover({ query }) reads the open indexes so an agent finds what to pay.
PipRail is an open-source (MIT) TypeScript SDK for x402 crypto payments. It lets any HTTP endpoint charge for itself, and lets AI agents pay for APIs on their own — across 29 chains, with no backend, no database, no account, and no fee. Payments settle straight to your own wallet, verified locally against your own RPC. It ships as two packages: @piprail/sdk (the library) and @piprail/mcp (an MCP server that hands any AI agent a budget-bound wallet). It also does x402 discovery, so endpoints can be registered on open indexes and found by agents.
x402 revives the dormant HTTP 402 "Payment Required" status code as a real payment protocol. A server answers a request with 402 plus a machine-readable challenge (price, token, chain, pay-to address); the caller pays on-chain and retries with proof, and the request goes through. It lets an HTTP endpoint charge for itself — no API keys, accounts, or invoices — which is exactly what AI agents need to pay for data and compute autonomously.
Wrap the agent's HTTP calls with PipRailClient. Give it a wallet and a chain, then call client.fetch(url): on a 402 it reads the challenge, sends the payment on-chain, waits for confirmation, and retries with proof — automatically. An opt-in spend policy (maxAmount, maxTotal, chains, tokens, hosts) refuses out-of-bounds calls before any send, and paymentTools(client) hands the same to an LLM via MCP or function-calling — budget-bound so it can't overspend.
Install the PipRail MCP server: add a small config block to your MCP client (Claude Desktop, Cursor, Claude Code, Windsurf, VS Code, or Cline) that runs "npx -y @piprail/mcp" with your wallet key, chain, and spend caps. The agent gains eight tools — piprail_discover (find payable APIs), piprail_quote_payment, piprail_plan_payment, piprail_pay_request, piprail_register (list its own), piprail_budget (read its remaining budget), piprail_guide (the agent contract), and piprail_verify_receipt (re-verify a payment receipt on-chain) — so it finds and pays x402-gated APIs on its own across 29 chains. It runs locally with your own wallet, and the spend policy is enforced before any on-chain send, so the model literally cannot overspend.
29 chains across 10 families: 20 EVM mainnets (Ethereum, Base, Arbitrum, Optimism, Polygon, BNB Chain, Avalanche, HyperEVM, Monad, Mantle, Sonic, Linea, Scroll, Celo, zkSync, Unichain, World Chain, Sei, Injective, Kaia) plus Solana, TON, Tron, NEAR, Sui, Aptos, Algorand, Stellar, and the XRP Ledger. USDC almost everywhere, USDT on most chains, EURC on Stellar, RLUSD on XRPL, the native coin on every chain, or any other token by address. One parameter — chain — picks everything.
No. PipRail charges no fee and takes no cut. It's an open-source (MIT) npm package, not a platform or hosted service. Payments settle straight into your own wallet — there's no PipRail backend, facilitator, or middleman in the path. You pay only normal network gas on whichever chain you choose.
Yes. PipRail's wire envelope is x402 v2-conformant, and a gate can opt into advertising the ratified "exact" (EIP-3009) scheme alongside its default backendless "onchain-proof" rail. A standard x402 client (Coinbase's, the open-source reference client) picks the exact rail; a PipRail client picks onchain-proof — both offered in the same 402. Settlement stays backendless either way: your own relayer key broadcasts the signed authorization, or you delegate to a third-party facilitator you choose, so the payer spends no gas and PipRail hosts nothing. It's verified end-to-end against the official x402 reference client on Base mainnet. The standard exact rail is EVM + EIP-3009 tokens (USDC/EURC) today; every other chain and token is paid via onchain-proof, which is itself x402.
One install. One line. Straight to your wallet, on every chain that matters.
Like & share PipRail
Star on GitHub Follow @piprailhq