Skip to main content
You need a Lightning wallet to pay L402 APIs. Two options — both free, both work globally.
1

Create account

Go to blink.sv and sign up with a phone number or email.
2

Copy your Lightning Address

In the app: Settings → Lightning Address. It looks like yourname@blink.sv.
3

Get your API key

Go to dashboard.blink.svAPI Keys → create a key.
4

Use in l402-kit

import { ManagedProvider } from "l402-kit";

const provider = ManagedProvider.fromAddress("yourname@blink.sv");
Or with the Agent SDK:
import { buildWallet } from "l402-kit/agent";

const wallet = buildWallet({ BLINK_API_KEY: "your-key" });

Option B — Alby

1

Create account

Go to getalby.com and sign up.
2

Get your OAuth token

Go to getalby.com/api-tokens and create a token with payments:send scope.
3

Use in l402-kit

import { buildWallet } from "l402-kit/agent";

const wallet = buildWallet({ ALBY_TOKEN: "your-token" });

Zero-config via environment variables

l402-kit auto-detects your wallet from env vars. No code changes needed:
# Blink
export BLINK_API_KEY="your-key"

# Alby
export ALBY_TOKEN="your-token"
import { buildWallet } from "l402-kit/agent";

const wallet = buildWallet(process.env); // auto-detects Blink or Alby

Fund your wallet

Both wallets give you a Lightning address to receive sats. To test:
  1. Go to coinfos.net or any faucet
  2. Send 1000 sats to your Lightning address
  3. Run npm install l402-kit && node -e "require('l402-kit/agent').healthCheck()"
Sem banco. Sem KYC pesado. Funciona em 193 países.