Human flow
Human in the loopCreate a key to call the API.
Call endpoint with your API key
200 OKAgents pay for what they need. Sellers get paid for what they build.
PayAgents lets AI agents pay for APIs and MCP tools autonomously, and enables sellers to get paid per request using Bitcoin on Lightning (L402) or USDC on Base (x402).
Free while in beta. No credit card. Direct founder support.
Why agents need payment infrastructure
Most software assumes a human is present to create accounts, enter payment details and approve purchases.
AI agents increasingly perform the work themselves. They need a way to transact without requiring a human at every step.
Create a key to call the API.
Call endpoint with your API key
200 OK→GET /forecast
←402 Payment Required · 0.002 USD
→pay 0.002 USD from agent balance
←payment verified
→GET /forecast + proof
←200 OK · forecast data
$
The internet was built for humans.
Now agents need a way to pay.
Agentic commerce
PayAgents works on both sides of the transaction: controlled spending for the teams that run AI agents, and per-request revenue for anyone selling an API, data or MCP tool to them.
Your agent pays for APIs, data and MCP tools per request, and can make agent-to-agent payments, all within the limits you set.
Agent payments use a pre-funded PayAgents balance.
Charge agents per request for your API, data or MCP tool, and serve each request once its payment is verified.
Payments can go directly to your configured Lightning or Base address.
For sellers
Your next customer is an AI agent. Price your API, data or MCP tool per request and accept payments over Lightning and USDC with x402.
Bitcoin payments for fast, low-value agent transactions and micropayments.
Stablecoin payments for dollar-denominated API and service payments.
By default, payments land in a managed USD balance. Configure your own Lightning or Base address to get paid directly to your non-custodial wallet, and PayAgents only verifies the payment so your API can respond.
Payment is reflected in a managed USD balance held by PayAgents until you configure your own address.
Configure your own Lightning or Base address and payment goes directly to your non-custodial wallet.
Add the PayAgents middleware to a route and set a price. An unpaid request gets HTTP 402 Payment Required with that price. The agent pays over Lightning (L402) or USDC (x402) and retries with proof, and your handler runs only after PayAgents verifies the payment.
import express from 'express';
import { PayAgents } from 'payagents';
const pa = PayAgents.server({ apiKey: process.env.PAYAGENTS_API_KEY! });
const app = express();
app.post('/tool', pa.charge({ price: '0.002 USD' }).express(), (req, res) => {
// Runs ONLY after payment is verified.
// req.payagents = { transactionId, amountUsd, rail, chargeId? }
res.json({ data: 'premium result' });
});
app.listen(3000);
No monthly subscriptions. No billing portals.
Just one line of middleware to turn any API or MCP tool into continuous
revenue.
For agent builders
Spend controls, multi-rail routing, liquidity, and a full audit trail — added to any agent or MCP client in one line.
Multi-rail smart routing
PayAgents detects the protocol requested by the target API or MCP server (L402 sats or x402 USDC) and routes to the cheapest, fastest rail automatically from a single unified USD balance.
Unified Liquidity
Fund once in USD. No manual rebalancing or holding both sats and USDC in separate agent wallets.
Cross-Rail Failover
If a Lightning route stalls or lacks liquidity, PayAgents can fail over seamlessly to base rails without breaking your agent loop.
Two-Phase Settlement
Prevents edge-case failures, double-pays, and timeouts with atomic execution guarantees.
Agent spending controls
Agents spend from a pre-funded PayAgents balance, within the rules you set.
Budgets
Cap what each agent can spend over a period.
Limits
Daily limits and a maximum per transaction.
Allowlists
Agents pay only the services you approve.
Approvals
Require sign-off where you want a person in the loop.
Audit trail
A record of every payment each agent makes.
Agent
Research agent
Today
12 payments
$4.72 spent
$4.72 of $20 daily limit 24%
Approved services
MCP payments
MCP gives AI agents access to tools. PayAgents gives those tools a payment layer.
Wrap a tool's handler in mcpCharge
and set a price to gate it behind a payment.
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import { mcpCharge } from 'payagents-mcp';
import { z } from 'zod';
const server = new McpServer({ name: 'weather-mcp', version: '1.0.0' });
// Gate your tool behind $0.002 micro-payment
server.tool(
'get_forecast',
'Retrieve real-time radar forecast data',
{ city: z.string() },
mcpCharge({ price: '0.002 USD' }, async ({ city }) => {
return {
content: [{ type: 'text', text: `Forecast data for ${city}` }],
};
})
);
Connect the PayAgents MCP server and let Claude use payable tools.
Add the server to your Claude Desktop configuration:
{
"mcpServers": {
"payagents": {
"command": "npx",
"args": ["-y", "payagents-mcp"],
"env": {
"PAYAGENTS_API_KEY": "pa_live_..."
}
}
}
}
Server command
npx -y payagents-mcp
pa_live_... is an example value. Use your own PayAgents API key and never share it.
FAQ
Go deeper with the guides to agent payments, x402 and MCP →, the PayAgents documentation → and articles on agentic commerce →.
PayAgents is the payment layer for AI agents, allowing agents to pay for APIs, data and tools while letting the people who sell them get paid per request.
Anyone selling an API, data or MCP tool to AI agents, and the teams building AI agents that need to pay for them.
Free during beta. Pricing will be announced well in advance.
Yes. PayAgents enables pay-per-request transactions for supported APIs and services.
Payments go directly to your own configured Lightning or Base address, and PayAgents verifies each one before your API responds. You can also use default managed USD balance held by PayAgents instead.
By default it is custodial, until and unless you configure your addresses. Once configured, payments go straight to your own Lightning or Base address with zero platform custody, and PayAgents only verifies each transaction.
Yes. PayAgents supports Lightning payments for agent transactions.
Yes, through supported x402 flows.
Yes. PayAgents can be used to make MCP tools payable.
Yes. PayAgents provides an MCP server that can be configured for supported Claude Desktop workflows.
The payment layer for AI agents. Agents pay. Sellers get paid.
Bring your API, MCP tool or agent. Try our beta or book 15 minutes and we'll help you get a real payment working with PayAgents.
Free while in beta. No credit card. Direct founder support.