Lightning Publisher for WordPress

This post is also available in: German

Lightning Publisher for WordPress

Whoever runs a blog based on WordPress has the possibility to offer pages and blog posts for a fee.

With the help of Lightning Payments, payments can be settled per page or per post (pay-per-post).

This article explains how the WordPress plugin “Lightning Publisher for WordPress” can be used to charge for individual articles, contributions and Post.

In the article “Payment per Newspaper Article with Bitcoin Lightning” we present further solutions with which Lightning paywall solutions can be implemented.

Offer Lightning payment per newspaper article

In order to offer news, articles and contributions with costs, you need the following tools.

The first 4 points, you get, if you set up your own BTCPay server with C-Lightning implementation. You can find instructions on how to run your own BTCPay server in the article “LunaNode Hosting“. This means that you have all the prerequisites to be able to settle your contributions made available via WordPress.

WordPress Plugin “Lightning Publisher for WordPress”

Besides WordPress, the WordPress Plugin “Lightning Publisher for WordPress” is also required.

Lightning Publisher for Wordpress

You can select this plugin via the search in WordPress.

You can also download it directly from the github site

After the plugin is installed and activated, it is available in the WordPress Administration > Lightning Publisher Settings.

The URL and API token of the Lightning Charge server must be stored here.

WordPress Lightning_Publisher_Settings

We find this information in our BTCPay server. This requires that C-Lightning (instead of LND) has been selected as Lightning Node when setting up the BTCPay server.

C-Lightning Settings

We go to our BTCPay server in the area of Server Settings. There under Services and Lightning Charge Services. In the Credential area we find the necessary information.

The information from the server from the AuthendicatedUri field is entered in the Server Url field. The information from Uri comes to Public URL and the APIToken comes to API token.

Then Save Changes and the configuration is ready.


Items with a paywall.

After all the technical requirements for setting a paywall have been met, we will create an article that will be offered for a fee.

On the page: “Pay with Lightning” we have installed a paywall. On this page we will show you how to build a paywall into your WordPress article.

Paymentwall with WordPress Lightning

Go to a post and switch to the text view.

In the text view you go to the place from which the post should be paid.

At this point you use the shortcode: [ifpaid AMOUNT CURRENCY]

For Amount, you use the amount and currency the corresponding currency. Please place the square brackets flush with the text. We had to use a space here to describe the code. Otherwise the rest of the text would have disappeared behind a payment barrier. So please do not use a space after which the [ifpaid XXX]

For example, you can offer the post for 5 cents, then you have to enter [ ifpaid 0.05 EUR ]code>. If you want to settle the item for 5 Satoshi, then enter [ ifpaid 0.00000005 BTC ]code>.

You can also view a specific text and label the corresponding payment button.

[ ifpaid 0.05 EUR text="Für nur 5 Cent kannst Du den ganzen Artikel lesen" button="Jetzt mit Bitcoin Lightning bezahlen" ]

In the article it looks like this:

Paywall with Lightning
Paywall the payment barrier for wordpress mit_Lightning_Zahlung

When the reader clicks on the “Pay now with Bitcoin Lightning” button, the following payment window opens

After a successful payment, the page is revisited and displayed in full length.

Besides the solution of “Lightning Publisher for WordPress” presented here, there are other solutions for WordPress and also alternative solutions.

For an overview of the different ways to pay for your contribution or link using a Lightning Paywall, please refer to the following: Payment per newspaper article with Bitcoin Lightning

This post is also available in: German

Leave a reply