> ## Documentation Index
> Fetch the complete documentation index at: https://shinydapps-bd9fa40b.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Einführung

> Der einfachste Weg, für Ihre API in Bitcoin Sats zu berechnen.

<Card title="▶ Live-Demo — jetzt ansehen" icon="play" href="https://l402kit.com/#live-demo">
  End-to-End Terminal-Animation: von `npm install` bis zum ersten bezahlten API-Aufruf. 45 Sekunden.
</Card>

## Was ist l402-kit?

**l402-kit** ist eine Open-Source-Middleware, die es jedem Entwickler ermöglicht, Bitcoin Lightning Mikrozahlungen in 3 Zeilen Code zu seiner API hinzuzufügen.

Keine Kreditkarte. Keine Registrierung. Kein Chargeback. Keine Mindestgebühr. Nur Sats.

```bash theme={null}
npm install l402-kit   # TypeScript / Express
pip install l402kit    # Python / FastAPI / Flask
go get github.com/shinydapps/l402-kit/go@v1.10.0  # Go / net/http
cargo add l402kit       # Rust / axum
```

## Welches Problem löst es?

* **Stripe**: Mindestens \$0,30 pro Transaktion — unmöglich für Mikrozahlungen
* **Abonnements**: Wenig-Nutzer subventionieren Viel-Nutzer
* **KI-Agenten**: Keine Kreditkarte — können APIs nicht automatisch bezahlen

**l402-kit** ist die dritte Option: Pay-per-call über Lightning Network, Abrechnung in unter 1 Sekunde, global, ohne Vermittler.

## Für wen ist es?

* **API-Entwickler** — Pro Aufruf berechnen statt monatlichem Abo
* **KI-Agenten-Builder** — Agenten zahlen automatisch
* **Devs ohne Stripe** — Deutschland, Österreich, Schweiz und global
* **Datenanbieter** — 1 Sat pro Abfrage, mit Stripe unmöglich

## Schnellstart — TypeScript

```typescript theme={null}
import express from "express";
import { l402 } from "l402-kit";

const app = express();

app.get("/premium", l402({
  priceSats: 100,                           // ~0,06 $ pro Aufruf
  lightning: new AlbyProvider(process.env.ALBY_TOKEN!, process.env.ALBY_HUB_URL!),    // Souverän-Modus — 0% Gebühr
}), (_req, res) => {
  res.json({ data: "Zahlung bestätigt." });
});

app.listen(3000);
```

## Schnellstart — Python

```python theme={null}
from fastapi import FastAPI, Request
from l402kit import l402_required

app = FastAPI()

@app.get("/premium")
@l402_required(
    price_sats=100,
    lightning=ManagedProvider.from_address("you@blink.sv"),
)
async def premium(request: Request):
    return {"data": "Zahlung bestätigt."}
```

## Jetzt testen

```bash theme={null}
curl http://localhost:3000/premium
# → {"error":"Payment Required","priceSats":100,"invoice":"lnbc..."}
```

<Card title="Vollständige Anleitung" icon="bolt" href="https://l402kit.com/docs/quickstart">
  Von null zur bezahlten API in 5 Minuten
</Card>
