Make a Lightning payment via BTCPay

This post is also available in: German

Make a Lightning Payment

This post is about how Lightning payments appear on the customer’s checkout page. It describes how a Lightning payment via BTCPay is made from a merchant’s point of view and how the payment details are displayed at Ride the Lightning.

If you’ve set up a Shop with Lightning Payment via BTCPay, this is also a guide for you to make a Lightning payment in your own shop, test and see if everything has been set up successfully.

If the Lightning Node has been successfully set up and has sufficient inbound liquidity,then payments can be received via the BTCPay Server Lightning.

The prerequisite for this is that Bitcoin and/or Lightning is activated under the Store Settings in general settings in the menu item Derivation Scheme.

In our example, both Bitcoin and Lightning would be enabled (Enabled).

Make a Lightning payment via BTCPay

As for Bitcoin the XPub key is created and stored, can be read in the post “Create Xpub Key” and “xPub Key deposit at BTCPay“.

The“Lightning Payments with BTCPay” post explains how to activate Lightning Payments in the store.

In the Store settings at Checkout Experience, you can set whether the customer will see Bitcoin or Lightning as the default.

For Bitcoin it is BTC (on-chain) and for Lightning BTC (off-chain).

BTCPay Server Settings BTC Off-Chain

If you offer a product in the Microcent range, then it is recommended to use Lightning (BTC Off-Chain) as the default.

For example, the Voting System application only supports Lightning.

However, since Lightning is not yet so common, both variants should always be offered to the customer.

We demonstrate the process using the example of the page:

We buy here a mineral water for 10 cents and go to the checkout. At the checkout we click on “Pay with Bitcoin” and it opens the payment page or checkout page.

Lightning Payment Payment Page

In the payment area with, the payer can determine whether to pay with Bitcoin or by Bitcoin (Lightning).

The invoice amount of 10 cents is 1,428 Sats.

The checkout page is designed to show the customer the Lightning invoice (Bolt 11 invoice) in the form of a QR code.

This view is suitable for making a Lightning payment via a Mobile Wallet.

An overview of the most important Lightning wallets, with references to detailed descriptions, can be found at:

If you click on Network Notes Info, you will also receive the information about the Lightning node as a QR code

The network node information is the node ID. In our case, the Node ID of Coincharge: 0318ac9faa9629e7da08819bc8fe0dd2ae3044d69b1b2283a63479acffeb968483@

This information can be useful if you want to establish a direct channel to the Lightning Node. Then the Lightning payment would be made directly. However, it is not absolutely necessary. The Lightning payment will find its way as well.

If you want to pay the invoice via Ride the Lightning instead of using a mobile wallet, click on the Copy button located to the right of the scanning box.

The upper field shows all the information for an invoice. Click on the field and the details will be copied to your clipboard.

The invoice then looks like this:

lnbc1450n1p029hlfpp5ry6l7hdwxzpgcd8xsalfy4jn0tdu2fdr0g8ahhg945q4a60vdu0sdrc2ps kjkjepqw3hjq4n0w35kueeq2duhxar9d5szsnmjv3jhygzfgsazqcmjdamkgen4dejz6ctswp0ngdz3f4h9w723xf54vv6nwdcxymtf2phxvvt9wdfnv4pfcqzpgxqzuytghn7jn84nxtqcgmqeq43njz8p6dqp59x2 r8xlld33pjwsq0ac04jfnzxv4jfs456x6qncd4v9rf8lmycm97mgtr5y8hrwhyd27wk3qppdq3rc

Recognizable from the beginning lnbc

This invoicing from the intermediate layer can be used either on the dashboard under Pay or under Lightning > Transactions under Payments.

Ride the Lightning pay a bill

Receipt of a Lightning payment

If the payment has been successfully made, we will receive a feedback about the successful receipt of payment.

In our Ride the Lightning Dashboard, the Lightning payment is displayed as follows.

Under Lightning > Transactions and then in the Lightning Transaction section, click Invoices. Lists all Lightning invoices generated by the system. The unpaid invoices in yellow.

The invoice paid, in the amount of 1,428 sats from the beverage shop, is shown in green.

Ride the Lightning successful Lightning payment

Detailed information about the transaction can be obtained by clicking on View Info.

Ride the Lightning bill Detailed information

If you want to know which channel the Satoshi came through, you can find out on Lightning > Peer/Channels. In our case, the payment has come in via Yalls.

See Yalles payment on Ride the Lightning

This post is also available in: German

Leave a reply