L402 and x402 both revive the dormant HTTP 402 “Payment Required” status code so APIs, and the AI agents that call them, can pay per request. They differ in the rail underneath: L402 settles bitcoin over the Lightning Network; x402 settles USD stablecoins on-chain through a facilitator. We built and measured both, and for the sub-cent, high-frequency payments agents make, L402 over Lightning is cheaper and faster. Here is the honest comparison.
Both use the same HTTP-native handshake: a client requests a resource, the server answers 402 Payment Required with the price and how to pay, the client pays and retries, and the server returns the response. Both are built for machine clients, so an autonomous agent can pay at runtime with no human in the loop and no API key to provision. The difference is entirely in how the payment settles.
| L402 | x402 | |
|---|---|---|
| Introduced by | Lightning Labs (as LSAT, 2020) | Coinbase (2025) |
| Settlement rail | Lightning Network (Bitcoin) | Stablecoins on EVM chains (e.g. USDC on Base) |
| Unit of account | sats (bitcoin) | USD stablecoins |
| Settlement | Off-chain, instant, non-custodial | Onchain, settled by a facilitator |
| Typical minimum | 1 sat, a fraction of a cent | Sub-cent, subject to chain and facilitator costs |
| Payment credential | Macaroon token + invoice preimage | A signed stablecoin payment authorization |
| Value stability | BTC-denominated (moves against USD) | USD-stable |
| Intermediary | Optional L402 proxy (e.g. Aperture) | Facilitator verifies and settles |
| Maturity | In production for several years | Newer, growing quickly |
x402 is young and evolving quickly; treat its column as a moving target and check the current spec for specifics.
x402 is a real, well-designed rail. If you price in dollars, it books revenue with no bitcoin volatility to hedge. You settle to an EVM address, so there is no node to run and no channels to keep online. And when a single payment is a dollar or more, on-chain gas is a rounding error. For dollar-sized, EVM-native payments it is a reasonable pick.
On-chain gas is a roughly fixed cost per settlement: it does not shrink when the payment shrinks. A Lightning routing fee is a small base plus a proportional part, so it scales down with the payment and stays viable at a fraction of a sat. Settlement is sub-second, with no block to wait for. The smaller and more frequent the payment, the wider Lightning’s lead.
One caveat worth naming: with x402 you receive dollars, so there’s nothing to convert. With Lightning you receive sats and convert on your own schedule, which leaves a short window of price exposure between settling and sweeping. For sellers who sweep often that window is small, and it buys Lightning’s cost and speed on every call. bolthub stays out of the funds path, so the conversion, and its timing, is always yours.
bolthub is built for the small end: agents paying a fraction of a cent per call, thousands of times an hour. That is the regime where Lightning is cheaper and faster, so bolthub is Lightning-only, on purpose. Price a tool in sats and charge for it per call, or give an agent a Lightning budget and let it pay for tools it discovers. New to the standard? Start with what is L402, or compare it to the API-key status quo.
Neither is universally better; they optimize for different sizes of payment. x402 settles USD-stable value on-chain and fits dollar-sized payments and teams already building on EVM chains. L402 settles bitcoin off-chain over Lightning in under a second, non-custodial, at a fraction of a sat. For sub-cent, high-frequency machine payments, a Lightning routing fee scales down with the payment while on-chain gas does not, which is why bolthub settles on Lightning.
Not directly. They share the HTTP 402 pattern (a server answers a request with 402 and payment details, the client pays and retries), but the rails and credentials differ, so a client built for one does not automatically pay the other. An agent can support both.
Lightning, via L402. bolthub settles bitcoin over Lightning, peer-to-peer to the provider's wallet, with no facilitator holding funds. We built an x402 rail, measured it, and removed it: for the sub-cent payments our users make, Lightning is cheaper and faster. bolthub is deliberately Lightning-only.
start selling
Self-host the SDK free, or start on the hosted platform: 1-month free trial, usage-based billing after that.