This post is also available on:
LNPoS – Lightning PoS Terminal
How can merchants with a brick-and-mortar retail store accept Bitcoin and Lightning payments on site? In this article we present the LNPoS hardware POS terminal, which was developed by Ben Arc.
With the LNPoS Bitcoin PoS Terminal, merchants can receive Bitcoin and Lightning payments and also sell Bitcoin just like at a Bitcoin ATM.
The LNPoS functions:
- LNPoS – for online Lightning payments
- LNURLPoS – for offline Lightning payments
- OnChain – for on-chain payments
- LNURLATM – for offline Lightning payments
The Bitcoin terminal can also be used offline. It can also be used in places where there is no internet connection, such as outdoor events, festivals or flea markets.
In a Twitter post, Ben Arc introduces his LNPos as follows:
Introducing #bitcoinPoS! 🥳🚀
— Ben Arc 🏴✊⚡️ (@arcbtc) January 22, 2022
Completely free and open-source #bitcoin point-of-sale, that can do:
- offline AND online #LightningNetwork
- Onchain (using xPub)
- LNURL-withdraw for refunds and OTC! 🤩
All now configurable through an easy access-point🤯https://t.co/KJ8nBvPrdU pic.twitter.com/1PYsMqGirK
LNPoS hardware components
The LNPoS Bitcoin Terminal is not an app on a smartphone, but a standalone piece of hardware. The LNPoS consists of the following hardware components:
- Keyboard module with input field
- Case
- USB cable
Optionally, you can buy a rechargeable battery and an on/off switch.
These individual parts can be ordered separately and individually. But there are also suppliers like Fulmo and Anchorhodl where you can order a complete kit.
We bought our LNPoS from Fulmo. The kit cost about €50,- (at block time 734843) and for €10,- more, you could get the necessary software already preinstalled.
The kit consists of the Lilygo T-Display Keyboard Module and a case created with a 3D printer.
The LNPoS receives its power supply by connecting to a computer via the supplied USB cable.
For a use in the store or in a restaurant, independence from this USB cable is recommended.
Perhaps Fulmo will add a rechargeable battery to its complete set (a link refers to an offer on Amazon) and an on/off switch.
This is not mandatory and can be retrofitted later if required. We have chosen the LNPoS – Construction Kit with pre-installed software for €59,- and now explain how to assemble the hardware.
With a 3D printer, you can create your own custom case.
For us, Lightning Bits has provided a couple of cases.
Assembling the LNPoS Lightning PoS Terminal
We also got ourselves a rechargeable battery and had the necessary tools (a small Phillips screwdriver and pliers) ready.
We take the keyboard module (here: LILYGO® TTGO T-Display ESP32 Keyboard For LNURLPoS Keypad Module) and disassemble it first.
If we use a rechargeable battery, then we plug that into the designated connector on the back of the display. If we do not want to use a battery, we simply do without it.
We recommend to do without the battery for the time being. If everything works properly, you should subsequently insert the battery and ideally connect it to a switch.
Then we remove the four screws and separate the rest of the keyboard module. Now our screwdriver comes into play. To prevent the screws from spinning, we use the pliers to hold the screws appropriately.
LNPoS Case
The LNPoS case comes from a 3D printer. Accordingly, there are still a few plastic parts that need to be removed.
On the side there are still six small rods, which we can break away with the screwdriver.
Now we have the necessary space to press the keypad element with the input keyboard into the housing.
Then we put the element with the display into the housing.
Then the remaining part from the keypad to the appropriate connectors.
Then we put the second part of the housing on it and screw the whole thing.
We may need to pre-drill the holes provided for the screws and also press them slightly when inserting them into the case.
The assembly of the LNPoS can be viewed as an English language video here:
This completes the assembly of the LNPoS. When the LNPoS is connected to a power source for the first time, either via the battery or via the USB cable, the display becomes active and shows No Methods and Restart & Run Portal.
Now we need to install the appropriate software on our LNPoS hardware. We describe this in the following section. If you have chosen the LNPoS variant including software from Fulmo, you can skip the following chapter.
Install software on the LNPoS
We ourselves have opted for the solution where the software is already pre-installed.
In the following YouTube video, the installation of the software is explained from minute 01:32 to 06:00:
You can find a description on Github at: https://github.com/arcbtc/LNPoS/tree/main/lnPoSTdisplay
After installing the necessary software to use the keypad hardware as an LNPoS, we now need to make the individual settings so that the incoming sats are credited to our own Bitcoin or Lightning wallet.
LNbits account
The LNPoS hardware interacts with LNbits to receive the incoming Bitcoin and Lightning payments.
This requires a wallet at LNbits. You can find a detailed description of LNbits here: LNbits Lightning Wallet and Account System
We can set up LNbits on our own server. How this can be done is explained here: https://github.com/lnbits/lnbits-legend
Likewise, LNbits is pre-installed on some hardware nodes. For example, if you have a Raspiblitz or Umbrel running, you can use your own LNbits.
The setup is somewhat complicated in these cases, as the hardware nodes are usually operated in the user’s own home network and access for external users must be allowed via the Internet.
How to use LNbits on your own Raspiblitz you can find out here: https://coincharge.io/lnbits/#raspiblitz
However, LNbits also operates its own server, which can be shared.
You get to the site via the homepage https://lnbits.com/and then you switch to the Legend server.
The direct url is: https://legend.lnbits.com/ and there you create your own wallet.
Regardless of which LNPoS server you use, we want to implement the following features:
- LNPoS – for online Lightning payments
- LNURLPoS – for offline Lightning payments
- OnChain – for on-chain payments
- LNURLATM – for offline Lightning payments
LNbits Wallet
The first step is to create an LNbits wallet. In our example, we create an LNbits wallet directly on the LNbits server at: https://legend.lnbits.com/
We choose the name Coincharge for ourselves and click Add a new Wallet.
We do not require any email address or other login data. After we create the wallet, we should bookmark the url with our wallet details so that we can access the wallet directly at a later time.
After we create the wallet, in the right pane there is the API info about the wallet. We unfold this area and get the Invoice/read key displayed.
We can copy this information into a separate text file, because we will need this information later.
LNbits Extension LNURLDevice
In the left menu bar there is the menu item Extension and Manage Extension. We click on Manage Extension and get a variety of applications listed which can be used with LNbits.
After that LNURLDevice will be listed in the left menu bar. We open the extension and set up POS and ATM.
LNURLPoS Function
We click on New LNURLDevice Instance and a new window opens.
We give the PoS function a title of our own choosing.
Then we need to select a wallet from the dropdown menu. You can create multiple LNbits Wallet. Since we have created only one wallet, the selection results accordingly.
We would like to accept payments based on Euro and choose EUR accordingly.
Then we select PoS because we want to use it as a point of sale.
In the Profit Margin field we can set a percentage markup on the conversion rate. Since we are not interested in exchange rate gains, we set the value to 0 and click Create LNURLDevice.
LNURLATM Function
In addition to accepting payments via the PoS function, LNPoS also has an ATM function.
With the ATM function you can sell Bitcoin.
For example, a customer wants to buy the equivalent of €50,- Bitcoin. He gives the seller the amount in cash, for example. After that, the seller enters the amount of €50 via the ATM function and via the displayed QR code, the buyer can transfer the Sats to his Lightning Wallet.
Since we as sellers also want to earn something, we will add a 5% markup to the price.
We create a New LNURLDevice instance again. We again select a title and set the currency.
Now we select ATM and in the Profit Margin field we enter 5 to achieve a margin of 5%.
Again, we click on the icon in the overview to get the LNURLdevice string for the ATM function.
We also copy this information into our text file.
OnChain – for on-chain payments
So far, we have dealt exclusively with Lightning payments. But we would also like to receive bitcoin payments, on-chain payments, with our LNPoS.
For this we need an Xpub key. You can use an xPub key from your hardware wallet or if you use BlueWallet you can create an xPub key from it.
We have explained the topic xPub Key in detail in the article: Determining xPub Key
After we have determined or created the xPub key, we can start configuring the LNPoS.
Configuration LNDPoS PoS Options
LNPoS WLAN connection
To access the settings for the LNDPoS options, we need to access the LNDPoS via the WLAN function.
Our LNDPoS has a WLAN function and a WLAN connection can be established via it.
To do this, we need our smartphone or computer with its own Wi-Fi function. To do this, we go to the WLAN settings and search for a WLAN network in the vicinity, which has the designation LNPoS.
If you do not find LNPoS among the available WLAN networks, you have to remove LNDPoS from the power source and restart it again. During the restart, hold down any key and then reconnect to the power source.
In our setup, we had a permanent power connection through the battery and had to briefly remove the battery for that.
If the LNPoS WLAN network could be selected, one reaches the LNDPoS options.
LNDPoS PoS settings
Before you can access the LNDpoS options, you will be asked for a password. The password ToTheMoon1 has been preset by LNDPoS in the factory.
After entering this password, you will get to the LNDPoS settings.
New access point
In the first step you configure a new AP (Configure new AP). The AP stands for Access Point. You now have access to the LNPoS, but the LNPoS itself must also access the Internet.
Accordingly, you grant the LNPoS access to your WLAN network. The available WLAN networks are displayed as SSID. Click on one of the networks and enter the WLAN password in Passphrase.
PoS Options
In the PoS Option menu item we can now make the individual settings. We have already compiled the necessary data in the text file. We will deposit this data at this point.
The first field is the password field for accessing the LNPoS backend. The default password is ToTheMoon1 and can be changed at this point.
In the Master Public Key field we enter the xPub key from our onchain Bitcoin wallet. This is required to receive bitcoin-only payments.
In the LNbits Server field we enter the url of our LNbits server. If we use the server provided by LNbits, then the input is https://legend.lnbits.com/
If we use our own LNbits server, then we enter this url accordingly.
In the Wallet Invoice Key field, we enter the Invoice/Read Key that we received when we created the LNbits wallet.
Then the currency of our country, in this case EUR for Euro.
The LNURLPoS string field contains the data from the LNbits extension LNURLDevice. Here are the specifications from POS.
In the field LNURLATM string the data for ATM.
Then the specifications for the Mempool.Space. No changes are recommended here.
In the LNURLATM pin string field the default value is 878787. This pin is required if withdrawals are to be made.
Here you can set your own PIN.
After that we click on Save and a new page is displayed with the changes made.
Then the time has come to try out our LNPoS to see if everything works the way we want it to.
Using LNPoS
We need to remove the LNPoS from the power source again and thus achieve a reset.
After we reconnect the LNPoS to a power source, the display bitcoinPoS powered by LNbits appears.
LNPoS
When selecting LNPoS, we received the message “Fetching Fiat Rate Failed”. Unfortunately, we could not fix the cause. If anyone has an idea, we would be happy to hear from you.
LNURLPoS
After the amount is entered, press # and the QR code for the Lightning bill will be displayed.
When the payer clicks on Open Url, he is shown a four-digit code.
When the merchant (payee) presses the # button, he also gets a four-digit code displayed.
OnChain
If a customer wants to pay by Bitcoin, i.e. OnChain, then this option is selected.
The display shows xPub Ending.
To create a Bitcoin address based on this xPub key, we click # and again a QR code is displayed.
The payer can scan to this QR code and specify the amount to be paid. On the part of LNPoS, the amount is not entered beforehand or a purpose is defined, as was the case with the Lightning payment under LNURLPoS.
There is also no PIN code displayed, which can be used to check a successful payment.
The trader has to log into his Bitcoin wallet and check if the payment is on its way or has already been credited.
An identical process as for the Lightning variant would also be desirable for the OnChain variant.
LNURLATM
In the ATM version, an amount is debited from the merchant’s Lightning Wallet.
After entering the LNURLATM menu item, the trader must enter a PIN code. The default PIN code is 878787.
In the LNPoS settings we could change this PIN code.
After the PIN code is entered, the merchant can enter the amount to be paid out.
In this case, the customer wants to purchase Lightning in the equivalent of €1. After the merchant receives the purchase amount, the merchant generates the QR code.
The buyer can then use a Lightning Wallet that supports LNURL Withdraw to retrieve this amount.
The buyer will see the successful completion of this process in his Lightning Wallet.
The seller does not get any feedback. Again, feedback to the dealer would be desirable, as is the case with LNURLPoS.
However, the merchant has the ability to log into their LNbits account and view the corresponding Lightning transactions.
We had already recommended a corresponding bookmark of this url at the beginning of the text.
Summary
The LNPoS is a very good option for brick-and-mortar merchants who want to accept Lightning payments on site. The standalone hardware can be used by any employee to receive Lightning payments. Lightning payments are credited to the standalone LNbits wallet, which can then only be accessed by the boss.
The LNPoS hardware terminal thus offers an interesting alternative for Lightning PoS solutions that can be operated as an APP solution on a smartphone.
This means that employees can also accept Lightning payments when the boss is not on site with his smartphone.
It is somewhat unfortunate that there is no feedback to the merchant for OnChain payments and for the ATM function. This must be checked in a somewhat roundabout way and may be a bit cumbersome for the untrained layman. Hopefully, there may be a more user-friendly version in the future.
If you put your focus on accepting Lightning payment, then you have a perfect solution.
LNPoS is perfect for convincing your favorite restaurant, pub or Meetup location to accept Lightning payments.
Bitcoiners from German-speaking countries can create an LNPoS for a business and create a video of the Lightning payment.
If the video is published on Coinpages, you will receive 100,000 sats as a reward.
Thus, you can finance the LNPoS, pay with Lightning yourself in your favorite pub and at the same time contribute to the spread of Lightning as a payment method.
This post is also available on: