bolthub
PricingBlogDocs
bolthub

Lightning pay-per-call for MCP tools and APIs. Agents pay per call and you keep custody, straight to your wallet. Built for tool builders and AI teams.

contact@bolthub.ai

Product

All productsbolthub Pay SDKHosted platformToolClientAPI HubNode LauncherPricingFor tool buildersFor agent buildersCharge for your toolsDocs

Legal

Terms of ServicePrivacy PolicySecurityAcceptable Use

Resources

API HubBlogWhat is L402?L402 vs x402RSS feed

Packages

npm

@bolthub/​payPayments SDK@bolthub/​mcpMCP server@bolthub/​cliCLI@bolthub/​verifyOrigin verifier

PyPI

bolthubPython SDKbolthub-verifyPython verifier
bolthub

© 2026 Signal Tech Pty Ltd. All rights reserved.

All posts
March 10, 2026
L402AI AgentsLightning

What Is L402 and Why It Matters for the AI Agent Economy

The status code that waited 29 years

When HTTP/1.1 was standardized in 1997, status code 402 was reserved "for future use." The spec imagined a web where browsers could pay for content natively, but the payment infrastructure didn't exist.

Lightning Network changed that. With sub-second settlement and sub-cent fees, Lightning makes the original vision of HTTP 402 practical.

L402 is the protocol that connects them: when a server returns 402, it includes a Lightning invoice in the response. The client pays, gets a cryptographic receipt, and retries the request with proof of payment.

Why this matters now

The rise of AI agents creates a new problem: machines need to buy data from other machines. Traditional payment flows assume a human operator at a credit card form. An autonomous agent can't complete KYC or manage 50 different API subscriptions.

L402 solves this because:

  • •No accounts needed. The payment IS the authentication.
  • •Micropayments work. An agent can pay 1 sat per query. Card processors won't touch that.
  • •Instant settlement. No bank transfers, no net-30.
  • •Privacy-preserving. No identity trail, no tracking across providers.
  • •Permissionless. Any agent in any country can pay any API instantly.

How the L402 flow works

  1. Client sends a standard HTTP request
  2. Server responds with 402 Payment Required + a Lightning invoice + an L402 token
  3. Client pays the Lightning invoice (typically < 1 second)
  4. Client retries the original request with the L402 token and proof of payment
  5. Server validates the payment proof and returns the data

The entire flow adds roughly 200–500ms to the first request. Subsequent requests (with session tokens or token buckets) are zero-overhead.

The machine economy needs machine-native payments

Every major AI framework (LangChain, CrewAI, AutoGen) is building tool-use capabilities. These agents need to fetch data and call APIs. The bottleneck isn't intelligence. It's the payment layer.

L402 is the missing piece: a payment protocol that works the same way for a human with a browser and an AI agent with a Python script.

Getting started

bolthub makes any HTTP API L402-compatible in minutes. Point to your existing API, set a price, and start accepting Lightning payments. No code changes required.

Start your free trial →

Start charging

Charge for your toolsCharge per call. Payments settle straight to your wallet, non-custodially.For AI agentsGive your agent a budget and let it pay for any API in the hub, with no keys or signups.
What is L402?PricingBrowse the API Hub