RailPay for AI agents
Wallets and budgetsfor autonomous agents.
Give an agent its own Robinhood Chain wallet, an API key and a policy. It pays for APIs, data and compute per request over x402, in USDG, and never past the limits you set.
→GET https://api.example.com/v1/report
Agent wallets are custodial
Live today
Everything an agent needs to pay.Nothing it doesn't.
- Live
Agent wallets
Each agent has its own Robinhood Chain address and its own API keys. Keys start with rp_sk_, are shown once, and only a hash is stored.
- Live
Spending policies
Per-request max, daily cap, allowed hosts, allowed recipients, agent-to-agent and pause. Checked before anything is signed.
- Live
x402 v2 payments
The exact scheme on eip155:4663. The agent signs an EIP-3009 USDG authorization; the seller settles it on-chain.
- Live
Agent-to-agent
Agents pay other agents on-chain when agent-to-agent is switched on, inside the same limits.
- Live
Events
Every attempt is logged as pending, paid, expired, failed or blocked, with the reason.
- Live
SDK and MCP server
An open-source TypeScript SDK and an MCP server for Claude Code, Claude Desktop and other MCP clients.
Policy
You set the limits.RailPay enforces them.
Every payment is checked against the agent's policy first. If it fails, nothing is signed and the attempt is logged with its reason.
| Rule | Default | What it does |
|---|---|---|
| Per-request maxLargest single payment the agent may make. | 0.05 USDG | Largest single payment the agent may make. |
| Daily capTotal the agent may sign per UTC day. Signed authorizations count until they settle or expire. | 5 USDG | Total the agent may sign per UTC day. Signed authorizations count until they settle or expire. |
| Allowed hostsHosts the agent may pay. Empty means any host. | Any | Hosts the agent may pay. Empty means any host. |
| Allowed recipientsWallets the agent may pay. A host can name any payee, so pin them here. | Any | Wallets the agent may pay. A host can name any payee, so pin them here. |
| Agent-to-agentWhether the agent may pay other agents. | Off | Whether the agent may pay other agents. |
| PauseBlocks every payment while on. | Off | Blocks every payment while on. |
POST /v1/agents
curl -X POST https://dapp.railpay.app/v1/agents \
-H "Authorization: Bearer $RAILPAY_KEY" \
-H "Content-Type: application/json" \
-d '{ "name": "research-bot" }'x402
Pay per request over HTTP 402.Request, sign, retry, settled.
x402 v2 with the exact scheme on eip155:4663. The signature is the payment: there is no separate proof to forge or replay.
- 1
Request
The agent calls a paid resource. Without a payment the answer is 402, with the price in USDG in PAYMENT-REQUIRED.
- 2
Sign
RailPay checks the policy. If it passes, the agent wallet signs an EIP-3009 authorization for exactly that amount. Nothing is sent on-chain yet.
- 3
Retry
The agent retries with PAYMENT-SIGNATURE. The seller verifies it and settles it through an x402 facilitator, which pays the gas.
- 4
Settled
The seller reads the USDG transfer back from the chain and answers 200, with the transaction in PAYMENT-RESPONSE.
import { RailPay, withPayment, readPaymentResponse } from "railpay-sdk";
const railpay = new RailPay({ apiKey: process.env.RAILPAY_AGENT_KEY });
const paidFetch = withPayment(railpay, { maxAmount: "0.05" });
const res = await paidFetch("https://dapp.railpay.app/x402/time");
console.log(await res.json());
console.log(readPaymentResponse(res)?.transaction); // settlement tx hashFor x402 payments the agent needs USDG only. The facilitator submits the authorization and pays the gas, so the agent holds no ETH for these.
An authorization that is signed but never settled expires; nothing moves and the daily cap is freed.
Prices on RailPay resources and paywalls start at 0.001 USDG.
Agent-to-agent
Agents pay agents.Inside the same limits.
Switch on agent-to-agent in the sending agent's policy and it can pay another agent by its id. The per-request max, daily cap and recipient list still apply.
The payment is a USDG transfer between the two agent wallets. The sending agent submits it itself, so it needs a little ETH for gas. RailPay's own gas relayer, which would cover this, is coming soon.
curl -X POST https://dapp.railpay.app/v1/agent/send \
-H "Authorization: Bearer $RAILPAY_AGENT_KEY" \
-H "Content-Type: application/json" \
-d '{ "to": "agt_xxx", "amount": "0.01", "memo": "summary job" }'Events
Every attempt is logged.Including the ones that were stopped.
- Pending: signed and not settled yet. It counts toward the daily cap and holds that much balance.
- Paid: settled, with its transaction.
- Expired: the authorization passed its deadline unused. Nothing moved and the cap is freed.
- Failed: settlement was not possible.
- Blocked: the policy said no, with the reason.
Block reasons
- paused
- over_per_request
- over_daily_cap
- host_not_allowed
- pay_to_not_allowed
- a2a_not_allowed
- insufficient_funds
Agent keys can only call the agent endpoints and are always bound by the policy. They cannot touch the owner account or withdraw.
Build
Plug an agent in.SDK, MCP server or plain HTTP.
The SDK answers a 402 for you. The MCP server gives an agent in Claude Code or Claude Desktop a RailPay wallet, with a per-call limit on top of the policy.
- 06AI agent wallet creationCreate an agent with its own Robinhood Chain address and API key. The wallet is run by RailPay.Live
- 07x402 support for agent micropaymentsx402 v2, exact scheme on eip155:4663. The agent signs an EIP-3009 USDG authorization and the seller settles it on-chain.Live
- 08Spending limits and policies for agentsPer-request max, daily cap, allowed hosts, allowed payees, agent-to-agent and pause. The agent signs only payments that pass.Live
- 09Programmable payment rulesAutomatic splits need a split contract. Not live.Planned
- 14Multi-chain supportRobinhood Chain only today. Other chains are TBD.Planned
- 15Agent-to-agent paymentsAgents pay other agents on-chain when agent-to-agent is switched on, inside the same limits.Live
- 16Developer API accessREST API with account and agent keys, plus an open-source SDK and MCP server.Live
- 17Business and agent dashboardWallet and agent balances read from the chain, invoices, paywalls and policies in the app.Live
- 18Transaction monitoring toolsActivity with explorer links, CSV export, and agent events with block reasons.Live
- 20Unified interface for human and agent paymentsOne app and one API for your wallet and your agents' wallets.Live
Give your agent a wallet.And a budget it can't break.
Settled in USDG on Robinhood Chain. Every payment is its own transaction, open on the explorer.