for agent builders
Give your agent a budget instead of a hundred vendor accounts: a drop-in paying client calls any paid tool, settles per call over Lightning, and stops at the cap you set. No signups, no API keys, no card on file.
import { PayingClient, l402Payer } from "@bolthub/pay";
const client = new PayingClient({ payers: [l402Payer({ wallet })], // pays Lightning invoices maxTotal: { sat: 10_000 }, // budget ceiling});
// callTool handles challenge -> pay -> retry transparently:const result = await client.callTool(mcpClient, "get_satellite_image", { lat, lon });The subscribe-and-manage-API-keys model assumes a human at a dashboard. An autonomous agent needs to discover a tool, pay for it, and use it — at runtime, programmatically, within a budget you set. bolthub Pay makes the payment itself the credential, so a single client reaches every paid tool that speaks the profile.
One client answers a tool's Lightning invoice and retries with the proof of payment. Any paid tool your agent reaches settles the same way, straight to the provider.
A per-asset cap bounds spend. The agent pays per call within it and stops at the limit — no surprise bills, no standing authorization.
The paid proof is the credential. Nothing to provision, store, or rotate — the agent discovers a tool, pays, and uses it at runtime.
Add your wallet, set a budget, and the client handles the rest: challenge, payment, and retry are transparent to your agent code.
bun add @bolthub/payThe budget is a hard cap on the client: “spend at most 10,000 sats, total.” Every payment is counted against it before it happens, and the client refuses any offer that would cross the line. Delegating to a sub-agent? Hand it its own client with a smaller cap; it never holds your keys or an open-ended balance.
Curious how Lightning settlement compares to on-chain rails? Read L402 vs x402 for why bolthub is Lightning-only.
start calling
Wire bolthub into Cursor, Claude Desktop, or your own orchestrator. Add your wallet, set a budget, and your agent can discover and call any listed tool. Building in code? Python and TypeScript SDKs call any hub API directly.