x402 · agentic payments · open web

Payment rails
for agents.

rail is HTTP-native pay for AI agents — built on x402. Your agent hits a paid API, settles in stablecoins, and keeps going. No accounts. No API keys. No human in the loop.

402 payment required
$0 protocol fees
~ms settle & retry
0 API keys
rail glass mark
rail agents pay · x402

How it works

Request → 402 → pay → continue

Same HTTP your stack already speaks. x402 made status code 402 useful again — rail is how agents ride it.

01

Agent calls an API

No signup, no credit card form. Just a normal request to a paid endpoint.

02

Server returns 402

Machine-readable payment terms: amount, token, network, pay-to. Stateless. No session.

03

Agent pays & retries

Signs a stablecoin transfer, resubmits with proof. Facilitator settles. Content unlocks.

GET /costly-data
402 Payment Required
sign USDC
200 + payload

Works with Solana SPL tokens, EVM stablecoins, and any chain the server accepts. Facilitator handles onchain submit so APIs don’t need a full wallet stack.

Why agents need this

The old way breaks flow state

Before

  • Create account at every API
  • KYC + card on file
  • Buy credits / subscriptions
  • Store & rotate API keys
  • Human babysits every vendor

With rail / x402

  • One wallet, many services
  • Pay-per-request micropayments
  • No API keys to leak
  • Zero protocol fees
  • Agent runs unattended

Build

One line of middleware

Charge per request. Accept any network the x402 stack supports.

server.ts
// require payment for paid routes
app.use(
  paymentMiddleware({
    "GET /costly-data": {
      accepts: [{
        scheme: "exact",
        price: "$0.001",
        network: "solana:…",
        payTo: svmAddress,
      }],
      description: "Costly data",
      mimeType: "application/json",
    },
  })
);

Sell to agents

Monetize APIs, data, and compute with pay-per-use — no sales funnel for machines.

Buy as an agent

Fund a wallet, set a spend ceiling, let the agent settle 402s mid-task.

🔗

Chain-agnostic

Solana, Base, and more. Stablecoins first. Open standard under the Linux Foundation.

🛡

No keys, no sessions

Stateless HTTP. Payment proof rides with the request. Nothing sticky to rotate.

Stack

Tools on the rail

Put your API on the rail

Price an endpoint. Let agents settle in-band. That’s the whole product.