We just open-sourced L402 HTTP clients for Python, .NET, and TypeScript.
Three lines of code. Paid APIs just work.
Python:
pip install l402-requests
import l402_requests
response = l402_requests.get("https://api.example.com/paid-resource")
.NET:
dotnet add package L402Requests
using var client = new L402HttpClient();
var response = await client.GetAsync("https://api.example.com/paid-resource");
TypeScript:
npm install l402-requests
import { get } from 'l402-requests';
const response = await get("https://api.example.com/paid-resource");
That is the entire integration. No payment logic. No invoice parsing. No retry code. No protocol knowledge required.
Behind the scenes: your app hits an API, gets a 402 + Lightning invoice, the library pays it automatically, retries with L402 credentials, and returns the response. The API got paid and you wrote zero payment code.
Built-in budget controls so you do not accidentally drain your wallet. Works with Strike, LND, NWC (Nostr Wallet Connect), and OpenNode.
This is what makes L402 real for developers. Not a spec. Not a proposal. Working code you can pip install right now.
GitHub:
Docs:
#L402 #lightning #bitcoin #opensource #python #dotnet #typescript #developers #micropayments #nostr #MCP #agents
GitHub
GitHub - refined-element/l402-requests: Auto-paying L402 HTTP client for Python — APIs behind Lightning paywalls just work
Auto-paying L402 HTTP client for Python — APIs behind Lightning paywalls just work - refined-element/l402-requests
GitHub
GitHub - refined-element/l402-dotnet: Auto-paying L402 HTTP client for .NET — three lines of code and paid APIs just work
Auto-paying L402 HTTP client for .NET — three lines of code and paid APIs just work - refined-element/l402-dotnet
GitHub
GitHub - refined-element/l402-ts: Auto-paying L402 HTTP client for TypeScript/Node.js — three lines of code and paid APIs just work
Auto-paying L402 HTTP client for TypeScript/Node.js — three lines of code and paid APIs just work - refined-element/l402-ts

Introduction | Lightning Enable
Learn about Lightning Enable - the commerce orchestration layer for Bitcoin Lightning payments