Bitcoin WooCommerce – Accept Bitcoin Payments with WooCommerce
This post is also available in: German
You already run an online store and use WooCommerce? Then you can easily accept Bitcoin payments in your WooCommerce online store.
Either you run your own BTCPay server or you are co-user of an already existing BTCPay server. Coincharge offers this free shared use. You can create your own BTCPay store at https://btcpay.coincharge.io, which you then connect to your WooCommerce store.
After you have preset the BTCPay store, you will learn in this article how to expand your WooCommerce online store to accept Bitcoin payments.
Bitcoin WooCommerce Plugin
With the Bitcoin WooCommerce Plugin from BTCPay Server you can accept Bitcoin payments. On this page we explain how to install the Bitcoin plugin for WooCommerce on your WordPress page to accept Bitcoin payments.
Install Bitcoin Plugin at WooCommerce
In the first step, you have to install and activate the online shop of WooCommerce at WordPress via the plugins section.
Among the settings you will find the standard Payment Options in the Payments section.
To add Bitcoin as another payment method, you need to add the Bitcoin plugin as another plugin.
For this you go to the Worpress settings on WordPress > Plugins > Add New
There you enter in the search “BTCPay for WooCommerce“. Then the Bitcoin plugin shown above from BTCPay appears and clicks on “Install Now“.
You can also download the BTCPay Bitcoin WooCommerce plugin directly from the Github page of BTCPay Server. You can find the latest version at
Then you save the file called btcpay-for-woocommerce.zip in the current version on your local computer and then install it with WordPress under plugins.
WooCommerce Payment Settings
After the BTCPay WooCommerce Plugin has been installed and activated, you will find under WooCommerce >Settings >Payment beside the previous payment method now BTCPay Bitcoin.
You click on “Set up” and the following page opens:
In the Title field, the word “Bitcoin” is written. That is the designation, which the customer with the selection of the payment methods made available in the Shop.
In the “Customer Message” field, the message that the buyer receives is what happens when paying.
BTCPay API Token / Paring Code
To connect the WooCommerce Shop to its BTCPay Shop, an API token is required. This requires that you have prepared a store on your BTCPay server.
If you run your own BTCPay server, the url is e.g. https://btcpay.my-domain.com
If you have set up a store on the Demo BTCPay server of Coincharge, you have to enter https://btcpay.coincharge.io:
Then you click on the link that appears behind the text “Get a pairing code”.
You will then be able to access the login page of the BTCPay server. If you have an account, then you log in. If you don’t have an account yet, set one up.
You can find out how to do this in the post: “Set up BTCPay Shop“
If you have created a BTCPay shop on the BTCPay server and are logged in to the server, you will see after clicking on the link:
Get a pairing code: https://btcpay.coincharge.io/api-tokens
See the following page:
We had given the shop the name Coincharge and click on Request Pairing.
After that, another window with Pairing Permission opens.
You will be able to get to the following page:
The code appears in the dark green bar. Unfortunately, you don’t see it very well, because the font has almost the same color as the bar.
But you see a text “Server initiated pairing code:” and behind it a code of 7 upper- and lowercase letters. You can copy this pairing code under API Token and Pairing Code on the WooCommerce page.
After that you click on Pair and if everything has gone as it should, then you will see the following picture:
The other settings on the WooCommerce Payment Settings page can be configured according to individual requirements.
The settings that have been made for the BTCPay Store on the BTCPay server are applied.
In the Order States field, the order status is processed.
Depending on your business model and shop settings, you can configure the order status.
- New Order – Order has been placed but not yet paid.
- Paid – Order paid, but not yet confirmed on the Blockchain
- Confirmed – Order paid and confirmed by Blockchain
- Complete – Fully Completed – Order paid, confirmed on the Blockchain and receive sufficient number of confirmations (Confirmation)
- Invalid – Order paid, but did not receive the sufficient number of confirmations within the predefined time frame specified in the BTCPay settings.
- Expired – Invoice expired, order not paid
- Paid after expiration – invoice was paid after the time had expired.
- Expired with partial payment – Expired after payment of a partial amount.
You should take some time to consider how to automate the respective status.
Because a certain BTCPay status can trigger an order status in WooCommerce.
As a retailer, you want to inform a customer by email when the payment has been received. Should this message be made if the payment is “on the way” (0 Confirmation), has been processed by the Blockchain (1 Confirmation) or already has several confirmations (6 Confirmation).
When does the retailer start processing? If it is a digital product, delivery will take place immediately. In the case of a physical product, postal mailing may not take place until the next day.
Therefore, if a merchant wants to inform the customer that the payment is successfully on its way, but only provide the service once the payment has been confirmed by the blockchain, then the merchant must set the “order status paid” to “deferred”.
To do this, the Merchant would have to adjust and trigger the email for the “on hold” status of the order in WooCommerce.
The perfect formula for your individual requirements can only be found by trying it out.
Customer view in the shop
If the end customer has entered his delivery address, the selection of available payment methods appears.
Bitcoin is then also listed there as a payment method:
You can adjust the text block “You will redirected to BTCPay Payment Page to complete your purchase”. You do this in the settings of the WooCoomerce BTCPay plugin.
proceed to BTCpay
Then there is the button “proceed to BTCpay”.
Most end customers will not be able to do much with BTCPay. To avoid confusing these customers, we have changed the text to “proceed to Bitcoin”.
For this we have to go to the file server in the directory where the BTCPay WooCommerce Plugin is stored.
This is located in: / httpdocs / wp-content / plugins / btcpay-for-woocommerce /
and there we need to find: class-wc-gateway-btcpay.php
We open the file and look for the phrase “proceed to BTCpay” and change the text to “proceed to Bitcoin” and save the file.
When the end customer clicks on the proceed to Bitcoin button in the shop, the Bitcoin payment window opens. You can find out how to customize the Bitcoin Payment window at : Create Bitcoin Checkout page for BTCPay.
How to administrate the settings of the BTCPay Shop can be found in the post “Administer BTCPay Shop“
Otherwise, all you have to do is fill the WooCommerce Shop with products and wait for customers who want to pay with Bitcoin.
To advertise your new shop, you should register the Bitcoin Shop with Coinpages. Coinpages list all German-language shops, accept Bitcoin and other cryptocurrencies. You can register there for free. The direct link to the entry Coinpages Add Listing
The article presented here explained how your WooCommerce online store was linked to a BTCPay store to accept Bitcoin payments. If you are using a third-party store, such as the demo store at https://btcpay.coincharge.io, you will not be able to receive Lightning payment. This only works if you run your own BTCPay server.
This post is also available in: German