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.

🤖
🛠
Constrained by Design

AI executes within boundaries you define—it does not improvise.

🔒
Your Provider Handles Custody

Your Strike or OpenNode account, your funds. Lightning Enable is API middleware.

How L402 API Payments Work

1

Client Requests Access

An AI agent or HTTP client tries to access a premium API endpoint.

2

402 Payment Required

The API returns HTTP 402 with a Lightning invoice for the exact cost.

3

Instant Payment

The client pays the invoice. AI agents do this automatically via MCP tools.

4

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
Live in Production

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

1
Browse & Select — AI agent (or human) explores the catalog and chooses a product
2
Pay via Lightning — Agent pays the invoice instantly using pay_invoice. No forms, no accounts
3
Claim & Ship — Human enters shipping address via claim link. Order goes to fulfillment
"Buy a Lightning Enable snapback for my colleague's birthday."
Agent: Found 3 products. Snapback is $28 (~85,000 sats). Paying now...
✓ Payment confirmed. Claim link sent.

Designers: 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.

Open Source

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.

pip install l402-requests
import l402_requests
r = l402_requests.get(url)
print(r.json()) # paid ✓
Auto-payment Budget controls Credential caching 4 wallet backends

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."

  1. AI searches for relevant papers
  2. Encounters paywall on premium database
  3. Uses access_l402_resource to pay $0.25
  4. Downloads and summarizes the paper
  5. Continues research without human intervention
Total cost: $0.25  |  Time saved: Hours

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

Yes, but only within strict, human-defined constraints. This is intentional by design. AI agents can pay for API access, premium content, data services, and even physical goods automatically using MCP tools—but every payment operates within hard limits set by humans:
  • 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
The AI executes within boundaries you define—it does not improvise.

Through layered, enforceable constraints. The 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.

Lightning Enable connects to your own Lightning wallet via Nostr Wallet Connect (NWC). You control the wallet, the keys, and the funds. The AI only has permission to request payments up to your configured limits. Lightning Enable doesn't hold funds—your wallet provider handles custody.

Lightning Enable offers three subscription tiers: Agentic Commerce — Individual at $99/month for individual developers, Kentico Commerce at $249/month for Xperience by Kentico e-commerce, and Agentic Commerce — Business at $299/month for pay-per-request API monetization. The MCP server is completely free with all tools included. Your payment provider may charge their own processing fees.

Lightning payments are atomic—they either complete fully or not at all. If a payment fails (insufficient balance, network issue, etc.), the AI receives an error message and can report the issue or try again. No funds are lost in failed payment attempts.

Yes — 30-day money-back guarantee. Try Lightning Enable risk-free. If it's not the right fit within 30 days, we'll issue a full refund, no questions asked. Contact support@lightningenable.com to request a refund.

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

See L402 in action at the Lightning Enable Store →