← back

LNURL

Encode Lightning interactions as scannable links: pay, authenticate, and withdraw without pasting BOLT11 strings manually.

Demo payments support create-fedi-app

Lightning sent in these demos goes to the maintainer test wallet so you can verify real payment flows inside Fedi.

lnurl1dp68gurn8ghj7urjda…ryxquqyk04ap

If this template helped you, please star, fork, or like the repo.

How to test these flows

Pay & withdraw use the wallet injected by Fedi (window.webln) and auth uses window.nostr — open this mini app inside Fedi so the Complete login and Simulate withdraw buttons can sign. In a plain browser the dev mocks fill in, but real signing needs Fedi.

The QR codes encode callbacks on this deployment. For an external wallet to scan and reach them, the app must be on a public HTTPS URL — set LNURL_SERVER_URLto that origin (e.g. your Vercel or tunnel URL) so the encoded callback isn't localhost.

LNURL-pay

Primary QR uses your configured maintainer LNURL address. Expand the self-hosted section to try /api/lnurlp/[username] callbacks on your own deployment.

Preparing QR code…

Scan to pay the create-fedi-app maintainer test wallet. Amount is chosen by your wallet within the LNURL min/max range.

LNURL-auth

Passwordless login via Lightning wallet or Nostr. This demo signs a kind-22242 event with your challenge tag and completes the callback.

LNURL-withdraw

Service pays the user's invoice. The demo simulates a wallet calling your callback with a BOLT11 from makeInvoice().