Agentic Commerce
Creating L402-protected API endpoints requires the Agentic Commerce — Individual ($99/month) or Agentic Commerce — Business plan ($299/month). Using the MCP server to access L402 APIs is completely free — no subscription needed. View pricing
L402 enables pay-per-request API monetization using the Lightning Network. Users pay a Lightning invoice to access your API - no accounts, no subscriptions, no credit cards required.
Strike (recommended): Create a Strike account and generate an API key — no KYB required to start. Strike supports preimage extraction for L402.
OpenNode: Create an OpenNode dev account for testnet testing — no KYB required. Swap to a production key after KYB verification (2-4 business days).
Zero Infrastructure Required
Unlike other L402 implementations, Lightning Enable is a fully hosted SaaS:
- No Lightning node — your payment provider (Strike or OpenNode) handles all payment routing and liquidity
- No liquidity management — no channel balancing, no inbound capacity planning
- No custom servers — no Docker, no Kubernetes, no self-hosted middleware
- No protocol expertise — configure via dashboard in minutes
What you need:
- Agentic Commerce — Individual ($99/month) or Agentic Commerce — Business ($299/month) subscription
- A payment provider account — Strike (recommended) or OpenNode
- 5 minutes to configure your first proxy in the dashboard
What is L402?
L402 (formerly LSAT) combines:
- HTTP 402 Payment Required - The web's native payment status code
- Lightning Network - Instant Bitcoin micropayments
- Macaroons - Cryptographic bearer tokens with permissions
The Problem
Traditional API monetization requires:
- User accounts and passwords
- Credit cards on file
- Monthly subscriptions (even for light usage)
- Complex billing infrastructure
- Fraud prevention systems
The Solution
With L402:
- No accounts - Pay and access immediately
- No credit cards - Bitcoin only
- Pay-per-use - Only pay for what you consume
- Instant access - Payment confirms in ~1 second
- Global - Anyone with Bitcoin can access
How It Works
1. Client requests API 2. Server returns 402
─────────────────────────────> <─────────────────────
GET /api/premium/data HTTP 402 Payment Required
Invoice: lnbc100n1p...
Macaroon: AgEL...
3. Client pays invoice 4. Client retries with proof
─────────────────────> ─────────────────────────>
Via Lightning wallet Authorization: L402 mac:preimage
(~1 second)
5. Server verifies, grants access
<─────────────────────────
HTTP 200 OK
{ "data": "..." }
Key Benefits
| Traditional API | L402 API |
|---|---|
| Account required | No account needed |
| Credit card on file | No payment method stored |
| Monthly subscription | Pay per request |
| Minimum $5–$20 charge | As low as 1 sat (~$0.0004) |
| Chargeback risk | Impossible to reverse |
| KYC for users | Permissionless access |
Use Cases
AI API Monetization
Charge per API call for AI services:
{
"endpoints": [
{ "path": "/api/ai/gpt4", "price": 500 },
{ "path": "/api/ai/dalle", "price": 1000 },
{ "path": "/api/ai/whisper", "price": 100 }
]
}
Premium Content
Unlock articles, reports, or media:
{
"endpoints": [
{ "path": "/api/articles/premium/*", "price": 50 },
{ "path": "/api/reports/*", "price": 500 }
]
}
Data APIs
Pay-per-query data access:
{
"endpoints": [
{ "path": "/api/market-data/*", "price": 10 },
{ "path": "/api/analytics/*", "price": 25 }
]
}
Proxy Monetization
Monetize third-party APIs you have access to:
{
"proxy": {
"name": "Premium Weather API",
"target": "https://api.weather.com",
"price": 5
}
}
Quick Example
Request Without Payment
curl https://api.yourservice.com/api/premium/data
Response: 402 Payment Required
{
"error": "Payment Required",
"l402": {
"macaroon": "AgELbGlnaHRuaW5nLWVuYWJsZQ...",
"invoice": "lnbc100n1p3...",
"amount_sats": 100,
"payment_hash": "abc123..."
}
}
Pay the Invoice
Use any Lightning wallet (Phoenix, Muun, Zeus, etc.) to pay. Get the preimage.
Request With Payment Proof
curl https://api.yourservice.com/api/premium/data \
-H "Authorization: L402 AgELbGlnaHRuaW5nLWVuYWJsZQ...:abc123def456..."
Response: 200 OK
{
"data": "Premium content here..."
}
Pricing
Agentic Commerce — Individual: $99/month | Agentic Commerce — Business: $299/month
Both plans include L402 protocol support. The Agentic Commerce — Individual plan is ideal for individual developers; the Agentic Commerce — Business plan includes white-glove onboarding.
Includes:
- Full REST API access
- L402 protocol support
- Pay-per-request billing
- AI agent compatibility (MCP)
- White-glove onboarding
Your payment provider may charge their own processing fees.* These go to the provider, not to us.
*Check your provider's current fee schedule for details.For Kentico sites, see Kentico Commerce ($249/mo).
Architecture
Lightning Enable handles the complexity:
+-----------------+
| Your API |
| (Protected) |
+--------+--------+
|
v
+--------+--------+ +------------------+ +-----------------+
| L402 Middleware |----->| Lightning Enable |----->| Strike/OpenNode |
| (Auth Check) | | (Invoice/Verify) | | (Payment) |
+-----------------+ +------------------+ +-----------------+
|
| If valid L402 credential
v
+-----------------+
| Your API Logic |
| (Execute) |
+-----------------+
Lightning Enable runs as a hosted service at api.lightningenable.com. You configure it via the dashboard or REST API — you don't deploy or manage it.
Getting Started
- Subscribe to Agentic Commerce — Individual ($99/month) or Agentic Commerce — Business ($299/month)
- Set up a payment provider:
- Strike (recommended): Create account → generate API key → ready immediately
- OpenNode: Create dev account → no KYB required for testnet
- Log in to the dashboard — enter your email for a magic link
- Add your API key in Dashboard → Settings → Payment Provider
- Create your first proxy — point it at any API you want to monetize
- Test a payment — verify your integration end-to-end
- Go live — for OpenNode, complete KYB (2-4 days) and swap to a production key
Next Steps
- Dashboard Guide - Visual walkthrough with screenshots
- How It Works - Technical deep dive
- MCP Complete Guide - Full MCP documentation
- API Monetization - Protect your APIs
- Proxy Configuration - Monetize any API
- AI Agent Integration - Advanced MCP usage
- Wallet Configuration - Detailed wallet setup