Accept payment with WooCommerce Lightning

This post is also available in: German

How to accept payment with WooCommerce Lightning

Accept payment with WooCommerce Lightning. If you run an online shop based on WooCommerce, you can accept Bitcoin and Lightning payments.

For instructions on how to accept Bitcoin payments with WooCommerce, see the post: “Accept Bitcoin Payments with WooCommerce

If you are using a Lightning implementation based on lnd (Lightning Labs), then the above post is recommended. Because the WooCommerce plugin BTCPay for WooCommerce supports besides Bitcoin also lnd Lightning.

You can also offer both variants in your online shop. In the beverage shop http://store.coincharge.io/, the customer will find the options Bitcoin and Lightning when selecting the payment options.

If he opts for Bitcoin, Bitcoin is displayed as the default. The customer can also switch to Lightning within the payment page. However, the customer can also choose Lightning directly, then the payment page is used based on C-Lightning.

When paying, the end customer has the alternative on the payment side, between Bitcoin and Lightning payment. It can be selected on the payment page:

WooCommerce Lightning Payment

WooCommerce with c-lightning

In addition to the Lightning implementation lnd, there is also the implementation of c-lightning. If you use a c-lightning implementation, you can also use it under WooCommerce.

However, a different plugin must be used here. The WooCommerce plugin from C-Lightning can only be obtained from the Github page. You go to the page: https://github.com/ElementsProject/woocommerce-gateway-lightning and download the pugin with the name woocommerce-gateway-lightning.zip. Then you go to Upload plugins and plugins at WordPress and then install the zip file.

If you have installed and activated it correctly, then you will find under WooCommerce > Settings Payments then the payment method Lightning > listed:

Install WooCommerce c-lightning

To allow our store to communicate with our C-Lightning Node, we click configuration and must enter the address of the Lightning Charge Server and the Lightning Charge API token.

WooCommerce-c-lightning settings

In order to be able to enter the corresponding information with WooCommerce, we go to our BTCPay server in the area of Server Settings and then Service. There we click on See Information at C-Lightning (Charge Server).

BTCPay Server Settings C-lightning

On this page you can find the required information under Credentials, which will be inserted into the WooCommerce fields:

  • Uri
  • APIToken
  • AuthenticatedUri
C-Lightning Settings

The APIToken information comes into the WooCommerce field called Lightning Charge API token.

The information AuthenticatedUri comes into the field Lightning Charge server

BTCPay Credentials

Then place the check mark for Enable Lightning payments.

WooCommerce Cashier

We go to the page http://store.coincharge.io and check that everything has been set up correctly. We put a few drinks in the shopping cart and go to the checkout.

In the checkout, the customer now gets the option to pay with Bitcoin or With Bitcoin Lightning.

Bitcoin Lightning at the WooCommerce Checkout

Now we also want to try out if the Lightning payment works and click on “Proceed to Lightning Payment”

We get to the “Pay with Lightning” payment page. Here, the customer gets two options connected.

He can use his Mobile Lightning Wallet to scan the QR code or copy the Lightning bill and pay via his Desktop Lightning Wallet.

An overview of the most important Mobile Lightning Wallets can be found on the Mobile Lightning Wallets page and from there you can find references to the individual Lightning wallets with instructions for installation and applications.

If you are using a Desktop Lightning Wallet or would like to pay the bill via Ride the lightning (RTL), then you copy the entire text and insert it into the appropriate place at your wallet.

We use wallet of Satoshi’s Lightning Wallet and pay the Lightning bill via the QR code.

Payment with Wallet of Satoshi

The equivalent of 60 euro cents is 7,398 sats and an additional fee of 1 Satoshi is incurred.

The payment is therefore almost free and credited to the account (Lightning Node) with the merchant within one second.

This post is also available in: German

Leave a reply