Accept Bitcoin payments on your e-commerce store with BTCPAY Server

Patrick van Kleef 29.09.2021 10:19:07

El Salvador is the world's first country to embrace Bitcoin as an official currency. On September 7, 2021, the people from El Salvador could download the Chivo wallet and automatically receive $30 dollar in Bitcoin. In the country, 200 Bitcoin ATMs are installed which can be used to convert Bitcoin into USD and withdraw in cash. The government stated that Bitcoin is optional and will not be mandatory if you don't want. Other countries like Cuba are investigating a similar step.

Bitcoin has been around for some while now, but last couple of years more people, companies, banks and even countries are seeing the potential. Let's take a quick tour and look at the benefits and downsides of accepting Bitcoin for payments.

Benefits for accepting Bitcoin payments

Accepting bitcoins or other cryptos comes with great benefits. Crypto transactions are known as peer-to-peer. This means that you transfer money from one person (or business) to another without a man in the middle. Traditional transactions are processed through a payment gateway or processor and the merchant is charged with transaction fees. With peer-to-peer transactions, you eliminate the transaction fees. However, with crypto payments, you need to keep into account mining fees which currently seems a major drawback. More about that later.

Bitcoin is built on secure blockchain technology. The Bitcoin blockchain is using miners to validate transactions using cryptography. Any transaction done on the blockchain is irreversible. Because transactions are validated by multiple miners (consensus mechanism), it becomes nearly impossible for anyone to change transactions or doing some kind of attack on the blockchain. This makes it one of the most secure ways of storing transactions.

Even though a lot of people are enthusiastic about Bitcoin, there are drawbacks that need to be addressed before the majority of companies and users will accept Bitcoin as a payment option. However, many companies are getting a lot of attention when announcing they accept cryptos. Marketing wise it seems like a smart move. Just look at the intense exposure Tesla got when they announced people could buy a car with Bitcoins.

What are the downsides?

The biggest concern is the fact that the price of Bitcoin is very volatile. In April this year, the price of one Bitcoin was worth $60K and a month later it dropped to $40K. This makes it hard for eCommerce businesses to price their products. But also how to handle product returns? A consumer could have bought a product for ₿1. When the product is returned then the price of one bitcoin could have dropped dramatically. Or the opposite when the price of Bitcoins goes up it might trigger consumers to return products. Also, a lot of people see Bitcoins as an investment (like gold) so why would they want to pay with Bitcoins?

Another downside is that currently, it requires a lot of computing power to validate transactions and to mine new coins. And it's the question if mining farms are using renewable energy. Even though there are many benefits of using crypto for payments, energy consumption is a major drawback. People prefer sustainable products and services.

At the moment, Bitcoin doesn't scale very well. Currently, Bitcoin can handle a few transactions per second. This means that it can take quite some time before your money is transferred to another wallet. If make a transaction you need to pay mining fees. These fees are used to pay miners for their work for validating transactions. Miners are more likely to prioritize your transaction if you pay a higher mining fee. If you don't pay mining fees (optional) at all there is a big chance it will take very long that your transaction is processed or there is even a chance that the transaction is canceled.

Transactions scalability problem and expensive mining fees

Altcoins like Solano and Cardano (and Ethereum 2 "soon") are using a different consensus mechanism (technique of validating transactions) called Proof of Stake. Bitcoin is using Proof of Work which is very inefficient and requires a lot of energy. Currently, Bitcoin can only process 4.6 transactions per second. If you compare that to Visa which processes 1700 transactions per second it's very slow. Proof of Stake scales much better and it reduces the mining fees. For comparison, Solana claims that it can handle up to 50.000 transactions per second and the average transaction costs are as low as $0.00025. Well, it's known that a lot of promises and statements are made in the crypto world so we have to wait and see how it will end up.

Even though Bitcoin is using Proof of Work that doesn't mean that there is no solution for the scaling and mining fees problem. There are several layer 2 solutions, like the Lightning network, that solve this problem. Just a side note, blockchain exists of 4 different layers:

  • Layer 1 - network
  • Layer 2 - protocol
  • Layer 3 - Service
  • Layer 4 - Application

Bitcoin and Ethereum are layer 1 projects. Crypto projects that are built on existing blockchains (layer 1) are called layer 3 or 4 projects. Layer 2 is a protocol or framework that is built on top of an underlying (layer 1) blockchain protocol. It can be used to improve scalability and efficiency. An example of a layer 2 blockchain solution is the Lightning Network. It tackles the scalability and high transaction fees problem. The Lightning Network is currently used in El Salvador.

Which eCommerce companies are accepting Bitcoin payments?

Currently, we see many companies like Expedia, Overstock, Starbucks, CheapAir and Starbucks are accepting Bitcoins (or other cryptos) as payments. In El Salvador, many companies (big and small) are accepting Bitcoins after it was announced as a legal payment method in the country. Outside El Salvador it's not yet widely used, but, there is a strong movement towards crypto in general. Also, banks and countries are looking at crypto and adopt it. You can find where you can pay with crypto on this interactive map.

