author: rompert
LNURL is a bech32-encoded HTTPS/Onion URL that can be interacted with automatically by a WALLET in a standard way such that a SERVICE can provide extra services or a better experience for the user.
Bech32-encoded LNURLs can both be uppercase or lowercase, but not mixed case. When used in QR-Codes they SHOULD be uppercase.
An example LNURL:
https://service.com/api?q=3fc3645b439ce8e7f2553a69e5267081d96dcd340693afabe04be7b0ccd178df
would be bech32-encoded as:
LNURL1DP68GURN8GHJ7UM9WFMXJCM99E3K7MF0V9CXJ0M385EKVCENXC6R2C35XVUKXEFCV5MKVV34X5EKZD3EV56NYD3HXQURZEPEXEJXXEPNXSCRVWFNV9NXZCN9XQ6XYEFHVGCXXCMYXYMNSERXFQ5FNS
and presented as the following QR:
Once LNURL is decoded:
- If
tagquery parameter is present, then thisLNURLhas a special meaning. Further actions will be based ontagparameter value. - Otherwise, a GET request should be executed, which must return a JSON object containing a
tagfield. Further actions will be based ontagfield value.
HTTPS or Onion
LNURL is acceptable in two forms: either an https:// clearnet link (no self-signed certificates allowed) or an http:// v2/v3 onion link.
Fallback scheme
LNURL can be used as a fallback inside of other URI schemes, with the key ‘lightning’ and the value equal to the bech32-encoding, an example: https://service.com/giftcard/redeem?id=123&lightning=LNURL1...