Skip to content

Give your agents a
fetch() that pays

Bitcoin Lightning + Stablecoins | Multi-protocol | Open source

Star on GitHub
quickstart.ts
1import { BoltzPay } from "@boltzpay/sdk";2const boltz = new BoltzPay({ ...keys });3const res = await boltz.fetch(url);|

Use it your way

Three interfaces, one SDK. Pick the one that fits your stack.

claude
$ npx @boltzpay/mcp
fetch · check · quote · discover
budget · history · wallet
7 tools ready. Claude can now pay for APIs.
› Find a joke API under $0.01 and fetch one
● boltzpay_discover
nickeljoke.vercel.app — $0.01/req · x402 · Base
● boltzpay_fetch nickeljoke.vercel.app/api/joke
Paid $0.01 USDC via x402 on Base
Why do programmers prefer dark mode?
Because light attracts bugs.
import { BoltzPay } from "@boltzpay/sdk";

const boltz = new BoltzPay({
  coinbaseApiKeyId: process.env.COINBASE_API_KEY_ID,
  coinbaseApiKeySecret: process.env.COINBASE_API_KEY_SECRET,
});

// That's it — fetch like normal
const res = await boltz.fetch("https://api.example.com/data");
// 402? SDK pays automatically, retries, returns 200
console.log(res.status); // 200
$ boltzpay check https://nickeljoke.vercel.app/api/joke
  Protocol: x402 · Price: $0.01 USDC · Chain: Base

$ boltzpay fetch https://nickeljoke.vercel.app/api/joke
   Paid $0.01 USDC via x402 on Base
  Why do programmers prefer dark mode?
  Because light attracts bugs.

$ boltzpay budget
  Daily: $4.99 / $5.00 remaining

How it works

One fetch() call.
Detection, payment, and retry happen inside the SDK.

fetch(url) 402 detect · check · pay retry → 200 ✓

Protocols

x402 Live

by Coinbase

100M+ payments since May 2025

L402 Live

by Lightning Labs

Bitcoin Lightning, NWC wallet

Auto-detected. You just call fetch().

All open protocols. Apache 2.0 / MIT.

Without a unified SDK:

x402 → wallet setup, EIP-712 signing, facilitator calls

L402 → Lightning node, invoice handling, NWC

With BoltzPay:

$ fetch(url)

The most obvious way that a server would give you resources would be that you would pay directly for that resource.

— Sam Ragsdale, x402 co-author · on the original vision behind HTTP 402

Built for agents

Multi-Protocol

x402 and L402 auto-detected at runtime — your agent calls fetch(), the SDK picks the right protocol, signs the payment, and returns the response

MCP Server

7 tools for Claude, Cursor, and any MCP client — just npx @boltzpay/mcp

Budget Control

Daily and per-transaction spending limits

Payment Events

Real-time callbacks on every payment

Multi-Chain

Bitcoin Lightning, Base, Solana — one interface, any network

API Directory

20+ verified paid endpoints, built-in

Lazy Credentials

Read-only mode without keys — pay only when needed

Payment History

Persistent log of every payment — query by session or date

Why open source

Payment infrastructure for AI agents should be transparent, auditable, and owned by the community. Not locked behind another API key.

MIT Licensed

Use anywhere. Modify freely. No strings.

Your Own Keys

Credentials stay on your machine. We never see them.

No Custody

Your wallet signs, the facilitator settles. We never hold funds.

No Lock-in

Fork it, extend it, open a PR. Stars and contributions keep this alive.

Stop rate-limiting your AI

Let it pay.

Star on GitHub