In order to accept Bitcoin payments on your online store, you'll need a cryptocurrency payment processor. There are several solutions on the market CoinBase, BitPay, NowPayments and BTCPAY Server. Some of these solutions are charging fees and others are free.

Accepting Bitcoin payments with BTCPAY Server

BTCPay Server is an open-source Bitcoin (altcoins supported as well) payment processor that you can use in your online store or your Point of sale app. It's an easy and fast way of accepting Bitcoin payments. You have the option to use third-party hosting or you can host BTCPay Server yourself. It's recommended to host it yourself for production purposes. If you choose third-party hosting you'll need to pay hosting costs. There are many crypto payment processors on the market but BTCPay server will allow you to take full advantage of peer-to-peer payments without any banks or third-party payment processors. Use crypto as how it is designed!

How does it work for companies?

With BTCPAY Server there are several options for accepting Bitcoin payments. Let's go through two of them.

Payment request

A payment request is a long-lived invoice. The exchange rate at the time of payment is used. A payment request is shared with users by sending a link to a hosted page on the BTC Pay Server. The invoice includes a QR code, wallet address and the amount.

Pay button

The pay button is an easy way of integrating BTCPAY Server with your online store. In the BTCPAY Server portal, you can customize your button and copy the HTML to your site. When users click on the button, the invoice is presented. Invoices that are created with the pay button expire in 15 minutes.

Push vs pull payments

Credit card payments are using a pull mechanism. This means that an amount is pulled from the user's account after they provided their credit card information. Crypto works with a push mechanism. A user needs to push an amount from their wallet to the receiver. For companies, this means that the payment is received when the user transferred the amount (and the network has validated the transaction). UX wise you need to keep in account that it can take up minutes (or maybe even longer) before a transaction is processed.

How does it work for the consumers?

One obvious requirement is that the user owns Bitcoins. The user can have a hot wallet, mobile wallet, hardware wallet or maybe a desktop wallet. The consumer can use their wallet app to scan the QR code that is displayed on the invoice or copy the wallet address and manually enter the transaction details.

In the demonstration videos, you can see that the Bitcoin Testnet Wallet is used. What you can see is that the user needs to specify the mining fees. It's important to understand that the transaction needs to be validated by the network (done by miners). Miners are first validating the transactions with higher fees (goes to the miners). Basically, means the higher the mining fees the faster the transaction is validated and processed. There is a risk that when you choose no mining fees the transaction will not be validated and the funds are returned to the sending wallet.

Video of payment request

Video of payment button

How to implement BTCPAY Server in your online store

An easy way to get started with BTCPAY Server is to use the testnet network. Testnet is an alternative Bitcoin blockchain that can be used for test transactions. BTCPay provides a hosted test environment that works with the testnet blockchain. First, you need to sign up here. The next step is to login and create a store. Each store must be connected to a wallet for receiving funds. BTCPAY offers an online wallet for funds management. For the store, you can make many configurations like which coins you accept, when invoices expire, user management, integrations. For more information about store settings visit the documentation. The pay button is a fast way of integrating BTCPAY Server with your site. The pay button can be fully customized in the portal and the presented HTML can be copied and paste on your product or checkout page. Once these steps have been completed you can accept Bitcoins payments on your online store.

For production scenario's it's recommended to host BTCPAY Server yourself. Third-party hosting is fine to get up and running fast for testing purposes but that it comes with downsides if you use it for production. You need to trust the third party, security and privacy concerns and you're not in control of the server. Some features might not be enabled and the server might not be up-to-date. There are several options to host BTCPAY Server. You can choose a cloud vendor like Azure or Google, or you can set up your own hardware. More information about hosting here. It's important to mention that it requires knowledge to set up BTCPAY Server yourself.

BTCPAY Server is not the only payment processor on the market. There are many others like Coinbase and NOWPayments. Just make sure to look at the conditions of these payment processors. Because some of them are not free and are charging transaction fees or come with other restrictions. Peer-to-peer (crypto) payments give back control to consumers and companies. Some of the payment processors on the market might remove the benefits of crypto payments. On the other hand, payment processors like BTCPAY Server require you to have technical knowledge to run it in production and if you don't have these resources or the capacity other payment processors might be a better choice.

Cryptocurrencies are gaining popularity and many companies are embracing it. Price volatility, environmental concerns and consumer adoption still prevent crypto to be widely used. But things can go fast and that is exactly what we now see in El Salvador. Many big companies like McDonald's, Starbucks and PizzaHut are accepting Bitcoin payments via the Lightning Network in El Salvador. Of course, we will need to wait and see how this will evolve but in general, we are coming closer to a world where paying with crypto is just as normal as credit card payments.