Skip to content
Built on Robinhood Chain

Let your agent spend and earn on its own.

Vault402 adds HTTP 402 payments to any API. Agents pay in ETH, USDC or Stock Tokens on Robinhood Chain, retry, and get the response, within a budget you set.

MIT licensed · TypeScript · Express middleware

agent.fetch()robinhood · 4663
GET /v1/report
402 Payment Requiredaccepts 0.25 USDC · 0.0001 ETH · pass 1h
sign EIP-30090.25 USDC · nonce 0x6f1c…a9 · gas paid by server
GET /v1/reportX-PAYMENT: eyJ4NDAyVmVyc2lvbiI6MS…
200 OKsettled 0x9a4e…17 on Robinhood Chain
spent 0.25 / 20.00 USDC budget
1 round trip
402, pay, retry. No accounts or API keys.
0 ETH
needed by agents paying in USDC, via EIP-3009.
Any ERC-20
ETH, USDC, Stock Tokens, or your own token.
3 access models
Per call, time pass, or prepaid credits.

For sellers

Put a price on any route.

One middleware turns an Express endpoint into a paid one. Your handler only runs after the payment is confirmed on-chain.

  • List several prices and let the agent choose the token.
  • Accept gasless USDC by adding a settlement key.
  • Sell single calls, hourly passes, or bundles of 100 calls.
server.ts
import { requirePayment, ETH } from 'vault402';

app.get('/v1/report',
  requirePayment({
    network: 'robinhood',
    payTo: '0xYourWallet',
    price: [
      { token: USDC, amount: '0.25' },
      { token: ETH,  amount: '0.0001' },
    ],
    access: { type: 'pass', durationSeconds: 3600 },
  }),
  (req, res) => res.json(report)
);
agent.ts
import { createAgentClient } from 'vault402';

const agent = createAgentClient({
  account: process.env.AGENT_PRIVATE_KEY,
  network: 'robinhood',
  budget: [
    { token: USDC, maxPerPayment: '1', maxTotal: '20' },
  ],
});

// Pays the 402 if it fits the budget, then retries.
const res = await agent.fetch('https://api.example.com/v1/report');

For buyers

A wallet, and a limit it can't cross.

agent.fetch() works like fetch, except that it can pay. It refuses any offer outside the budget and never pays twice for one request.

  • Per-payment and lifetime caps for each token.
  • Prefers gasless payments when the server offers them.
  • Reuses passes and credits it has already bought.

Built in

Every way an agent needs to pay.

Any token on Robinhood Chain

Price in native ETH, WETH, USDC, Robinhood Stock Tokens or any ERC-20 you register by address. The agent pays in the first token its budget allows.

  • ETH
  • WETH
  • USDC
  • Stock Tokens
  • any ERC-20

Gasless USDC

Agents sign an EIP-3009 authorization and your server submits it. The agent's wallet needs no ETH.

Passes & credits

One payment can cover an hour of calls, or a hundred. Agents reuse the access token automatically.

62 / 100 credits

Replay-proof by construction

Each 402 response includes a single-use paymentId. It has to appear in the transfer calldata or as the EIP-3009 nonce, and the server redeems it once, so the same transfer can never unlock two responses.

transfer(0xSeller…, 250000) ‖ 0x6f1c…a9

How it works

402 → pay → 200.

A thin layer over plain HTTP. The full wire format is in the protocol reference.

  1. 01

    Request

    The agent calls your API. With no payment attached, the server replies 402 with a single-use paymentId and the tokens it accepts.

  2. 02

    Pay

    The agent picks an offer within its budget. It either sends a transfer carrying the paymentId or signs an EIP-3009 authorization.

  3. 03

    Retry

    The same request goes out again with an X-PAYMENT header containing the transaction hash or the signed authorization.

  4. 04

    Verify & serve

    The server confirms the payment on Robinhood Chain, marks the paymentId as used, and runs your handler.

Read the protocol reference

The token

Agent Vault $AGENT

The token of the Vault402 network, on Robinhood Chain. This is the only official contract; check the address before you trade.

Name
Agent Vault
Ticker
$AGENT
Network
Robinhood Chain · chain ID 4663
Total supply
1,000,000,000
Contract
0x1f5C3FED482AeFf409b955B3ad371678c08e91E2
View on Blockscout

Questions, answered.

What is Vault402?

Vault402 is an open-source TypeScript SDK for HTTP 402 Payment Required. An API answers unpaid requests with a 402 and a price list. An AI agent pays on Robinhood Chain and retries the request, and the server checks the payment on-chain before serving the response.

Which blockchain does Vault402 use?

Robinhood Chain, an Ethereum Layer 2 built on Arbitrum. It supports mainnet (chain ID 4663) and testnet (chain ID 46630). Gas is paid in ETH.

Which tokens can agents pay with?

Native ETH, WETH, USDC, Robinhood Stock Tokens, or any other ERC-20 the seller registers. A seller can list several prices, and the agent pays with the first token in its budget.

Do agents need ETH for gas?

Not when paying in USDC or another EIP-3009 token. The agent signs a transferWithAuthorization message and the seller's server submits it and pays the gas. For other tokens, the agent sends the transfer itself and pays gas in ETH.

Can I sell subscriptions or bundles instead of single calls?

Yes. A payment can buy one request (one-time), unlimited requests for a set time (pass), or a fixed number of requests (credits). For passes and credits the agent gets an access token and reuses it on later calls.

What is Agent Vault ($AGENT)?

Agent Vault ($AGENT) is the token of the Vault402 network. It is an ERC-20 on Robinhood Chain (chain ID 4663) with a total supply of 1,000,000,000. The official contract address is 0x1f5C3FED482AeFf409b955B3ad371678c08e91E2. Check the address before you trade.

How does Vault402 stop replayed or overspent payments?

Every 402 response includes a single-use paymentId. The payment must carry it, either in the transfer calldata or as the EIP-3009 nonce, and the server accepts each paymentId only once. On the agent side, a required budget caps which tokens it can spend and how much per payment and in total.

Spend. Earn. On its own.

Install the SDK, or give your agent one command and let it set itself up.

$ npm install vault402