This post is also available on:
LNbank Lightning Wallet for BTCPay Server
LNbank is a plugin for the BTCPay server to create Lightning wallets and use them to send and receive Lightning payments.
All Lightning payments, regardless of which BTCPay store, were administered together by the Lightning Node on the BTCPay server.
Separation between individual BTCPay stores was not possible, as is the case with on-chain Bitcoin payments. For Bitcoin payments, a separate Bitcoin wallet can be created or a separate xPub key can be stored for each BTCPay store.
This was previously not possible for Lightning payments and can now be implemented with LNbank.
What can LNbank be used for?
Those who run multiple BTCPay stores on their BTCPay server to capture payment processing for different projects usually want to separate these payments.
Be it to separate one’s own projects, to separate private and business projects or because one co-manages projects of friends via one’s own BTCPay server.
With a few clicks, Lightning Wallets can be created for different accounts, which can be linked to BTCPay stores.
The Lightning payments on this BTCPay store are then credited to the respective Lightning wallet and the account holder can freely dispose of them.
The technical base infrastructure is the Lightning Node of the BTCPay Server and LNbank are quasi sub-accounts of this Lightning Node.
If you do not have your own BTCPay server, but use a BTCPay server of a third party, you must be aware that in extreme cases you will no longer be able to access your Lightning Wallet.
While with the Bitcoin Wallet you have access to your Bitcoin on-chain balance at any time through your own key, this is not the case with the Lightning Wallet with a third-party solution. Therefore, this solution should be used only for trial and with very small amounts.
The credit should be transferred to its own Lightning Wallet at any time and for larger turnovers it is recommended to operate its own BTCPay server including Lightning Node and LNbank for its own BTCPay stores and the respective projects.
Activate LNbank plugin on its BTCPay server
The plugin LNbank is, since BTCPay Server version 1.4. available and can be activated via the menu item Add Plugin by the administrator of the BTCPay server.
After clicking Install, the LNbank plugin will be installed on the BTCPay server.
The new menu item LNbank appears in the menu bar. If the administrator allows the external users to use the Lightning Node under the menu item Server Settings > Policies, the menu item LNBank is available for all users.
Create a Lightning Wallet with LNbank
In the left menu bar you will find the menu item LNbank.
Via Create a Wallet, the user can create his own Lightning Wallet. For this purpose, a wallet name is selected and then create is clicked.
Receive
To receive a Lightning payment, a Lightning Invoice must be created.
For this purpose, a purpose is entered in the Description field. We set a check mark so that the purpose is transferred with the payment.
The amount is entered into Sats and then a Lightning invoice is created via Create Invoice.
This Lightning Invoice is created as a QR Code or can be forwarded via Copy Payment Request or Public share url.
If this Lightning Invoice has been paid, this will be indicated accordingly.
However, you can also use LNURL exclusively to receive Lightning on LNbank Wallet.
Leave the Description and Amount fields blank and scan the QR code with a Lightning Wallet that supports LNURL.
Within the Lightning Wallet, the payer himself can specify the amount and the purpose of the payment and send a Lightning payment to the LNbank Wallet.
This LNURL function is suitable if you are a payee and do not want to create a Lightning Invoice in advance.
For example, to receive Lightning donations, then you can publish this QR code on your website and receive Lightning donations directly on your LNbank Lightning Wallet.
Send
If you want to make a Lightning payment from your Lightning balance, go to Send.
An input field with the name Payment request appears. Here you copy the information from a Lightning Invoice and click on Decode payment request.
Connecting LNbank Wallet with BTCPay Store
After we have created a LNbank wallet, this Lightning wallet should be used to receive Lightning payments.
Accordingly, we connect the LNbank Wallet to the corresponding BTCPay store.
To do this, we select the appropriate BTCPay store (Coincharge in this case). In the Wallets menu, we click on Lightning and then on Settings.
The selection for Connect a lightning Node appears and select the option Use LNbank wallet.
We select the LNbank wallet that we want to use.
If we haven’t created an LNbank wallet yet, we could do so now.
Change and delete LNbank Wallet
A created LNbank Wallet can be edited afterwards. To do this, click on the (i) button next to the wallet name.
The wallet ID and the access key are displayed.
additionally the time when the LNbank Wallet was created.
Clicking Edit here will take you to the following page.
Update LNBank plugin
To update individual BTCPay plugins, we log in as administrator and find Server Settings in the bottom left menu.
If we click on it, we will see all the settings for the BTCPay server.
On the far right is Plugins and that’s where we click.
This post is also available on: