Monetize Any API with Lightning Payments
Give AI a wallet. Set a budget. Let it work. Lightning Enable lets AI agents pay for premium APIs, data, and content automatically. L402 protocol turns any API into a pay-per-request service with instant settlement.
How L402 API Payments Work
Client Requests Access
An AI agent or HTTP client tries to access a premium API endpoint.
402 Payment Required
The API returns HTTP 402 with a Lightning invoice for the exact cost.
Instant Payment
The client pays the invoice. AI agents do this automatically via MCP tools.
Access Granted
Payment confirmed in milliseconds. The client receives the API response.
Zero Infrastructure Required
Lightning Enable is a fully hosted SaaS. Subscribe, configure, and start earning — no servers, no Lightning node, no DevOps.
- No Lightning node — your payment provider (Strike or OpenNode) handles routing and liquidity
- No liquidity management — no channel balancing, no inbound capacity
- No custom servers — no Docker, no Kubernetes, no self-hosted middleware
- No protocol expertise — configure via visual dashboard in minutes
| Lightning Enable | Self-Hosted L402 | |
|---|---|---|
| Lightning Node | Not needed | Required (LND/CLN) |
| Liquidity | Handled by provider | Manual channel management |
| Server Setup | None — fully hosted | Docker + reverse proxy |
| Time to Deploy | 5 minutes | Days to weeks |
| Ongoing Maintenance | Zero | Node updates, backups, monitoring |
The Internet's First Agent-First Store
store.lightningenable.com — where AI agents browse, select, and purchase products with zero human intervention. Humans only step in to enter a shipping address.
Agent-First Payments
AI agents pay Lightning invoices autonomously using MCP tools. No credit card forms. No checkout flows. No human needed to complete a purchase.
Human Compatible
Every Lightning invoice works in any wallet app. Scan a QR code, tap to pay. The same store serves both AI agents and humans seamlessly.
L402 Spam Prevention
Community design submissions are gated by a 5,000 sat L402 payment. Real economic cost replaces CAPTCHAs—zero spam since launch, zero user friction.
100% to OpenSats
All Community Collection profits go to OpenSats, funding open-source Bitcoin development. Buy a shirt, support the ecosystem.
How It Works
pay_invoice. No forms, no accountsDesigners: Submit your Lightning-themed artwork. Pay 5,000 sats to submit. If approved, your design goes on sale and all profits fund OpenSats.
Built for API Monetization
MCP Server (Free)
Free MCP server for Claude Code, Cursor, and Windsurf. AI agents can pay invoices, manage budgets, and access L402 APIs automatically—all tools included at no cost.
Open source on GitHub →Pay-Per-Request Access
Charge per API call instead of monthly subscriptions. Clients pay only for what they use. L402 turns any endpoint into a metered service.
Instant Settlements
Payments settle in under 1 second. No chargebacks, no fraud, no waiting 2-3 business days for your money.
Global Access
Accept payments from anywhere in the world without currency conversion, international fees, or payment processor restrictions.
Developer-Friendly API
Clean REST API with comprehensive documentation. Get up and running quickly with code examples and webhook integration.
Spam & Abuse Prevention
Use L402 payments as proof-of-intent. Gate submissions, uploads, or API access behind micropayments to eliminate bot abuse without CAPTCHAs.
L402-Requests — HTTP for the Paid Web
Three lines. Paid APIs just work.
Install the library. Set one env var. Write normal code. Invoices are paid automatically, credentials cached, budgets enforced.
Built-In Tools for AI Agents
Lightning Enable provides a free MCP server with constrained payment tools. All tools are included—no paid upgrades required. AI agents execute payments within boundaries you define.
Available MCP Tools (All Free)
pay_invoice
Pay any Lightning invoice directly
access_l402_resource
Access paywalled APIs automatically
configure_budget
Set spending limits per session
check_wallet_balance
Monitor available funds
get_payment_history
Review past transactions
Example: AI Research Assistant
"Find me the latest research on quantum computing and summarize the key findings."
- AI searches for relevant papers
- Encounters paywall on premium database
- Uses
access_l402_resourceto pay $0.25 - Downloads and summarizes the paper
- Continues research without human intervention
L402 as Anti-Spam & CAPTCHA Alternative
Proof-of-payment beats proof-of-humanity. A small Lightning payment is more privacy-preserving and more effective than CAPTCHAs at filtering spam.
- No tracking cookies — payments are cryptographic proof, not browser fingerprints
- Bot-resistant — economic cost makes bulk spam unprofitable
- Frictionless for real users — pay a few sats instead of solving puzzles
- Revenue-positive — spam prevention that generates income instead of costing money
How it works: Gate form submissions, API endpoints, or content uploads behind a small Lightning payment (e.g. a few thousand sats). Legitimate users pay once and proceed. Spammers face real economic cost at scale.
| Approach | Spam Blocking | User Experience | Privacy |
|---|---|---|---|
| L402 Payment | Excellent | Seamless | High |
| reCAPTCHA | Good | Frustrating | Low (Google tracking) |
| Email verification | Moderate | Slow | Low (PII required) |
| Rate limiting | Basic | Good | High |
Real-World Use Cases
🧠 AI Model Inference APIs
Challenge: Running large language models costs $0.01-$0.50 per API call. Stripe's $0.30 fixed fee makes these transactions unprofitable.
Solution: Charge exactly what the API call costs plus margin. With Lightning, a $0.10 call costs you $0.001 in fees (1%), leaving $0.099 profit vs. losing money with credit cards.
🛡 Anti-Spam & Content Gating
Challenge: Form submissions, file uploads, and user-generated content attract bots and spam. CAPTCHAs frustrate real users and leak data to third parties.
Solution: Require a small Lightning payment as proof-of-intent. Legitimate users pay once and proceed. Spammers face real economic cost. No tracking, no puzzles, no PII.
🔍 Premium Data APIs
Challenge: Providing real-time data (stock prices, research reports, analytics) requires frequent small payments that traditional processors can't handle.
Solution: Charge per API request ($0.01-$0.50). AI agents and automated clients access your data, pay automatically, and continue their work without human intervention.
🛒 AI Agent Commerce
Challenge: AI agents need to purchase services, access paywalled content, and complete transactions autonomously—but credit cards require human interaction.
Solution: Lightning payments are programmable and instant. AI agents pay via MCP tools within human-defined budget limits. No credit card forms, no manual approval steps.
Frequently Asked Questions
- Budget caps that cannot be bypassed at runtime
- Per-request limits preventing runaway spending
- Session-level controls for total spend per task
- Your wallet, your funds—Lightning Enable connects to your chosen wallet via NWC
configure_budget tool lets you set per-session and per-request spending limits. Default limits are 1000 sats per request and 10000 sats per session. These limits are enforced by hard caps configured in your environment—the AI cannot modify or bypass these boundaries.
Ready to Monetize Your API?
Join API providers building the next generation of machine-to-machine commerce—with humans in control.
Get Started Read API Docs