Skip to main content

Agentic Commerce

Producer Account Required (free options available)

Creating L402-protected API endpoints requires a Lightning Enable producer account. Start free with the Free Producer Sandbox (3 endpoints, capped monthly challenge volume, 1,000 sats max per challenge — no card), or activate a 30-day Agentic Commerce trial by paying a ~100-sat L402 challenge — no card. Full production use is Agentic Commerce ($49/month) or Business (contact us). Using the MCP server to access L402 APIs is completely free — no account 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.

Start Testing Immediately

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

Strike Setup → | OpenNode Setup →

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 to run — no Docker, no Kubernetes; we host the L402 protocol layer for you
  • No protocol expertise — configure via dashboard in minutes

What you need:

  1. A Lightning Enable producer account — the free Producer Sandbox or no-card L402 Fast Lane trial, or an Agentic Commerce ($49/month) / Business (contact us) subscription
  2. A payment provider account — Strike (recommended) or OpenNode
  3. 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 APIL402 API
Account requiredNo account needed
Credit card on fileNo payment method stored
Monthly subscriptionPay per request
Minimum $5–$20 chargeAs low as 1 sat (~$0.0004)
Chargeback riskImpossible to reverse
KYC for usersPermissionless access

Agent-to-Agent Commerce (Producer API)

New: Agents That Earn

With the L402 Producer API, your AI agents can charge for their services — not just pay for others'. Your agent creates L402 payment challenges, other agents pay them, and your agent verifies payment before granting access. This is the missing piece for true agentic commerce.

One producer MCP tool, l402_producer, action-based:

  • action="create" — Create a 402 challenge with Lightning invoice + macaroon
  • action="verify" — Verify an L402 token to confirm payment before granting access
  • Plus action="configure_receive", "status", "create_proxy", "add_endpoint", "publish", and "list_challenges" — enough to take an API from unconfigured to live and discoverable without the dashboard. See Sell With Your Agent for the walkthrough.

Beyond this, the MCP server also ships the agent-to-agent marketplace (agent_services) tool and create_lightning_enable_account (self-serve signup over Lightning) — see the MCP Complete Guide for the full tool list.

Read the full L402 Producer API guide

Use Cases

API Monetization

Charge per API call for any service:

{
"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: $49/month | Agentic Commerce — Business: Contact us

Both plans include L402 protocol support. Agentic Commerce is the self-serve plan for individual developers; Agentic Commerce — Business adds white-glove onboarding and direct founder access for teams — contact us for details.

Agentic Commerce includes:

  • Unlimited L402 endpoints
  • Strike as settlement provider
  • Per-endpoint pricing
  • Live dashboard + per-request payment feed

Agentic Commerce — Business includes everything in Agentic Commerce, plus:

  • White-glove onboarding
  • Direct founder access (no ticket queues)

Not sure where to start? The Free Producer Sandbox (3 endpoints, 200 challenges/month, 1,000 sats max per challenge, no card) is the risk-free way to prove L402 works before you subscribe.

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.

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) |
+-----------------+
Hosted Service

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

  1. Get a producer account — start free with the Producer Sandbox or the ~100-sat L402 Fast Lane trial, or subscribe to Agentic Commerce ($49/month) / Business (contact us)
  2. Set up a payment provider:
  3. Log in to the dashboard — enter your email for a magic link
  4. Add your API key in Dashboard → Settings → Payment Provider
  5. Create your first proxy — point it at any API you want to monetize
  6. Test a payment — verify your integration end-to-end
  7. Go live — for OpenNode, complete KYB (2-4 days) and swap to a production key

Next Steps

Resources