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

Relations at a glance

How L402 and the Lightning Network relates to each protocol
ProtocolRelationNote
x402Competes withBoth 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 withMPP 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.

Back to the orbit

Sources

  1. L402 specification repository (external link)Lightning Labs. Specification, primary source. Accessed .
  2. bLIP-0026: L402: The Lightning HTTP 402 Protocol (PR head text) (external link)Lightning bLIPs (Olaoluwa Osuntokun, Oliver Gugger, Wilmer Paulino). Specification, primary source. Published . Accessed .
  3. L402: Lightning HTTP 402 Protocol (Builder's Guide) (external link)Lightning Labs. Documentation, primary source. Accessed .
  4. lightninglabs/L402 commit history (external link)Lightning Labs (GitHub). Repository, primary source. Published . Accessed .
  5. blip-0026: L402 - Lightning HTTP 402 Protocol (pull request #26) (external link)lightning/blips (GitHub). Standard, primary source. Published . Accessed .
  6. Aperture: L402 reverse proxy (external link)Lightning Labs (GitHub). Repository, primary source. Published . Accessed .
  7. Scheme: exact on Lightning (lnbtc) (external link)x402 Foundation. Specification, primary source. Published . Accessed .
  8. MPP Lightning charge and session method drafts (draft-lightning-charge-00, draft-lightning-session-00) (external link)MPP specs repository (authors from Lightspark). Specification, primary source. Accessed .
  9. bLIP-0026: L402 (pull request #26 head, open and unmerged) (external link)Lightning bLIPs. Standard, primary source. Published . Accessed .

Source details

    Loading the index.

    Enter open Esc close ? shortcuts