bolthub
PricingAPI HubBlogDocs
bolthub

Lightning L402 gateway for your API and a public API Hub for discovery. Built for data sellers and AI builders. Non-custodial, pay per call.

contact@bolthub.ai

Product

PricingAPI HubMonetize your APIFor AI agentsLightning Gateway & docs

Legal

Terms of ServicePrivacy PolicySecurityAcceptable Use

Resources

BlogWhat is L402?RSS feed

Packages

npm

@bolthub/agentTypeScript SDK@bolthub/cliCLI@bolthub/mcp-registryRegistry MCP@bolthub/mcp-bridgeBridge MCP@bolthub/verifyWebhook verifier

PyPI

bolthubPython SDKbolthub-verifyPython verifier

© 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. 1

    A client requests a protected endpoint.

  2. 2

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

  3. 3

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

  4. 4

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

L402 vs. traditional API billing.

 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

L402 in practice with bolthub.

bolthub implements L402 so you don’t have to. Providers point at an endpoint and monetize 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.

Explore the API Hub

L402 FAQ

Is L402 the same as LSAT?

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 token.

Do I need Bitcoin to use L402?

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.

Can AI agents pay with L402?

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.

How is L402 different from x402?

Both revive the HTTP 402 status code for machine payments. L402 settles in Bitcoin over the Lightning Network and uses macaroon tokens; x402 is a newer scheme that settles in stablecoins on a blockchain. bolthub implements L402 for instant, sub-cent, non-custodial Lightning settlement.

Start earning with your API today

14-day free trial. Usage-based billing after that, paid monthly via Lightning.

Start your free trial

Market Intelligence

10 eps

market-intel.gw.bolthub.ai

GET /sentiment · 10 sats/reqGET /correlations · 10 sats/req+8 more

Weather Forecast

5 eps

weather-api.gw.bolthub.ai

GET /forecast · 5 sats/reqGET /alerts · 5 sats/req+3 more

See it in action

Browse the API Hub and try a paid request with your Lightning wallet. No signup needed to explore.

Browse API HubAgent integration