<p>I've been able to fix the issue adding the tag <code>payee_node_key</code> to the invoice.</p>
<p>I'm not sure why and the bolt 11 docs don't mention it as an obligatory field, but it seems like it is expected when the destination is unknown and the invoice has route hints.</p>
<p>After adding it, payments from multiple different wallets and nodes are now successful.</p>
<p>This is an example of an invoice that is now working:</p>
<pre><code>lnbc1u1pjh7v9mpp5ckxkhzrdtrm3uqyj4hvxqkzrnr0dlg9s4v6xxt4g5sl5hyaarjvqhp52slq5ft70d7r7z4x8672lde53m74uq07rfjnlewwxmgd0y0e3d4sxqyjw5qrzjqtmr7jfnnj958rpjjx4jrc6ardty9tprvqjqq694anfl65vr7tqyyyqsqyqqzqgpqyqqqqlgqqqqqqgqjqcqzzssp577rduzc8wfzmuyk4sxkkztyq060unttguz6j2zt2yy8lnxnfeqlsnp4qwetmnthnhdmzphtuwql39gc8ylyc5h9hdpwyh82h08td50440mc79qypqsq54yfrrnjtceq93ul3lgdwkgtfjhynndw2uytgvh46tp7m6cjanm80nzhlgr5qykf2d2dwc33jl7jypzukleuf8580t8gwfjhsehn8jgpaxqclx
</code></pre>

