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.
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.
A client requests a protected endpoint.
The server responds 402 Payment Required with a Lightning invoice and a token (a macaroon).
The client pays the invoice — typically a few sats, in under a second.
The client retries the request with the paid token attached, and the server returns the response.
| L402 | Keys & card processors | |
|---|---|---|
| Minimum charge | 1 sat (sub-cent) | ~$0.50 (card floor) |
| Account required | No | Yes |
| API keys to manage | None — the token is the credential | Issue, store, rotate |
| Pays programmatically | Yes — built for agents | Human checkout flow |
| Settlement | Instant, non-custodial | Days, via processor |
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 HubL402 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.
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.
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 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.
14-day free trial. Usage-based billing after that, paid monthly via Lightning.
market-intel.gw.bolthub.ai
weather-api.gw.bolthub.ai
Browse the API Hub and try a paid request with your Lightning wallet. No signup needed to explore.