bolthub
PricingBlogDocs
bolthub

Lightning pay-per-call for MCP tools and APIs. Agents pay per call and you keep custody, straight to your wallet. Built for tool builders and AI teams.

contact@bolthub.ai

Product

All productsbolthub Pay SDKHosted platformToolClientAPI HubNode LauncherPricingFor tool buildersFor agent buildersCharge for your toolsDocs

Legal

Terms of ServicePrivacy PolicySecurityAcceptable Use

Resources

API HubBlogWhat is L402?L402 vs x402RSS feed

Packages

npm

@bolthub/​payPayments SDK@bolthub/​mcpMCP server@bolthub/​cliCLI@bolthub/​verifyOrigin verifier

PyPI

bolthubPython SDKbolthub-verifyPython verifier
bolthub

© 2026 Signal Tech Pty Ltd. All rights reserved.

Protocol explainer

What is L402? The HTTP 402 payment standard for APIs and AI agents.

L402 is an open protocol that uses the long-dormant HTTP 402 “Payment Required” status code to let any API charge per request, and lets any client, including an autonomous AI agent, pay programmatically over the Lightning Network.

HTTP 402: the status code the web never used.

When HTTP was designed, status code 402 was reserved for “Payment Required” and left for a future digital-cash system that never arrived. For decades the web routed around it with subscriptions, ads, and API keys. Lightning micropayments finally make 402 usable: payments small enough, and fast enough, to attach to a single request. L402 is the standard that puts the status code to work.

How L402 works.

  1. 01

    A client requests a protected endpoint.

  2. 02

    The server responds 402 Payment Required with a Lightning invoice and a macaroon.

  3. 03

    The client pays the invoice, typically a few sats, in under a second.

  4. 04

    The client retries the request with the paid token attached, and the server returns the response.

l402 · one paid request
$ curl https://api.example.com/v1/data
HTTP/1.1 402 Payment Required
WWW-Authenticate: L402 macaroon="MDAxM…" invoice="lnbc50n1…"
$ wallet pay lnbc50n1… # 5 sats, settles in <1s
SETTLED · preimage 9f86d081…
$ curl https://api.example.com/v1/data \
-H "Authorization: L402 MDAxM…:9f86d081…"
HTTP/1.1 200 OK

L402 vs. traditional API billing.

L402
Minimum charge
1 sat (sub-cent)
Account required
No
API keys to manage
None, the token is the credential
Pays programmatically
Yes, built for agents
Settlement
Instant, non-custodial
Keys & card processors
Minimum charge
~$0.50 (card floor)
Account required
Yes
API keys to manage
Issue, store, rotate
Pays programmatically
Human checkout flow
Settlement
Days, via processor
L402Keys & card processors
Minimum charge1 sat (sub-cent)~$0.50 (card floor)
Account requiredNoYes
API keys to manageNone, the token is the credentialIssue, store, rotate
Pays programmaticallyYes, built for agentsHuman checkout flow
SettlementInstant, non-custodialDays, via processor

Go deeper: L402 vs x402 · L402 vs API keys

L402 in practice with bolthub.

bolthub implements L402 so you don’t have to. Providers point at an endpoint and charge for it per call; builders give an agent pay-per-call access to every API in the hub. Settlement is instant, sub-cent, and non-custodial. Prefer code? The bolthub Pay SDK adds the same L402 paywall to any MCP tool or endpoint you run yourself.

Browse the API Hub

L402 FAQ

L402 is the current name for the protocol that was originally introduced as LSAT (Lightning Service Authentication Token). The mechanism is the same: an HTTP 402 challenge paired with a Lightning invoice and a macaroon.

Payments settle in sats over the Lightning Network, so a Lightning wallet is involved. As a provider you receive sats directly to your wallet; as a builder your agent spends from a Lightning budget. No exchange account or card processor is required.

No. Payments settle in sats straight to your wallet, and what you hold afterward is your call. bolthub runs the metering and never touches the funds, so any conversion is yours to make. If your books run in dollars, you can sweep sats to a stablecoin or cash on your own schedule through your own wallet or exchange. If you're stacking, keep the sats. The rail underneath stays Lightning either way.

Yes. That is the point. Because the 402 challenge and payment are programmatic, an autonomous agent can discover a paid endpoint, pay the invoice, and retry with the token at runtime, with no human and no API-key provisioning.

Both revive the HTTP 402 status code for machine payments. L402 settles in bitcoin over the Lightning Network and uses macaroons; x402 is a newer scheme that settles USD stablecoins on-chain through a facilitator. bolthub is Lightning-only: for the sub-cent, high-frequency payments agents make, off-chain Lightning settlement is cheaper and faster, which is why we chose it.

start selling

Start earning from your tools today

Self-host the SDK free, or start on the hosted platform: 1-month free trial, usage-based billing after that.

Start your free trialStart free with the SDK

hub / btc-intel

  • GET /v1/derivatives/cme-basis3 sats/req
  • GET /v1/market/multi_exchange3 sats/req

LIVE32 endpoints · btc-intel.gw.bolthub.ai

browse the hub →