L402 is a payment protocol that combines the long-dormant HTTP 402 "Payment Required" status code with Lightning Network invoices and a macaroon-based capability token. A client requests a resource; the server replies 402 with a Lightning invoice; the client pays the invoice and gets back a token that authorizes subsequent requests. The whole exchange is permissionless, no account or API key required. L402 matters for the open-source AI conversation because AI agents are becoming economic actors (paying for tool calls, inference, data) and the rails they pay on determine who can become an economic agent without permission. The sibling protocols are x402 (Coinbase's 2025 stablecoin-anchored revival of HTTP 402, on-chain settlement instead of Lightning) and various early MCP commerce extensions that propose paying for MCP tool calls directly. The closed counterpart is Stripe Agent SDK, which works fine but binds the agent to a Stripe account. Production-ready spec since 2020. Used by Lightning Labs' own Loop / Pool / Aperture services, by HRF-funded projects like Routstr (an LLM routing marketplace on Nostr that uses L402 for payment) and PayPerQ (a chatbot gateway that accepts Lightning), and by an emerging set of agent-payment startups. The honest limit: adoption is still concentrated in the Bitcoin-Lightning ecosystem; broader AI-agent adoption depends on whether the ecosystem treats Lightning as a viable rail or moves to on-chain stablecoin alternatives.
The Stack · Protocols · Open source
L402
Lightning Labs payment protocol pairing HTTP 402 with Lightning Network invoices; the original agentic-payments rail.
Sources
- L402 Documentation (Lightning Labs) https://docs.lightning.engineering/the-lightning-network/l402
- L402 on GitHub https://github.com/lightninglabs/L402
- HRF AI for Individual Rights — Routstr https://hrf.org/latest/hrf-announces-support-for-projects-advancing-ai-for-individual-rights/
- HTTP 402 (W3C) https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/402
- docs.lightning.engineering (audit-verified) https://docs.lightning.engineering/the-lightning-network/l402
Want a follow-up? Ask the chat about L402 in context. It will compare to siblings at the same layer and ground every claim in the wiki.
Other projects at the Protocols layer
5 siblings · ordered open first
- Model Context Protocol (MCP) Open source
Anthropic-seeded protocol for tool and context exchange; donated to the Linux Foundation's AAIF Dec 2025; de facto standard.
- Agent-to-Agent (A2A) Open source
Google-seeded protocol for inter-agent communication; under Linux Foundation; 150+ org signatories.
- Agentic AI Foundation (AAIF) Open source
Linux Foundation umbrella for agent and protocol governance; founded Dec 2025; hosts MCP, goose, AGENTS.md.
- x402 Open source
Coinbase's HTTP 402 revival with on-chain settlement; under the Linux Foundation; Stripe shipped an x402 integration in 2026.
- Agent Client Protocol (ACP) Open source
Protocol for agent-to-client communication (IDEs, chat clients); less mature than MCP.