Pairing the Lightning Paywall with the BTCPay Store
For payment processing, the Lightning Paywall uses the functionality of the BTCPay Store.
The prerequisite is the setup of a BTCpay Store. You can find the corresponding instructions under Setup BTCPay Store for Lightning Paywall
After you have set up the BTCPay Store and installed the WP Lightning Paywall Plugin on WordPress, the Lightning Paywall needs to communicate with the BTCPay Store.
This is done by pairing the WP Lightning Paywall Plugin with the BTCpay Store.
The pairing of the WP Lightning Paywall with the BTCPay Store is explained here.

BTCPay Server Url

In the General Settings section of the WP Lightning Paywall plugin, the pairing is started.
In the BTCPay Server Url field, enter the url of the BTCPay server where the BTCPay store to be used is located.
After entering the url of the corresponding BTCPay server, a link will appear.
We click on this link and are redirected to the required area of the BTCPay server.
If you are already registered on the BTCPay server, you will be redirected to this section. Otherwise, a login is required.

BTCPay Server API Key

We need a total of two API Keys for the communication between the WP Lightning Paywall Plugin and the corresponding BTCPay Store.
One API key to create an invoice and another API key to view the invoice.
Accordingly, we click on the green button with the text. “+ Generate a new key“
We get to an overview with a variety of applications.
At this point, we determine which applications the Lightning Paywall is allowed to run.
It is not necessary that the Lightning Paywall receives permission for all of these applications.
In the first step we create the API key for creating an Invoice (View Invoice).
Therefore we give this API key the label: “View Invoice Lightning Paywall“. You can also choose your own label.
After that you set a check mark at View Invoices.


After you check the box, click on “Select specific stores” and select the BTCPay store for which you want to grant the permission.
If you have multiple BTCPay stores set up on the BTCPay server, then select which specific store you want to grant permission for.
In our case, we select the store that we call Lightning Paywall.
After that we go to the bottom of the page and click on the green button labeled “Generate API Key”.
An API key is generated. However, the required key is not displayed directly.
For this it is necessary to click on “Click to reveal“.


Now we repeat the process again and create the second API key to create an invoice.
Again, we create a unique label. To distinguish it with the label “Create Invoice Lightning Paywall“.
Check the “Create an Invoice” box and select our BTCPay store via “Select specific stores“, then at the bottom of the page via “Generate API Key” we also create the second key.
We have now created a total of two API Keys. To get the API Keys displayed, click on “Click to reveal“.


The respective API key must now be copied and pasted into the corresponding fields in the WP Lightning Paywall plugin.
It is important to make sure that the correct API key is pasted into the correct field.
Then we click on Safe and then perform a check to see if the pairing was successful.
We click on “Check BTCPay Server Status“. If after that in green font appears the text.: “BTCPAY SERVER CONNECTED” appears, then everything was done correctly.


After you have successfully paired the WordPress Lightning Paywall plugin with the BTCPay server, you can start adding the Lightning Paywall to the individual the Blog Post or WordPress pages.
How to add a Lightning Paywall to a blog post, you can find in the post “Add Lightning Paywall to your blog post”.
Further information
Demo Page:
- Pay-per-Post Blog Post Demo Page
- Pay-per-View Video Demo Page
- Pay-per-File (coming soon)
- Donation (coming soon)
11 Comments
Leave your reply.