CC BY-SA 4.0
2023-12-27T21:25:42.230Z
That option is not required as the node_id of the payee is extracted from the signature using recovery. Also notice that routehints being included in the invoice does not mean they will always be used, as the destination may be also directly reachable.
cdecker
CC BY-SA 4.0
2024-01-16T11:39:21.720Z
I saw that it is not required from the docs but I was getting a lot of payment failures when the invoices didn't have it vs when they did. Almost sure this wasn't related to the node not being reachable.
apotdevin
CC BY-SA 4.0
2023-12-17T17:35:18.053Z
2023-12-17T17:35:18.053Z
apotdevin
<p>You can use <code>lncli decodepayreq</code> (if you use LND) to decode the payment request:</p>
<pre><code>$ lncli decodepayreq lnbc100n1pjh3k3ppp5h277ag6ks9wazapk0kyxrhm6r2gk8sncal0kzfkws99zv7l9x5ushp52slq5ft70d7r7z4x8672lde53m74uq07rfjnlewwxmgd0y0e3d4sxqyjw5qrzjqtmr7jfnnj958rpjjx4jrc6ardty9tprvqjqq694anfl65vr7tqyyyqsqyqqzqgpqyqqqqlgqqqqqeqqjqcqzzssp5a6ny5q66gj0whuzw3du9tagc3kt99kc22qv76adgx7eakuauwyxs9qypqsqa24wluek4dn6j0zc5r95alpsvjmt6k6egxlg695t4ysgywkvd8354a80fsd3y8w5sqv07nrx89exea04je23kxkvm2q72s72jlp44nsqw7dz30
{
    &quot;destination&quot;:  &quot;02679279a043c444e6524f00172d911264b5d27c5b35e4df3bab4a30c3564ff3ca&quot;,
    &quot;payment_hash&quot;:  &quot;babdeea356815dd174367d8861df7a1a9163c278efdf6126ce814a267be53539&quot;,
    &quot;num_satoshis&quot;:  &quot;10&quot;,
    &quot;timestamp&quot;:  &quot;1702418977&quot;,
    &quot;expiry&quot;:  &quot;604800&quot;,
    &quot;description&quot;:  &quot;&quot;,
    &quot;description_hash&quot;:  &quot;543e0a257e7b7c3f0aa63ebcafb7348efd5e01fe1a653fe5ce36d0d791f98b6b&quot;,
    &quot;fallback_addr&quot;:  &quot;&quot;,
    &quot;cltv_expiry&quot;:  &quot;80&quot;,
    &quot;route_hints&quot;:  [
        {
            &quot;hop_hints&quot;:  [
                {
                    &quot;node_id&quot;:  &quot;02f63f49339c8b438c3291ab21e35d1b5642ac2360240068b5ecd3fd5183f2c042&quot;,
                    &quot;chan_id&quot;:  &quot;1157426203762688257&quot;,
                    &quot;fee_base_msat&quot;:  1000,
                    &quot;fee_proportional_millionths&quot;:  100,
                    &quot;cltv_expiry_delta&quot;:  144
                }
            ]
        }
    ],
    &quot;payment_addr&quot;:  &quot;eea64a035a449eebf04e8b7855f5188d9652db0a5019ed75a837b3db73bc710d&quot;,
    &quot;num_msat&quot;:  &quot;10000&quot;,
    &quot;features&quot;:  {
        &quot;9&quot;:  {
            &quot;name&quot;:  &quot;tlv-onion&quot;,
            &quot;is_required&quot;:  false,
            &quot;is_known&quot;:  true
        },
        &quot;15&quot;:  {
            &quot;name&quot;:  &quot;payment-addr&quot;,
            &quot;is_required&quot;:  false,
            &quot;is_known&quot;:  true
        }
    }
}
</code></pre>
<p>Without any route hint, my well-connected node (c-otto.de) is unable to find a route:</p>
<pre><code>$ lncli queryroutes --dest 02679279a043c444e6524f00172d911264b5d27c5b35e4df3bab4a30c3564ff3ca --amt 10
[lncli] rpc error: code = Unknown desc = unable to find a path to destination
</code></pre>
<p>There is a route to the node (ThunderHub) mentioned in the route hint, though. The invoice looks OK to me. Paying it via <code>lncli payinvoice</code> resulted in a temporary channel failure (which is OK), then a timeout. With lnd-manageJ I was able to pay the invoice, though:</p>
<pre><code>$ curl http://localhost:8081/api/payments/pay-payment-request/lnbc100n1pjh3k3ppp5h277ag6ks9wazapk0kyxrhm6r2gk8sncal0kzfkws99zv7l9x5ushp52slq5ft70d7r7z4x8672lde53m74uq07rfjnlewwxmgd0y0e3d4sxqyjw5qrzjqtmr7jfnnj958rpjjx4jrc6ardty9tprvqjqq694anfl65vr7tqyyyqsqyqqzqgpqyqqqqlgqqqqqeqqjqcqzzssp5a6ny5q66gj0whuzw3du9tagc3kt99kc22qv76adgx7eakuauwyxs9qypqsqa24wluek4dn6j0zc5r95alpsvjmt6k6egxlg695t4ysgywkvd8354a80fsd3y8w5sqv07nrx89exea04je23kxkvm2q72s72jlp44nsqw7dz30
{&quot;timestamp&quot;:&quot;2023-12-15T16:15:39.668723594Z&quot;,&quot;message&quot;:&quot;Initializing payment babdeea356815dd174367d8861df7a1a9163c278efdf6126ce814a267be53539&quot;}
{&quot;timestamp&quot;:&quot;2023-12-15T16:15:39.669776403Z&quot;,&quot;message&quot;:&quot;Payment Options: PaymentOptions[feeRateWeight=Optional[0], feeRateLimit=Optional.empty, feeRateLimitExceptIncomingHops=Optional.empty, ignoreFeesForOwnChannels=true, peer=Optional.empty, peerForFirstHop=Optional.empty]&quot;}
{&quot;timestamp&quot;:&quot;2023-12-15T16:15:39.675791434Z&quot;,&quot;message&quot;:&quot;#1: Sending 10 (0.0% = 0 in flight)&quot;}
{&quot;timestamp&quot;:&quot;2023-12-15T16:15:43.240118946Z&quot;,&quot;message&quot;:&quot;Sending to route #1: 10: [780301x1866x1 (known xxx), 799439x980x1 (cap 500,000,000), 774246x1727x1 (cap 79,999,806), 1052673x257x257 (cap 5,000,000,000)], 200100ppm, 201700ppm with first hop, probability 0.9999998529997013&quot;}
{&quot;timestamp&quot;:&quot;2023-12-15T16:15:47.443849094Z&quot;,&quot;message&quot;:&quot;#2: Sending 10 (0.0% = 0 in flight)&quot;}
{&quot;timestamp&quot;:&quot;2023-12-15T16:15:48.660211543Z&quot;,&quot;message&quot;:&quot;Sending to route #2: 10: [810332x675x10 (known xxx), 810525x2141x6 (cap 40,281,160), 1052673x257x257 (cap 5,000,000,000)], 100100ppm, 101000ppm with first hop, probability 0.9999997497449911&quot;}
{&quot;timestamp&quot;:&quot;2023-12-15T16:16:49.351773462Z&quot;,&quot;message&quot;:&quot;#3: Sending 10 (0.0% = 0 in flight)&quot;}
{&quot;timestamp&quot;:&quot;2023-12-15T16:16:51.064301481Z&quot;,&quot;message&quot;:&quot;Sending to route #3: 10: [780301x1866x1 (known xxx), 710892x988x1 (cap 11,000,000), 1052673x257x257 (cap 5,000,000,000)], 101200ppm, 102700ppm with first hop, probability 0.9999990889091753&quot;}
{&quot;timestamp&quot;:&quot;2023-12-15T16:16:52.219868645Z&quot;,&quot;message&quot;:&quot;#4: Sending 10 (0.0% = 0 in flight)&quot;}
{&quot;timestamp&quot;:&quot;2023-12-15T16:16:53.465844812Z&quot;,&quot;message&quot;:&quot;Sending to route #4: 10: [820281x324x1 (known xxx), 820126x2751x0 (cap 10,010,000), 1052673x257x257 (cap 5,000,000,000)], 200100ppm, 200100ppm with first hop, probability 0.9999989989991027&quot;}
{&quot;timestamp&quot;:&quot;2023-12-15T16:16:56.510273552Z&quot;,&quot;message&quot;:&quot;Settled&quot;}
</code></pre>
<p>You're welcome :)</p>
<p>Based on my attempts, it seems both &quot;LNBϟG [Edge-3]&quot; and &quot;bfx-lnd1&quot; did not know about their (announced) channels to ThunderHub, causing &quot;UNKNOWN_NEXT_PEER&quot; errors.</p>

CC BY-SA 4.0
2023-12-15T16:17:39.487Z
2023-12-15T16:17:39.487Z
C-Otto
<p>I'm unable to pay a lightning invoice that includes route hints. The node in the route hint never receives the forward request which makes me believe that the invoice has some issue and no route is ever attempted.</p>
<p>Here is the example invoice:</p>
<pre><code>lnbc100n1pjh3k3ppp5h277ag6ks9wazapk0kyxrhm6r2gk8sncal0kzfkws99zv7l9x5ushp52slq5ft70d7r7z4x8672lde53m74uq07rfjnlewwxmgd0y0e3d4sxqyjw5qrzjqtmr7jfnnj958rpjjx4jrc6ardty9tprvqjqq694anfl65vr7tqyyyqsqyqqzqgpqyqqqqlgqqqqqeqqjqcqzzssp5a6ny5q66gj0whuzw3du9tagc3kt99kc22qv76adgx7eakuauwyxs9qypqsqa24wluek4dn6j0zc5r95alpsvjmt6k6egxlg695t4ysgywkvd8354a80fsd3y8w5sqv07nrx89exea04je23kxkvm2q72s72jlp44nsqw7dz30
</code></pre>
<p>I'm trying to find some encoding issue but don't see it.</p>
<p>Any ideas for why this is happening would be great!</p>

CC BY-SA 4.0
2023-12-13T20:59:50.110Z
Which Lightning implementation are you using?
Murch
<lightning-network><invoices><route-hints>
Unable to pay invoice with route hints
apotdevin
# Unable to pay invoice with route hints

(Asked by: username_0 on 2023-12-12)

I'm unable to pay a lightning invoice that includes route hints. The node in the route hint never receives the forward request which makes me believe that the invoice has some issue and no route is ever attempted.

Here is the example invoice:

```
lnbc100n1pjh3k3ppp5h277ag6ks9wazapk0kyxrhm6r2gk8sncal0kzfkws99zv7l9x5ushp52slq5ft70d7r7z4x8672lde53m74uq07rfjnlewwxmgd0y0e3d4sxqyjw5qrzjqtmr7jfnnj958rpjjx4jrc6ardty9tprvqjqq694anfl65vr7tqyyyqsqyqqzqgpqyqqqqlgqqqqqeqqjqcqzzssp5a6ny5q66gj0whuzw3du9tagc3kt99kc22qv76adgx7eakuauwyxs9qypqsqa24wluek4dn6j0zc5r95alpsvjmt6k6egxlg695t4ysgywkvd8354a80fsd3y8w5sqv07nrx89exea04je23kxkvm2q72s72jlp44nsqw7dz30

```

I'm trying to find some encoding issue but don't see it.

Any ideas for why this is happening would be great!

**Tags:** lightning-network, invoices, route-hints

> **Comments:**
> **username_1**: Which Lightning implementation are you using?  

---

## 2 answers

### Answer by username_0 on 2023-12-17. Score: 0 | Accepted answer

I've been able to fix the issue adding the tag `payee_node_key` to the invoice.

I'm not sure why and the bolt 11 docs don't mention it as an obligatory field, but it seems like it is expected when the destination is unknown and the invoice has route hints.

After adding it, payments from multiple different wallets and nodes are now successful.

This is an example of an invoice that is now working:

```
lnbc1u1pjh7v9mpp5ckxkhzrdtrm3uqyj4hvxqkzrnr0dlg9s4v6xxt4g5sl5hyaarjvqhp52slq5ft70d7r7z4x8672lde53m74uq07rfjnlewwxmgd0y0e3d4sxqyjw5qrzjqtmr7jfnnj958rpjjx4jrc6ardty9tprvqjqq694anfl65vr7tqyyyqsqyqqzqgpqyqqqqlgqqqqqqgqjqcqzzssp577rduzc8wfzmuyk4sxkkztyq060unttguz6j2zt2yy8lnxnfeqlsnp4qwetmnthnhdmzphtuwql39gc8ylyc5h9hdpwyh82h08td50440mc79qypqsq54yfrrnjtceq93ul3lgdwkgtfjhynndw2uytgvh46tp7m6cjanm80nzhlgr5qykf2d2dwc33jl7jypzukleuf8580t8gwfjhsehn8jgpaxqclx

```

> **Comments:**
> **username_2**: That option is not required as the node_id of the payee is extracted from the signature using recovery. Also notice that routehints being included in the invoice does not mean they will always be used, as the destination may be also directly reachable.  
> **username_0**: I saw that it is not required from the docs but I was getting a lot of payment failures when the invoices didn't have it vs when they did. Almost sure this wasn't related to the node not being reachable.  

---

### Answer by username_3 on 2023-12-15. Score: 0

You can use `lncli decodepayreq` (if you use LND) to decode the payment request:

```
$ lncli decodepayreq lnbc100n1pjh3k3ppp5h277ag6ks9wazapk0kyxrhm6r2gk8sncal0kzfkws99zv7l9x5ushp52slq5ft70d7r7z4x8672lde53m74uq07rfjnlewwxmgd0y0e3d4sxqyjw5qrzjqtmr7jfnnj958rpjjx4jrc6ardty9tprvqjqq694anfl65vr7tqyyyqsqyqqzqgpqyqqqqlgqqqqqeqqjqcqzzssp5a6ny5q66gj0whuzw3du9tagc3kt99kc22qv76adgx7eakuauwyxs9qypqsqa24wluek4dn6j0zc5r95alpsvjmt6k6egxlg695t4ysgywkvd8354a80fsd3y8w5sqv07nrx89exea04je23kxkvm2q72s72jlp44nsqw7dz30
{
    "destination":  "02679279a043c444e6524f00172d911264b5d27c5b35e4df3bab4a30c3564ff3ca",
    "payment_hash":  "babdeea356815dd174367d8861df7a1a9163c278efdf6126ce814a267be53539",
    "num_satoshis":  "10",
    "timestamp":  "1702418977",
    "expiry":  "604800",
    "description":  "",
    "description_hash":  "543e0a257e7b7c3f0aa63ebcafb7348efd5e01fe1a653fe5ce36d0d791f98b6b",
    "fallback_addr":  "",
    "cltv_expiry":  "80",
    "route_hints":  [
        {
            "hop_hints":  [
                {
                    "node_id":  "02f63f49339c8b438c3291ab21e35d1b5642ac2360240068b5ecd3fd5183f2c042",
                    "chan_id":  "1157426203762688257",
                    "fee_base_msat":  1000,
                    "fee_proportional_millionths":  100,
                    "cltv_expiry_delta":  144
                }
            ]
        }
    ],
    "payment_addr":  "eea64a035a449eebf04e8b7855f5188d9652db0a5019ed75a837b3db73bc710d",
    "num_msat":  "10000",
    "features":  {
        "9":  {
            "name":  "tlv-onion",
            "is_required":  false,
            "is_known":  true
        },
        "15":  {
            "name":  "payment-addr",
            "is_required":  false,
            "is_known":  true
        }
    }
}

```

Without any route hint, my well-connected node (username_3.de) is unable to find a route:

```
$ lncli queryroutes --dest 02679279a043c444e6524f00172d911264b5d27c5b35e4df3bab4a30c3564ff3ca --amt 10
[lncli] rpc error: code = Unknown desc = unable to find a path to destination

```

There is a route to the node (ThunderHub) mentioned in the route hint, though. The invoice looks OK to me. Paying it via `lncli payinvoice` resulted in a temporary channel failure (which is OK), then a timeout. With lnd-manageJ I was able to pay the invoice, though:

```
$ curl http://localhost:8081/api/payments/pay-payment-request/lnbc100n1pjh3k3ppp5h277ag6ks9wazapk0kyxrhm6r2gk8sncal0kzfkws99zv7l9x5ushp52slq5ft70d7r7z4x8672lde53m74uq07rfjnlewwxmgd0y0e3d4sxqyjw5qrzjqtmr7jfnnj958rpjjx4jrc6ardty9tprvqjqq694anfl65vr7tqyyyqsqyqqzqgpqyqqqqlgqqqqqeqqjqcqzzssp5a6ny5q66gj0whuzw3du9tagc3kt99kc22qv76adgx7eakuauwyxs9qypqsqa24wluek4dn6j0zc5r95alpsvjmt6k6egxlg695t4ysgywkvd8354a80fsd3y8w5sqv07nrx89exea04je23kxkvm2q72s72jlp44nsqw7dz30
{"timestamp":"2023-12-15T16:15:39.668723594Z","message":"Initializing payment babdeea356815dd174367d8861df7a1a9163c278efdf6126ce814a267be53539"}
{"timestamp":"2023-12-15T16:15:39.669776403Z","message":"Payment Options: PaymentOptions[feeRateWeight=Optional[0], feeRateLimit=Optional.empty, feeRateLimitExceptIncomingHops=Optional.empty, ignoreFeesForOwnChannels=true, peer=Optional.empty, peerForFirstHop=Optional.empty]"}
{"timestamp":"2023-12-15T16:15:39.675791434Z","message":"#1: Sending 10 (0.0% = 0 in flight)"}
{"timestamp":"2023-12-15T16:15:43.240118946Z","message":"Sending to route #1: 10: [780301x1866x1 (known xxx), 799439x980x1 (cap 500,000,000), 774246x1727x1 (cap 79,999,806), 1052673x257x257 (cap 5,000,000,000)], 200100ppm, 201700ppm with first hop, probability 0.9999998529997013"}
{"timestamp":"2023-12-15T16:15:47.443849094Z","message":"#2: Sending 10 (0.0% = 0 in flight)"}
{"timestamp":"2023-12-15T16:15:48.660211543Z","message":"Sending to route #2: 10: [810332x675x10 (known xxx), 810525x2141x6 (cap 40,281,160), 1052673x257x257 (cap 5,000,000,000)], 100100ppm, 101000ppm with first hop, probability 0.9999997497449911"}
{"timestamp":"2023-12-15T16:16:49.351773462Z","message":"#3: Sending 10 (0.0% = 0 in flight)"}
{"timestamp":"2023-12-15T16:16:51.064301481Z","message":"Sending to route #3: 10: [780301x1866x1 (known xxx), 710892x988x1 (cap 11,000,000), 1052673x257x257 (cap 5,000,000,000)], 101200ppm, 102700ppm with first hop, probability 0.9999990889091753"}
{"timestamp":"2023-12-15T16:16:52.219868645Z","message":"#4: Sending 10 (0.0% = 0 in flight)"}
{"timestamp":"2023-12-15T16:16:53.465844812Z","message":"Sending to route #4: 10: [820281x324x1 (known xxx), 820126x2751x0 (cap 10,010,000), 1052673x257x257 (cap 5,000,000,000)], 200100ppm, 200100ppm with first hop, probability 0.9999989989991027"}
{"timestamp":"2023-12-15T16:16:56.510273552Z","message":"Settled"}

```

You're welcome :)

Based on my attempts, it seems both "LNBϟG [Edge-3]" and "bfx-lnd1" did not know about their (announced) channels to ThunderHub, causing "UNKNOWN\_NEXT\_PEER" errors.


---

