Your API can get paid by AI agents. Today.
One import. Two rails. AI agents pay per call in USDC or Lightning — you get a USD balance or direct settlement.
Live now • No card required • 0% platform fee during beta
AI agents are ready to pay. Most APIs still turn them away.
Autonomous AI agents are already calling web APIs, MCP tools, and data feeds — and they carry programmatic spending budgets. Yet almost all APIs require a human signup, email verification, credit card entry, and monthly minimums.
Building machine-native billing yourself means running a dedicated Lightning node or Base hot wallet, writing HTTP 402 challenge/verification logic, validating cryptographic preimages and EIP-712 signatures, reconciling dual ledgers — then doing it all again for the next rail.
Ten minutes to your first paid call.
No blockchain complexity in your app logic. Drop middleware onto your endpoints and receive verified USD payments.
Install SDK
npm install payagents
One import. Zero subpaths or extra native bindings required.
Charge for an endpoint with one line of middleware
import express from 'express';
import { PayAgents } from 'payagents';
const pa = PayAgents.server({ apiKey: process.env.PAYAGENTS_API_KEY! });
const app = express();
// PayAgents intercepts, challenges with HTTP 402, and verifies settlement
app.post('/tool', pa.charge({ price: '0.002 USD' }).express(), (req, res) => {
// Handler executes ONLY after payment is verified
// req.payagents = { transactionId, amountUsd, rail: 'lightning' | 'base', payer }
res.json({ data: 'premium result' });
});
app.listen(3000);
Fastify adapter included. Framework-agnostic handle() for Cloudflare Workers, Next.js, and Hono.
Single-rail providers turn away half the market.
Some agents hold Base USDC. Others hold Bitcoin Lightning. PayAgents accepts both from the exact same integration.
| Capability | Single-rail providers |
PayAgents
|
|---|---|---|
| Agent holds USDC (Base / x402) | ✓ Paid | ✓ Paid |
| Agent holds Lightning (L402 / Satoshis) | ✕ Turned away | ✓ Paid |
| Integration complexity | One integration (limited reach) | One integration (100% reach) |
Pick a single rail and you silently turn away every agent holding the other. You never see those requests — they just don't convert. PayAgents answers both from the same middleware.
Built for high-scale API monetization.
Per-route pricing
Set granular microprices for individual endpoints, MCP tools, or dataset slices on the same server instance.
Verified before your handler runs
Middleware handles the 402 challenge and signature/preimage verification before execution. Zero payment logic clutter in your core code.
Zero custody
You never handle private keys, invoices, or custodial risk. Payments go directly to your configured wallet or default managed balance.
Full cryptographic audit trail
Every settlement is paired with verifiable transaction hashes, payer identifiers, and timestamps in your dashboard.
Payment infrastructure, not a closed directory
PayAgents is payment infrastructure, not a marketplace. We don't send traffic to your API. We make sure that when an agent finds it, it can pay you — on either rail — without you building the plumbing.
Ten minutes to your first paid call.
Integrate our multi-rail middleware and monetize your APIs, MCP tools, and datasets autonomously.
Free while in beta. No credit card required. Direct founder support.