Anyone who runs a blog based on WordPress has the option 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 post explains how to charge for individual articles, posts and post with the help of WordPress plugin “Lightning Publisher for WordPress”.
In the article “Payment per Newspaper Article with Bitcoin Lightning” we present other solutions that can be used to implement Lightning Paywall solutions.
Offer Lightning payment per newspaper article
To offer news, articles and contributions for a fee, you need the following tools.
- Own BTCPayServer
- Lightning Node
- C-Lightning implementation
- Lightning Charge https://github.com/ElementsProject/lightning-charge
- WordPress mit dem Addon Lightning Publisher für WordPress: https://wordpress.org/plugins/lightning-publisher/
The first 4 points, you get if you set up your own BTCPay server with C-Lightning implementation. A tutorial on how to run your own BTCPay server can be found in the following article „LunaNode Hosting„. With this, you have all the requirements to be able to invoice your contributions provided via WordPress.
WordPress Plugin „Lightning Publisher for WordPress“
Besides WordPress, the WordPress plugin “Lightning Publisher for WordPress” is also required.
This plugin can be selected via the search on WordPress.
Man kann es auch direkt von der Github Seite https://github.com/ElementsProject/wordpress-lightning-publisher runterladen.
After installing and activating the plugin, it is available in the WordPress administration area under Settings > Lightning Publisher.
At this point, the URL and API token of the Lightning Charge server must be stored.
We can find these anbagben in our BTCPay server. However, this requires that C-Lightning (instead of LND) has been selected as Lightning Node when setting up the BTCPay server.
We go to our BTCPay server in the Server Settings section. There under Services and Lightning Charge Services. In the Credential section we can find the required information.
The information from the server in the AuthendicatedUri field is entered in the Server Url field. The information from Uri goes to Public URL and the APIToken goes to API token.
Then Save Changes and the configuration is ready.
Article provided with payment barrier.
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 this page we will show you how to add a Lightning Publisher for WordPress paywall to your WordPress article.
To do this, go to a post and switch to the text view.
In the text view you go to the place, from which the contribution is to become liable to pay costs.
At this point you insert the shortcode: [ifpaid AMOUNT CURRENCY]
For Amount you enter the amount and for Currency the corresponding currency. Please place the square brackets flush with the text. We had to insert a space here to describe the code. Otherwise, the rest of the text would have disappeared behind a paywall. So please do not insert a space after the [ifpaid XXX]
For example, you can offer the post for 5 cents, then you need to enter [ ifpaid 0.05 EUR ]
. If you want to charge the item for 5 satoshi, then you enter [ ifpaid 0.00000005 BTC ]
.
You can also display a specific text and label the corresponding pay 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 then looks like this:
When the reader clicks on the “Pay now with Bitcoin Lightning” button, the following payment window opens:
After a successful payment, the page is called again 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, see: Zahlung je Zeitungsartikel mit Bitcoin Lightning
Leave a Reply
Your email is safe with us.