Orbit: Machine payments and money
L402 and the Lightning Network
An HTTP 402 authentication scheme from Lightning Labs in which a server returns a Lightning invoice plus a bearer token, and the client proves payment by presenting the token with the invoice preimage.
- Steward
- Lightning Labs (lightninglabs/L402 repository); proposed to the Lightning bLIP process as bLIP-0026, still an open pull request
- Status
- Live (Lightning Labs); bLIP-0026 PR open
- Latest version
- bLIP-0026 draft protocol version 0 (PR head rewrite); Lightning Labs repository text at commit 592203a (2026-03-20) ()
- Primary source
- L402 specification repository (external link)
What it is
is an earlier payment design on Lightning. A client requests a paid resource, and the server answers 402 Payment Required with a WWW-Authenticate: L402 that carries a and a Lightning invoice. The client pays the invoice, which reveals the , and then sends Authorization: L402 <credential>:<preimage>. Because the credential commits to the invoice’s payment hash, the server can check the preimage against that hash without a database lookup. Source [1, 2]
The credential is a bearer token, so it can be reused for later requests or handed to another or wallet. Lightning Labs’ builder’s guide now describes L402 as built with a focus on agentic commerce. Source [3]
From LSAT to L402
The protocol began as (“Lightning Service Authentication Token”). The repository’s first commit is dated 2020-02-06, and its 2020 README describes LSAT as macaroon-based authentication and paid APIs for Lightning Labs services. A documentation rewrite merged on 2023-04-20 replaced “LSAT” with “L402” throughout the specification. Source [4] Both the repository and bLIP-0026 keep a backwards-compatibility rule: servers and clients should accept LSAT wherever L402 appears. Source [1, 2]
Two specification texts
The original Lightning Labs specification, which is also the repository text today, fixes the as a . The reads L402 macaroon="...", invoice="...", and caveats on the macaroon narrow what the token may access (target services, , and such as expiry). Source [1]
, as rewritten by Olaoluwa Osuntokun on 2026-02-25, makes L402 token-format agnostic. The challenge becomes L402 version="0", token="...", invoice="...", any token that commits to the is allowed, and macaroons become the RECOMMENDED format rather than a requirement. Source [2, 5] The bLIP is pull request #26 in lightning/blips, and it was still open and unmerged on 2026-10-11. Source [5]
Lightning Labs aligned its repository with that rewrite on 2026-03-10 and returned to the macaroon= header format on 2026-03-20, saying the header changes would be proposed again later. Source [4, 5] In short: macaroons are optional in the bLIP-0026 draft (2026-02-25) and required in the Lightning Labs repository text (2026-03-20).
Rail and limits
rides on the Lightning Network, Bitcoin’s payment-channel network, so payments are in bitcoin (sats). Payment must happen over Lightning: when a reviewer on the bLIP thread raised this limit, Osuntokun replied on 2026-03-11 that a card-accepting variant might be possible but does not fit the vision being pursued. Source [5] Neither spec text defines a refund or dispute process; the is the . Source [1, 2]
Status
is live as a deployed protocol through Lightning Labs’ Aperture reverse proxy, whose v0.5.0 release came out on 2026-03-25. Source [6] The lightninglabs/L402 repository was last pushed on 2026-06-09. Source [4] The bLIP-0026 header reads “Active” with a created date of 2023-06-06, but the pull request that carries it is not merged. Source [2, 5]
How it relates to the eight
Several of the eight now carry Lightning as a payment method without ’s token layer. The x402 exact has an lnbtc binding that reuses the idea of a as but carries it in x402’s own payment header with no . Source [7] The MPP specs repository includes Lightning and method drafts authored by Lightspark, which do not mention L402 or macaroons. Source [8] Neither spec claims descent from L402, so the two are best read as parallel designs rather than one descending from the other.
Status history
- 2020-02-06: first commit of the specification repository (repository created 2020-02-07). Source [4]
- 2023-04-20: documentation rewrite renames LSAT to L402 in the specification. Source [4]
- 2023-06-06: bLIP-0026 “L402: The Lightning HTTP 402 Protocol” created (PR #26 opened 2023-06-07). Source [2, 5]
- 2023-07-05: Aperture
v0.2-betarelease. Source [6] - 2026-02-25: bLIP-0026 rewritten with a token-agnostic
token=parameter andversion="0". Source [2, 5] - 2026-03-10: Lightning Labs repository aligned with the bLIP rewrite and adds an agent-oriented spec (
agent-spec.md). Source [4] - 2026-03-11: Lightning Labs says development will continue in its standalone L402 repository. Source [5]
- 2026-03-20: repository returns to the
macaroon=header format; spec kept. Source [4] - 2026-03-25: Aperture
v0.5.0release. Source [6]
Relations at a glance
| Protocol | Relation | Note |
|---|---|---|
| x402 | Competes with | Both are HTTP 402 payment schemes for APIs and agents. The x402 exact scheme on lnbtc reuses the preimage-as-proof idea without a macaroon; no source claims that x402 descends from L402. |
| Stripe MPP (Machine Payments Protocol) | Competes with | MPP also uses the HTTP 402 challenge pattern, and its specs repository defines Lightning charge and session methods (Lightspark authors) that do not use L402 tokens. |
Sources
- L402 specification repository (external link)
- bLIP-0026: L402: The Lightning HTTP 402 Protocol (PR head text) (external link)
- L402: Lightning HTTP 402 Protocol (Builder's Guide) (external link)
- lightninglabs/L402 commit history (external link)
- blip-0026: L402 - Lightning HTTP 402 Protocol (pull request #26) (external link)
- Aperture: L402 reverse proxy (external link)
- Scheme: exact on Lightning (lnbtc) (external link)
- MPP Lightning charge and session method drafts (draft-lightning-charge-00, draft-lightning-session-00) (external link)
- bLIP-0026: L402 (pull request #26 head, open and unmerged) (external link)