An authentication and payment protocol that combines the HTTP 402 Payment Required status code with Lightning Network invoices and macaroon-based authorisation tokens, enabling per-request access control and machine-to-machine micropayments without user accounts.
Semantic Classification
Content
- L402 ties access to a resource to payment of a Lightning Network invoice. A server responds with HTTP 402 and issues a challenge containing an invoice and a partially constructed authorisation token, which the client completes after settling the payment.
- The authorisation token is a macaroon, a bearer credential that can carry caveats restricting its use. This lets services meter access and charge per request without holding user accounts, making it suited to machine-to-machine micropayments.