Documentation
Decoding LNURL

Decoding LNURL

Decoding an lnurl


For Lnurl compatible services to make a payment to your lnurl, the SERVICE will need to be able to decode your lnurl. Since lnurls are bech32 encoded, any standard wallet that has implemented lnurls can decode another lnurl.

The Bitnob API allows you to easily decode lnurls.

Sample Request

JSON
{
  "encodedLnUrl": "lnurl1dp68gurn8ghj7et2v4exztnfduhjuam9d3kz66mwdamkutmvde6hymrs9ajkgerexsvtxxe0"
}

Sample Response

If the lnurl is valid, you will receive a response like the one below

Response You will receive this data if the username exists on that service

JSON
{
  "status": true,
  "message": "lnurl decoded successfully",
  "data": {
    "image": "",
    "identifier": "satoshi@bitcoin.org",
    "description": "Send money to satoshi@bitcoin.org",
    "callback": "https://bitcoin.org/.well-known/lnurlp/satoshi",
    "commentAllowed": 0,
    "satMinSendable": 1,
    "satMaxSendable": 100000
  }
}

The next step after decoding an lnurl is to send a request to the callback URL in the response with the required data as query params. E.g https://bitcoin.org/.well-known/lnurlp/satoshi?amount=100 for the callback above

📘

CommentAllowed

If the comment allowed is 0, then it means the other service doesn't want you to add comments to the invoice, but if it is greater than 0, then the length of text you're allowed to send is equal to the specified number.

commentAllowed: 100. means you can send a maximum 100 characters as a comment when making this payment