Understanding LNURL-Pay: How Lightning Addresses Really Work

Backend Software Engineer with over 5 years of working experience with engineering teams building and maintaining solutions across various sections
I have solid experience in building products using technologies such as JavaScript, nodeJs, ExpressJs, Typescript, ReactJs, NoSQL/SQL database, PHP/Laravel, Firebase, AWS S3, elastic beanstalk, and AWS Lambda function
I write articles on my blog around backend engineering, Bitcoin Lighening, building distributed Microservice systems and give talks in my local tech communities.
LNURL-Pay is one of the most important UX improvements in the Lightning Network. It allows users to pay a Lightning Address (or LNURL) without manually requesting an invoice beforehand. Instead of sending money directly, LNURL-Pay defines a negotiation flow that tells wallets how to create and pay an invoice.
At its core, LNURL-Pay is about discovery and coordination, not payment execution.
smart247@walletofsatoshi.com
When a wallet sees this address, it derives the LNURL-Pay endpoint using a well-known path:
https://walletofsatoshi.com/.well-known/lnurlp/rustylip55
This URL is the LNURL-Pay endpoint. The wallet sends an HTTP request to this endpoint to understand how payments to this address should work.
Fetching Payment Rules
The LNURL-Pay endpoint responds with a JSON object describing the payment rules. A simplified example response looks like this:
{
"minSendable": 1000,
"maxSendable": 100000000,
"callback": "https://domain.com/lnurl/callback/user",
"metadata": "...",
"tag": "payRequest"
}
This response answers key questions such as:
How much can be paid?
Defined byminSendableandmaxSendable(in millisatoshis).Where do I request an invoice?
Provided via thecallbackURL.
At this stage, no invoice exists yet. The wallet is simply learning the rules of engagement.
Requesting an Invoice
Once the wallet knows the acceptable payment range, the user selects an amount. The wallet then calls the callback URL, appending the chosen amount:
GET https://domain.com/lnurl/callback/user?amount=50000000
If the request is valid, the server responds with a BOLT11 Lightning invoice for that exact amount.
This is the critical step: LNURL-Pay doesn’t move funds—it only helps generate an invoice.
Paying the Invoice
After receiving the invoice, the wallet proceeds with a standard Lightning payment. From this point onward, everything follows the normal BOLT11 payment flow.
To summarize the wallet behavior:
Resolve Lightning Address → LNURL-Pay endpoint
Fetch payment rules
Request an invoice via callback
Pay the returned invoice
LNURL-Pay does NOT send money.
Instead, It negotiates payment terms and coordinates invoice creation, then relies on standard Lightning payments to move funds.
Think of LNURL-Pay as a protocol for asking how to pay, not for paying itself.
LNURL-Pay is a discovery and negotiation layer, not a payment rail.
Why LNURL-Pay Is Powerful
LNURL-Pay unlocks several key advantages for Lightning adoption:
Reusable payment identifiers
One address, unlimited payments.Human-readable addresses
No more copy-pasting invoices.Wallet-to-wallet UX
Payments feel instant and intuitive.Merchant-friendly flows
Dynamic pricing, tips, and metadata support.Internet-native discovery
Built on HTTPS and DNS—simple and robust.
Conclusion
LNURL-Pay = Fetch rules → request invoice → pay invoice



