Activate with Lightning (L402 Fast Lane)
L402 Fast Lane lets you create a Lightning Enable account and start a full 30-day Agentic Commerce trial by paying a single 100-sat L402 challenge — no credit card. The signup itself runs on L402: 402 → pay → macaroon proof → account activated. You use the exact payment flow your own APIs and agents will use.
That option pays a subscription with Bitcoin for a discount. Fast Lane is a no-card trial activated with a tiny Lightning payment — two different things.
- A funded Lightning wallet with a little more than 100 sats (to cover the routing fee). L402 requires a wallet that surfaces the payment preimage — LND, Strike, or an NWC wallet (CoinOS, Alby Hub, CLINK). OpenNode and Primal NWC don't surface preimages and won't work here.
- About a minute.
The fastest path: the MCP tool
If you run the Lightning Enable MCP with a connected wallet, one tool call does everything:
create_lightning_enable_account(email="you@example.com")
It pays the 100-sat challenge, returns your merchant API key and trial details, and writes the key into ~/.lightning-enable/config.json so the API-key-gated producer tools unlock on the next restart. Requires MCP ≥ 1.15.0 (dotnet tool update -g LightningEnable.Mcp or pip install -U lightning-enable-mcp).
Dev CLI: l402-requests (Python)
Prefer a script? The l402-requests client auto-detects your wallet and handles the whole 402 → pay → retry handshake, preserving your email through the paid retry:
# pip install "l402-requests>=0.5.0" # 0.5.0 adds NIP-44 NWC support (Alby Hub, etc.)
from l402_requests import L402Client
client = L402Client() # auto-detects LND > NWC > Strike > OpenNode from env / config
resp = client.post(
"https://api.lightningenable.com/api/signup/l402",
json={"email": "you@example.com"},
timeout=60,
)
data = resp.json()
print("API key: ", data["apiKey"]) # save this — it's shown once
print("Trial ends:", data["trialEndsAt"])
print("Dashboard: ", data["dashboardUrl"])
The .NET and TypeScript clients do the same handshake — point them at the same endpoint with a JSON { "email": "…" } body.
Raw protocol (any language)
Before spending anything, you can fetch a read-only quote — GET https://api.lightningenable.com/api/signup/l402 returns availability, the current price and trial terms, required fields, and the exact flow, with no side effects.
The endpoint itself is a standard two-phase L402 flow, so you can drive it by hand:
- Ask for the challenge —
POST /api/signup/l402with body{"email":"you@example.com"}. You get402 Payment Requiredwith aWWW-Authenticate: L402 macaroon="…", invoice="…"header. - Pay the invoice with any preimage-surfacing wallet to obtain the preimage.
- Complete — repeat the POST with the same body plus
Authorization: L402 <macaroon>:<preimage>. You get200 OKand your account:
{
"status": "created",
"apiKey": "lgw_…",
"merchantId": 123,
"email": "you@example.com",
"planTier": "individual",
"subscriptionStatus": "trialing",
"trialEndsAt": "2026-08-06T00:00:00Z",
"dashboardUrl": "https://api.lightningenable.com/dashboard",
"nextSteps": [
{ "id": "store_api_key", "title": "Store your API key", "detail": "…", "url": "https://api.lightningenable.com/dashboard/settings" },
{ "id": "connect_payment_provider", "title": "Connect a payment provider", "detail": "…", "method": "PUT", "endpoint": "/api/merchant/strike-key", "url": "https://api.lightningenable.com/dashboard/login", "docs": "https://docs.lightningenable.com/strike-setup/account-setup" },
{ "id": "mint_first_challenge", "title": "Mint your first L402 challenge", "detail": "…", "method": "POST", "endpoint": "/api/l402/challenges", "docs": "https://docs.lightningenable.com/products/agentic-commerce/producer-api-reference" },
{ "id": "trial", "title": "Manage your trial", "detail": "…", "url": "https://api.lightningenable.com/dashboard" },
{ "id": "docs", "title": "Read the full guide", "detail": "…", "url": "https://docs.lightningenable.com/getting-started/activate-with-lightning", "docs": "https://api.lightningenable.com/llms.txt" }
],
"instructions": "Your Lightning Enable account is ready. 1) Store your API key now — it is shown only in this response… (full plain-text walkthrough of the same five steps)"
}
nextSteps is an ordered array (always these five ids, in this order) for callers that branch on structured data; instructions is the same guidance as plain text for callers that only relay text. A welcome email also goes to the signup address.
Semantics worth knowing (all activation paths)
These apply whether you used the MCP tool, the Python client, or the raw protocol:
- Enumeration-safe by design: the challenge phase never reveals whether an email is registered — an already-registered email mints an identical 402. If the email already has an account, the paid verify returns
409 merchant_existsand the ~100-sat fee is not refunded, so confirm the email is correct and new before paying. Agents: always use the operator's real email, never an invented one. - Verify promptly after paying. The credential expires (about an hour). A late verify returns
401— indistinguishable from an invalid token — and re-POSTing mints a new payable invoice; the first payment is not automatically recovered. If you paid, complete the retry right away. An unpaid or abandoned challenge never creates an account, and an unpaid401costs nothing — just re-POST for a fresh challenge. - The API key is shown once in the success response. It is recoverable later by signing in at the dashboard via a magic-link email to your signup address — so the email must be real and reachable. (Regenerating the key from Settings invalidates the old one immediately.)
- A welcome email is sent to the signup address right after the account is created — the same guidance as the response's
nextSteps/instructions, written for the human behind the agent. It never contains the API key or the L402 macaroon. Sending is best-effort: a delivery problem never fails or delays the signup response, and it is sent exactly once per created account (not on a409 merchant_existsretry).
First success after activation
Prove the account works end-to-end for about 1 sat, without building an API first:
- Save the returned
apiKeysecurely. - Connect your payment provider — add your Strike (recommended) or OpenNode API key, or an NWC wallet connection, in the dashboard Settings. Challenges settle to your provider account; until one is connected, challenge creation returns
400 payment_provider_not_configured. - Create a 1-sat challenge:
POST /api/l402/challenges(or thel402_producerMCP tool withaction="create") with any resource name andpriceSats: 1. - Pay your own challenge with your wallet (
pay_l402_challenge). - Verify it:
POST /api/l402/challenges/verify(orl402_producerwithaction="verify") — avalid: trueresponse confirms your producer account is fully provisioned.
What you get
- A 30-day Agentic Commerce trial: unlimited L402 endpoints, per-endpoint pricing, and the live dashboard with a per-request payment feed.
- Your merchant API key — save it, it's shown once. It unlocks the L402 Producer API and the API-key-gated MCP producer/ASA tools.
- Sign in anytime at the dashboard.
After the trial
Add billing to keep Agentic Commerce, or do nothing and your account automatically moves to the Free Producer Sandbox (3 endpoints, limited monthly challenge volume, 1,000-sat max challenge price). Either way you keep your account and endpoints — prefer the no-code path? Start the Sandbox directly at api.lightningenable.com/dashboard/signup.
To keep Agentic Commerce without a card, pay for it in sats with the same L402 flow you used to sign up. See Renew in sats.
The Sandbox's 3 endpoints means 3 distinct resource paths, counted for the life of the account — unlike the monthly challenge volume, this tally doesn't reset. Reuse your paths while experimenting rather than minting a fresh one each time. If a throwaway or test path ends up permanently holding a slot, email support@lightningenable.com and we can retire it to free the slot.
Renew in sats
Agentic Commerce costs $49 a month by card, or a sats price per 30-day period paid over Lightning with an L402 challenge. It's the same plan with the same features; only the way you pay differs.
The sats price isn't stated on this page: read it from the quote, GET /api/merchant/subscription/renew (see Check the price first), which returns it in priceSats. The sats price is configuration and can change; a challenge you already hold is honored at the price it was issued at unless the price has gone up, in which case mint a fresh one.
Who can renew in sats
You can pay for Agentic Commerce in sats if your account is one of these:
- A Free Producer Sandbox account.
- A Fast Lane trial account. If you pay during the trial, the 30 days start when the trial would have ended.
- A sats-paid account, whether its period is still running or has lapsed.
- An account whose card subscription is canceled (Stripe status
canceledorincomplete_expired). Paying in sats moves the account off Stripe: the Stripe subscription ID is cleared and the Stripe customer ID is kept. - An account paid through the legacy Bitcoin checkout, while its Bitcoin period is still running. The 30 days start when that period ends. Once the Bitcoin period lapses, the legacy job deactivates the account and its API key stops working, so it can't reach the renew endpoint; email support@lightningenable.com to restore it.
You can't renew in sats while the account has a card subscription that isn't canceled, including one that is trialing, past due, unpaid, incomplete, or paused (cancel it in the billing portal first, so the card is never charged alongside your sats), on Agentic Commerce — Business (email support@lightningenable.com), or on an account an operator has disabled.
Both calls need your merchant API key in the X-API-Key header, and you need a wallet that surfaces the payment preimage, the same wallets listed at the top of this page.
The fastest path: the MCP tool
If you run the Lightning Enable MCP with a connected wallet and your merchant API key configured, one tool call pays the renewal:
renew_lightning_enable_subscription(maxSats=<priceSats from the quote>)
maxSats is the most this call may pay; the server sets the price. Set it to at least the priceSats that the quote returns. The Python server spells it max_sats. The standard and full profiles list the tool; under lite it isn't listed but stays callable by name. It requires MCP 2.1.0 or later.
If maxSats is above your auto-approve threshold, the tool returns requiresConfirmation: true and the server sends a confirmation code to the human operator over its approval channel (its console by default). The code never appears in a tool result. Ask the human for the code, then call the tool again with the same maxSats and confirmationNonce="<code>" (confirmation_nonce in Python).
On success the tool returns the paid-through date, the amount, and the payment hash. Sats amounts in these examples are shown as placeholders such as <from the quote>. In a real response they're integers, and the live renewal price is whatever GET /api/merchant/subscription/renew returns in priceSats.
{
"success": true,
"currentPeriodEnd": "2026-11-10T14:03:22Z",
"paidSats": <priceSats you paid>,
"paymentHash": "9f2c4e7a1b3d5f60718293a4b5c6d7e8f9012a3b4c5d6e7f8091a2b3c4d5e6f7a",
"alreadyCredited": false,
"planTier": "individual"
}
Every call to the tool starts with a fresh challenge, so a second call buys a second period.
Dev CLI: l402-requests (Python)
The l402-requests client handles the 402 → pay → retry handshake and keeps your headers on the retry. Send X-API-Key and a POST with an empty body. The client's default budget caps a single payment at 1,000 sats, so read the renewal price from the quote and raise the budget to cover it:
import requests
from l402_requests import BudgetController, L402Client
quote = requests.get(
"https://api.lightningenable.com/api/merchant/subscription/renew",
headers={"X-API-Key": "le_merchant_abc123"},
timeout=30,
).json()
price = quote["priceSats"] # the live renewal price
budget = BudgetController(
max_sats_per_request=price,
max_sats_per_hour=price,
max_sats_per_day=price * 2,
)
client = L402Client(budget=budget) # auto-detects LND > NWC > Strike > OpenNode
resp = client.post(
"https://api.lightningenable.com/api/merchant/subscription/renew",
headers={"X-API-Key": "le_merchant_abc123"},
timeout=60,
)
data = resp.json()
print("Paid through:", data["currentPeriodEnd"])
print("Paid sats: ", data["paidSats"])
An L402Client caches the token it paid for. A second post to the same URL on the same client replays that token and answers alreadyCredited: true rather than buying another period. To prepay another period, create another client.
Raw protocol (any language)
The endpoint is a standard two-phase L402 flow:
-
Ask for the challenge.
POST /api/merchant/subscription/renewwith your API key and noAuthorizationheader. You get402 Payment Requiredwith aWWW-Authenticate: L402 macaroon="…", invoice="…"header and this body:{
"invoice": "lnbc…",
"macaroon": "AgEB…",
"paymentHash": "9f2c4e7a1b3d5f60718293a4b5c6d7e8f9012a3b4c5d6e7f8091a2b3c4d5e6f7a",
"expiresAt": "2026-10-11T15:03:22Z",
"priceSats": <from the quote>,
"periodDays": 30,
"currentPeriodEnd": null,
"periodEndIfPaid": "2026-11-10T14:03:22Z",
"instructions": "Pay the Lightning invoice, then retry this request with Authorization: L402 <macaroon>:<preimage>."
} -
Pay the invoice before
expiresAtwith a wallet that returns the preimage. -
Complete. Repeat the
POSTwith your API key andAuthorization: L402 <macaroon>:<preimage>. You get200 OK:{
"success": true,
"alreadyCredited": false,
"planTier": "individual",
"currentPeriodEnd": "2026-11-10T14:03:22Z",
"paidSats": <priceSats you paid>,
"paymentHash": "9f2c4e7a1b3d5f60718293a4b5c6d7e8f9012a3b4c5d6e7f8091a2b3c4d5e6f7a"
}
The same two calls with curl:
# 1. Get the challenge
curl -i -X POST https://api.lightningenable.com/api/merchant/subscription/renew \
-H "X-API-Key: le_merchant_abc123"
# 3. Complete, after paying the invoice
curl -X POST https://api.lightningenable.com/api/merchant/subscription/renew \
-H "X-API-Key: le_merchant_abc123" \
-H "Authorization: L402 <macaroon>:<preimage>"
Every POST without an Authorization header mints a fresh challenge with a new invoice, so a second challenge buys a second period. You can request up to 5 challenges a minute per API key; past that the endpoint answers 429. Redeeming a token has its own, larger allowance, so asking for challenges never blocks a token you've paid.
The token is bound to your account. It can't renew another account, and another account's API key can't redeem it. It stays redeemable for 7 days after the challenge is issued.
Each payment is credited once. Sending the same token again returns 200 with alreadyCredited: true and the paid-through date that payment produced; it never charges you or extends the period a second time. That date can be earlier than your current paid-through date if you've paid again since.
The success body never contains the macaroon or the preimage.
Check the price first
GET /api/merchant/subscription/renew returns the price, the period, whether your account can renew, and the paid-through date a payment would produce. It creates no invoice and has no side effects, so an agent can call it before deciding to pay:
curl https://api.lightningenable.com/api/merchant/subscription/renew \
-H "X-API-Key: le_merchant_abc123"
{
"eligible": true,
"reason": null,
"priceSats": <from the quote>,
"periodDays": 30,
"paymentMethod": "l402",
"currentPeriodEnd": "2026-11-10T14:03:22Z",
"periodEndIfPaid": "2026-12-10T14:03:22Z",
"endpoint": "/api/merchant/subscription/renew"
}
When eligible is false, reason says why. See the Merchant Settings API for every field.
What happens at the end of the period
Nothing charges you automatically. Once your paid-through date passes, authenticated API calls answer 403 with action_required: "renew_subscription" and the renew endpoint:
{
"error": "Subscription period expired",
"message": "Your Lightning-paid subscription period has ended. Renew now with an L402 payment, or the account moves to the Free Producer Sandbox within 24 hours.",
"subscription_status": "active",
"current_period_end": "2026-11-10T14:03:22.0000000Z",
"action_required": "renew_subscription",
"renew": { "endpoint": "/api/merchant/subscription/renew" }
}
A daily job (03:30 UTC) then moves the account to the Free Producer Sandbox and sends you an email. Your API key keeps working within the Free limits and the account stays active, so you can pay again at any time. A payment after the period has lapsed starts its 30 days from the moment you pay.
The renew endpoint is exempt from subscription enforcement, so a lapsed account can always reach it.
Prepaying
Each payment adds 30 days to the later of today and your current paid-through date. You can keep paying ahead while your paid-through date is no more than 365 days away; past that, asking for a new challenge answers 409 prepaid_cap_reached.
The cap applies when you ask for a challenge, not when you redeem one. A token you've already paid is credited even if another payment has since moved your paid-through date past 365 days. Each token stays redeemable for 7 days after its challenge is issued.
Where the sats go
Your payment settles with the payment provider of the Lightning Enable account that receives renewals. Lightning Enable does not hold funds; the payment provider facilitates custody and settlement.
Troubleshooting
| Status and code | What it means | What to do |
|---|---|---|
409 stripe_subscription_active | This account has a card subscription that isn't canceled (for example active, trialing, past due, or unpaid). | Cancel it in the billing portal, then renew in sats. |
409 business_plan_contact_support | The account is on Agentic Commerce — Business. | Email support@lightningenable.com. |
409 prepaid_cap_reached | You asked for a challenge while already paid more than 365 days ahead. The body carries currentPeriodEnd. A token you've already paid is still credited. | Wait until your paid-through date is within 365 days. |
429 | More than 5 challenge requests a minute from this API key. | Wait a minute, or redeem the challenge you already have. |
403 account_disabled | An operator disabled the account. | Email support@lightningenable.com. |
401 invalid_l402_token | The token was minted for another account, has expired, was altered, doesn't match a renewal challenge, or was minted at a price lower than the configured price. | POST without an Authorization header for a fresh challenge. |
400 invalid_authorization | The Authorization header isn't L402 <macaroon>:<preimage>. | Fix the header, or omit it to get a challenge. |
503 renewal_contended | Another request was updating your account. Your payment is safe. | Retry the same request with the same Authorization header after the Retry-After delay. It's credited at most once. |
503 upstream_unavailable or 503 challenge_persist_failed | No invoice was issued. | Retry shortly. |
503 l402_subscription_unavailable or 503 l402_subscription_misconfigured | Lightning renewals are switched off or not set up on this deployment. | Retry later, or email support@lightningenable.com. |
If a 409, 403, or 503 arrives after you paid, keep the token. Nothing was credited, and the same token stays redeemable, until it expires 7 days after its challenge was issued, once the cause is fixed. A 401 invalid_l402_token is different: a token that was altered, minted for another account, or already credited to another account is refused permanently. If you paid a challenge minted before a price increase, that payment is never credited; email support@lightningenable.com with the payment hash. See the error reference for the full response bodies.
Next step: sell with your agent
You have an API key and a producer account — the next step is turning that into a paid endpoint. Sell With Your Agent picks up right here: give your agent a receive wallet, a spend ceiling, and the API you want to charge for, and the producer-setup skill wires up the whole path — proxy, manifest, and a self-test payment that proves it works — with no dashboard clicking required.
Lightning Enable is API middleware and never holds your funds. Your wallet pays the challenge directly, and your chosen settlement provider (Strike or OpenNode) custodies every payment on the APIs you monetize.