Skip to content

The payment layer for AI agents.

Agents 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

AI agents are becoming autonomous. Payments aren't.

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.

Human flow

Step 1 of 4
Sign up

Create a key to call the API.

Call endpoint with your API key

200 OK
GET /forecast 420ms
Authorization: Bearer key_••••7f3a
✓ 200 OK · forecast data
Setup complete ✓
Human

Agent flow

Done
research-agent served

→GET /forecast

←402 Payment Required · 0.002 USD

→pay 0.002 USD from agent balance

←payment verified

→GET /forecast + proof

←200 OK · forecast data

$

AI Agent

The internet was built for humans.

Now agents need a way to pay.

Agentic commerce

Agents buy. Sellers get paid.

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.

Agents buy Send

Give your agent controlled purchasing power.

Your agent pays for APIs, data and MCP tools per request, and can make agent-to-agent payments, all within the limits you set.

  • ↗ Pay APIs per request
  • ↗ Pay for data
  • ↗ Pay MCP tools
  • ↗ Pay other agents
  • ↗ Set spending limits
  • ↗ Track transactions

Agent payments use a pre-funded PayAgents balance.

Sellers get paid Receive

Turn agent traffic into revenue.

Charge agents per request for your API, data or MCP tool, and serve each request once its payment is verified.

  • ↙ Pay per request
  • ↙ Lightning payments
  • ↙ USDC payments
  • ↙ Payment verification
  • ↙ Direct receiving Optional
  • ↙ Managed balance Default

Payments can go directly to your configured Lightning or Base address.

For sellers

Get paid by agents.

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.

Lightning

BTC

Bitcoin payments for fast, low-value agent transactions and micropayments.

Protocol
L402
Receive to
Lightning address

USDC / x402

USDC

Stablecoin payments for dollar-denominated API and service payments.

Protocol
x402
Receive to
Base address

Where your payments go.

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.

Managed mode

DEFAULT

Payment is reflected in a managed USD balance held by PayAgents until you configure your own address.

Paid to
USD balance
Held by
PayAgents

Direct mode

OPTIONAL

Configure your own Lightning or Base address and payment goes directly to your non-custodial wallet.

Paid to
Your non-custodial wallet
PayAgents
Verifies only

Learn how direct receiving works →

Verify, then respond.

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.

server.ts
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

Give your agent the ability to transact.

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

Route autonomously across Lightning and Base.

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.

Your Agent
Active Engine
PayAgents Engine Policy · Routing · Settlement
Lightning
x402
Fiat (soon)
Autonomous protocol detection & cross-rail routing

Agent spending controls

Give agents a budget, not unlimited access to money.

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

EXAMPLE
Monthly budget
$100
Daily limit
$20
Max transaction
$2

Today

12 payments

$4.72 spent

$4.72 of $20 daily limit 24%

Approved services

  • Market Data
  • Weather API
  • Search API
Example configuration. Not real usage.

MCP payments

Make your MCP tools payable.

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.

server.ts
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}` }],
    };
  })
);

See how MCP monetization works →

Use PayAgents with Claude.

Connect the PayAgents MCP server and let Claude use payable tools.

Add the server to your Claude Desktop configuration:

claude_desktop_config.json
{
  "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.

Read the guide to using PayAgents with Claude Desktop →

FAQ

Questions about AI agent payments

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.

Build your first agent payment.

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.