{"scheme":"L402","name":"L402 (formerly LSAT)","summary":"Lightning-native HTTP 402: the server returns a macaroon and a BOLT 11 invoice; the client pays and presents the macaroon with the payment preimage as proof. Payment and authorization arrive in one header, and the token is reusable.","status":"Stable specification maintained by Lightning Labs since 2020.","settlement":"Bitcoin over the Lightning Network — sub-second, sized down to single satoshis.","challenge":{"where":"WWW-Authenticate header","format":"L402 macaroon=\"<base64 macaroon>\", invoice=\"<BOLT 11 invoice>\""},"credential":{"where":"Authorization header","format":"L402 <macaroon>:<preimage as hex>"},"receipt":{"where":null,"format":null},"notes":["The macaroon's caveats restrict what the token grants — services, capabilities, expiry.","Some servers still use the legacy scheme name LSAT; reply with the name the server used.","The paying wallet must return the payment preimage; not every wallet does.","Tokens minted by Aperture commit to the invoice's payment hash in the macaroon identifier."],"flow":["Client requests the resource.","Server replies 402 with WWW-Authenticate: L402 macaroon=…, invoice=….","Client pays the BOLT 11 invoice and obtains the 32-byte preimage.","Client retries with Authorization: L402 <macaroon>:<preimage>.","Server verifies the macaroon and that sha256(preimage) equals the payment hash, then serves the resource."],"example":"HTTP/1.1 402 Payment Required\nWWW-Authenticate: L402 macaroon=\"AGIAJEemVQ...\", invoice=\"lnbc100n1p...\"\n\nGET /resource HTTP/1.1\nAuthorization: L402 AGIAJEemVQ...:8c1f2b9a...","specs":[{"title":"L402 protocol specification (GitHub)","url":"https://github.com/lightninglabs/L402"},{"title":"L402 (Lightning Labs docs)","url":"https://docs.lightning.engineering/the-lightning-network/l402"},{"title":"l402.tech","url":"https://l402.tech/"},{"title":"BOLT 11: invoice protocol","url":"https://github.com/lightning/bolts/blob/master/11-payment-encoding.md"}],"implementations":[{"id":"lightning-labs-wavelength","name":"Lightning Labs Wavelength","roles":["pay","charge"],"kind":"wallet","url":"https://402mcp.org/solutions/lightning-labs-wavelength"},{"id":"alby-mcp","name":"Alby MCP Server","roles":["pay","charge"],"kind":"mcp-server","url":"https://402mcp.org/solutions/alby-mcp"},{"id":"lightning-labs-lnget","name":"lnget","roles":["pay"],"kind":"client","url":"https://402mcp.org/solutions/lightning-labs-lnget"},{"id":"lightning-labs-aperture","name":"Aperture","roles":["charge"],"kind":"gateway","url":"https://402mcp.org/solutions/lightning-labs-aperture"},{"id":"fewsats-l402","name":"Fewsats","roles":["pay"],"kind":"platform","url":"https://402mcp.org/solutions/fewsats-l402"}]}