# LNURL / Documentation UX / Expert Interview
:::info
The goal of this series of interviews we'll be doing is to gain an understanding of the limitations of lightning that birthed LNURL. We will also be exploring the setup requirements and use cases, that can serve as a way to onboard developers looking to implement one of the LNURL solutions.
:::
## Foundations
We start with the basic things of how lightning works, and how a lightning newbie may interact with it to show some of the benefits of LNURL.
### Setup lightning
First, you set up a lightning node, either using c-lightning, lnd or with a node toolkit like Umbrel, or BTC Pay Server.
You will then need to configure your lightning node
### Opening channels
Then you're able to open channels with various parties who you may be transacting with, or whom you have some relationship where they provide me the capacity to route payments through them (lightning service provider).
### Personal use
You may then choose to connect to your node with an application like Zues, or Zap which would allow you to generate invoices remotely that you can then share with the payer.
## Integrating payments
Enter LNURL, LNURL is a specification for interacting with my lightning node through HTTP.
- What options do I have besides HTTP?
## lnurl-pay
### Conventional lightning solutions
- Generate many invoices upfront with long expiration times.
---
- lnurl-pay, dont want to connect it to a lightning node
- lnurl endpoints
- People misunderstand that you need lnurl capabiltiies, its a wrapper around a flow. instead of clicking to pay they scan a QR Code.
- include a fixed lnurl address on the website. a static thing, and encoded is a http url.
- the users wallet will automatically fetch the invoice.
- Use case physical static QR Codes, and configure an invocie on the fly
- problem: if you have 100 products you cannot work.
- lnurl pay chat
Fixes the hash of the invoice.
Success action. When the wallet sends the request for the invoice, it also send the comment.
- i want an invoice to pay for this. and here is my wallet.
- encrypted message.
- **successAction**
- Success action is received by the wallet not by the web page.
- how can the
---
- comment field,
### Problems with conventional lightning solutions
- ...
### Comparison to on-chain
- xpubs can be used on-chain as an on-chain invoice generator.
- this is not the same as a static address though, bip47 payment codes would be the closest solution to provide a static payment code.
### Use Cases
You will run into the use case for `lnurl-pay` if you want to automate the creation of invoices.
#### Ecommerce
In a merchant setup you would need to generate invoices on demand for customers to pay.
- lnurl-pay (?)
#### APIs
If your API requires a payment to provide a response it would need to generate an invoice for consumers.
- lnurl-auth(?)
- lnurl-pay(?)
---
- lnurl-channel(?)
- lnurl-withdraw(?)
---
## The Solutions
### lnurl-pay
- one line explanation
- Pay to static QR/NFC/link
- user story
- ...
- alternative solutions
- what convention does it abstract?
### lnurl-withdraw
- one line explanation
- Withdrawing funds from a lightning service
- user story
- Today users are asked to provide a withdrawal Lightning invoice to a service, this requires some effort and is especially painful when user tries to withdraw funds into mobile wallet while using a desktop website. Instead of asking for Lightning invoice a service could display a "withdraw" QR code which contains a specialized LNURL.
- alternative solutions
- the user would have to open their phone wallet, type 155 satoshis, copy the invoice, and paste the invoioce there.
- server tells the wallet to give me an invoice, for a specific amount and everything else.
- Can be fixed amount or not
- Each web server will have to notify the frontend to refresh the page.
- what convention does it abstract?
- ...
- works best if
- can have a static endpoint/qr if the amount is fixewd, but your use case may require widthdrawing a dynmaic amount based on the user's
- min and max
### lnurl-channel
- one line explanation
- user story
- Suppose a user has a balance on a certain service which he wishes to turn into an incoming channel and service supports such functionality. This would require many parameters so the resulting QR may be overly dense and cause scanning issues. Additionally, the user has to make sure that a connection to target LN node is established before an incoming channel is requested.
- alternative solutions
- what convention does it abstract?
- to open a channel the person has to connect to the other part of the channel, but it cannot connect to a phone. the connection has to connect from the phone to the server.
- specical tag on the lnurl channel, when blix reads the qr it doesnt only connect to the lightning node but it also sends an invoice to the lightning node.
- node a is trying to open a channel with node b
- needs to know the nodeid
- needs to know the ip
- has to connect
- in the case of the phone
- the node cant connect to your phone because its not reachable from the itnernet
- if your phone connects first to
- phone opens a connection to the node. ive open a connect
### lnurl-auth
- one line explanation
- Authorization with Bitcoin Wallet
- user story
- A special `linkingKey` can be used to login user to a service or authorise sensitive actions. This preferrably should be done without compromising user identity so plain LN node key can not be used here. Instead of asking for user credentials a service could display a "login" QR code which contains a specialized LNURL.
- alternative solutions
- what convention does it abstract?
- sign up to website with a keypair
-
### Persona / Web Developer
- (As a web developer famililar with creating HTTP REST APIs -- and I have some basic understanding of lightning for personal payments, but want to integrate it into my website or web service)
I'm able to plead ignorance on how lightning works on the underlying level, because as a front-end developer or backend developer, I may not have much knowledge of the inner workings of lightning but want to take advantage of the capability or the opportunities that LNURL can provide me.
## Why not just use AMP?
- amp is just keysend with magic
## Why not just use "Offers" in `BOLT12`?
- the main advantage is that you have to run a web server. you are service, and already have. youre not talking on a lightning network.
- if you are using a custodial service you can implement lnurl code.
- it simplfiies your web infrastructure.
- its not suppose to be a peer to peer thing, its for services.
## Why not just use `keysend`?
- keysend is a more