<p>Natively c-lightning does not support paying invoices to yourself. But I have provided a trick described in this video: <a href="https://www.youtube.com/watch?v=Dwl-0cY6KkU&amp;t=1s" rel="nofollow noreferrer">https://www.youtube.com/watch?v=Dwl-0cY6KkU&amp;t=1s</a>:</p>

<p>The trick is to create an invoice and then use <code>getroute</code> to find a route to some node and then go back (possible over another route with another <code>getroute</code> call). once you have such a circle the <code>sendpay</code> command. While <code>getroute</code> does not find a route to yourself the <code>sendpay</code> does not care as long as the onions are great an the payment hash exists.</p>

<p>This trick can be used to do spontaneous payments (as described in my video) or to rebalance your channels. The full code for spontaneous payments can be found on my github <a href="https://github.com/renepickhardt/lightning-helpers/tree/master/pay_anyone_without_invoice" rel="nofollow noreferrer">lightning helpers repo</a>. The python code would have to be adapted a little bit to your needes but that should be fairly straight forward. Ping me if you need help. </p>

<p>On a side note. I balance my channels be decreasing my routing fees because then people will do it for me and I still earn something instead of me paying fees for rebalancing. </p>

CC BY-SA 4.0
2019-02-21T09:16:02.343Z
2019-02-21T09:16:02.343Z
Rene Pickhardt
<p>I know it is possible with LND and I don't know if it is possible with Eclair.
I have tried to issue an invoice and to find a route with the same node but 
I got the <code>{ "code" : -1, "message" : "Could not find a route" }</code> message.</p>

<p>What am I missing?</p>

<lightning-network><lightning-routing><core-lightning><ln-channel-balance-management>
Is it possible to rebalance channels by sending to yourself (from a channel to an other) in c-lightning? How?
Gabriele Domenichini
# Is it possible to rebalance channels by sending to yourself (from a channel to an other) in c-lightning? How?

(Asked by: username_0 on 2019-02-21)

I know it is possible with LND and I don't know if it is possible with Eclair.
I have tried to issue an invoice and to find a route with the same node but
I got the `{ "code" : -1, "message" : "Could not find a route" }` message.

What am I missing?

**Tags:** lightning-network, lightning-routing, core-lightning, ln-channel-balance-management


---

## 1 answers

### Answer by username_1 on 2019-02-21. Score: 4

Natively c-lightning does not support paying invoices to yourself. But I have provided a trick described in this video: <https://www.youtube.com/watch?v=Dwl-0cY6KkU&t=1s>:

The trick is to create an invoice and then use `getroute` to find a route to some node and then go back (possible over another route with another `getroute` call). once you have such a circle the `sendpay` command. While `getroute` does not find a route to yourself the `sendpay` does not care as long as the onions are great an the payment hash exists.

This trick can be used to do spontaneous payments (as described in my video) or to rebalance your channels. The full code for spontaneous payments can be found on my github [lightning helpers repo](https://github.com/username_1/lightning-helpers/tree/master/pay_anyone_without_invoice). The python code would have to be adapted a little bit to your needes but that should be fairly straight forward. Ping me if you need help.

On a side note. I balance my channels be decreasing my routing fees because then people will do it for me and I still earn something instead of me paying fees for rebalancing.


---

