Recurring Bitcoin Payment for Subscription and Memberships
This post is also available in: German
Wiederkehrende Bitcoin Zahlung für Abo und Mitgliedschaften
Wiederkehrende Bitcoin Zahlung für Abo und MitgliedschaftenWiederkehrende Bitcoin Zahlung für Abo und Mitgliedschaften
Recurring Bitcoin Payment for Subscription and Memberships
Accept Bitcoin for subscription payment, memberships and recurring payment.
In this post, you’ll learn how to accept Bitcoin for subscription payment, recurring Bitcoin payment, and memberships.
Bitcoin payments are mainly made in online shops for one-time payments. But how can You Use Bitcoin for recurring Bitcoin Payment?
Recurring payments occur in various forms in online business. For example, as monthly support for artists, YouTubers or bloggers from your fans and followers. For monthly financial support, fans receive benefits such as exclusive content, community or personal insights into the creative work of the stars. The provider Patreon offers a solution for artists, but without Bitcoin.
However, recurring payments can also be used to offer and settle memberships or receipts on a monthly basis. Also in the area of rental, recurring payments are very much in demand.
But how can a recurring Bitcoin payment be implemented if Bitcoin is a push payment that must be executed again and again by the payer?
On our search for a solution, we came across LibrePatron. LibrePatron has been developed as a Bitcoin alternative to Patreon. LibrePatron can also be used for recurring Bitcoin payment of subscriptions, memberships or for financial support and donations.
LibrePatron for recurring Bitcoin payments
At LibrePatron, the customer is presented with various products, which are to be paid as a recurring Bitcoin payment every month. The customer receives a payment request by e-mail every 30 days. This request for payment contains the invoice that the customer can pay by Bitcoin every month.
The LibrePatron system manages customers, automatically generates the payment request every 30 days and sends the emails to customers. If payment is not made, access will be blocked.
LibrePatron works on the basis of the BTCPay server and was originally developed as an alternative to the Patreon system. We want to use the system to settle a recurring Bitcoin payment as a monthly rent for a BTCPay Shop and BTCPay server.
LibrePatron from the user’s point of view
On the website https://patron.coincharge.io we offer the possibility to rent a BTCPay shop or a BTCPay server per month.
When the customer goes to the page, he gets the following view.
This home page can be customized with markdown commands. 21 templates are available for the color layout.
Either by clicking on the link below or in the menu item Subscriptions, you can get to the overview of the offered services:
Here you can choose one of the listed products. The prices of the offered products can only be displayed in USD. Accordingly, the amount in euros was listed again in the product description.
By clicking on the Subscribe Bitcoin button you will get to a page to register.
A username is generated during registration. In addition, the email address to which the invoices are sent later.
After registration, the customer enters the login area, where he logs in for the first time.
Immediately after registration, the payment page is accessed and the first payment can be made.
In the future, the customer will receive an email every 30 days asking to pay the monthly rent for the equivalent of 11 USD or 22 USD by Bitcoin or Lightning.
In the LibrePatron back-end system, all customers are listed in the User Management (Manage Users) section. With the details of the username and email address. The Expiration field shows the date when the customer is prompted for payment again. The Role field lists the product that the customer purchased.
Payments are also displayed in the backend of the BTCPay server. In yellow, the payments that have been successfully executed but do not yet have sufficient confirmation.
The transactions with the green status Complete are confirmed by the Blockchain. With a kick on details you get the detailed information about the respective transaction.
Install and set up LibrePatron
In order to be able to offer Bitcoin subscription payment yourself, the LibrePatron must be installed on the server on which the BTCPay server also runs. You have to have your own server running. A BTCPay shop as a third party solution is not enough for this.
A separate BTCPay server can be set up at LunaNode. How this works is explained in the LunaNode Hosting guide.
Of course, you can also run a BTCPay server with any other provider. We describe the installation here using the example of LunaNode. After you have set up the BTCPay server at LunaNode, we need some information from LunaNode. We need the IP address through which the server can be reached and the access data for the server.
To do this, we log in to LunaNode and get to the LunaNode Dashboard
Then you click on Manage and get an overview with all relevant information about your BTCPay server.
The required information is:
- Name of the server in the way: btcpay12345.lndyn.com
- External IP in the way: 220.127.116.11
- Initial login details: like username and password
Create a domain
LibrePatron must run on the same server as the BTCPay server. For this purpose, we have obtained the necessary access data of our BTCPay server at LunaNode. Now we have to determine a domain for LibrePatron, which the customers can call up. This domain can be a completely independent domain or a third-level domain from our main domain.
We will use the domain patron.coincharge.io. Accordingly, we have to create an A-Record entry with our domain provider. This A-Record is called patron and is a third-level domain of Coincharge.io. As an IP address, we specify the IP address that we received as an external IP from LunaNode.
Install LibrePatron on the BTCPay server
Then you open the terminal (Mac, Linux) or Putty (Windows) program on your computer and connect to your BTCPay server.
To do this, you enter the following command:
For btcpayxxxxxx.lndyn.com, use the name of your BTCPay server.
Then you will be asked to enter a password. Enter the LunaNode password here. Not the password for LunaNode, which you use for the website, but the password from the server from the Initial Login Details field.
You have successfully logged in to your BTCPay server. Now you have to log in as admin (Sudo). To do this, you give the command:
sudo su -
with the stroke. Then you switch to the directory btcpayserver-docker. You can do this by typing the command:
and then you enter:
for the next command, you need to make a small individual modification. You must now specify the domain for which you created the A-Record.
In the following command, you need to use the domain on which the page will be shown later instead of your domain. So the domain for which you created the A-Record.
Then enter the last command:
. btcpay-setup.sh -i and press Enter the last time.
Then the lines rattle over your screen and when that’s done, you open the browser and enter the Bitcoin address from the page.
You should then be welcomed by this login:
Now you should register and register immediately on the site. The person who registers for the first time is automatically created as an admin.
After you have successfully registered and logged in, the following view appears
Switch to the admin area and we start customizing LibrePatron to meet our needs.
We are shown to be using version 0.7.37. On the Github page, version 0.7.39 is mentioned as the latest version at the time of our installation. An update to the latest version should be possible by updating via the BTCPay server. To do this, go to Server Settings Maintenance within the BTCPay server > and click update.
Unfortunately, it didn’t work with the update with us. So we have to continue with the previous version.
Connect BTCPay to LibrePatron
Now LibrePatron has to be connected to our BTCPay Shop on our BTCPay server.
To do this, we go to BTCPay Setup in the admin section.
The Url of BTCPay Instance field should already be prepopulated. This is the address of the BTCPay server on which the LibrePatreon application runs.
We click here to get the required pairing code. We will be redirected to the login area of the BTCPay server and log in there.
Now we need to select the appropriate store that will be connected to our Bitcoin subscription payment system sol. If we have not yet created our own shop at this time, we are now catching up.
In our case, we call the Store Patron.
After that, the page Pairing permission appears
and we confirm the settings with Approve
The pairing code is located in the green box and is about 7 characters long. We create this pairing code and enter it with LibrePatron and we then receive the message “Pairing to BTCPa is complete.”
For the Bitcoin subscription payment, it is necessary that the members are notified by email at each payment date. Accordingly, an e-mail address must be stored, through which the e-mail is sent.
After you have filed the email details, you should send a test email. This email will be sent to the Administration Account.
Despite various email accounts, it has not been possible for us to send a test email.
The LibrePatron system in combination with an own BTCPay server should be used for recurring payments via Bitcoin. It was developed as a Bitcoin alternative for the Patreon system.
Unfortunately, we have not been able to get the system to send automated emails. However, this is necessary in order to remind the customer every month to pay again. For this reason we cannot give a final assessment. LibrePatreon was unfortunately unsuitable for our requirements. We have contacted the developer via Github. Unfortunately he had to inform us that further updates will not be made.
If readers of this article have other experiences, we would be pleased to receive feedback.
This post is also available in: German