So you created a bitcoin wallet, did a few transactions and are loving the cryptocurrency memes and financial freedom. Surely its time now to accept bitcoin payments on your online store!

Do you really need a bitcoin payment gateway? How about a bitcoin payment processor? Isn’t having a bitcoin address enough? Why use a custodial payment gateway for a currency meant to regain monetary control?

The answer is NO. You don’t need to use a payment gateway or payment processor to accept bitcoin payments on your website

While we at Blockonomics offer our own bitcoin payment gateway, it’s not always necessary. Let’s try to build bitcoin payment processing capability step by step from scratch.

Step 1

Show a bitcoin address with QR Code

Andreas Antonopoulos accepts donations on his page using a simple QR code

This is the simple and the most effective way to receive donations. Users can pay to the given bitcoin address, whatever amount they like.

This looks easy, however the scenario is a bit different for merchants that get orders on online shop. The below question is asked a lot:

Why not just always show my bitcoin address on cart checkout?

The problem is bitcoin transactions can publicly be seen on any blockexplorer. So any customer can claim that he sent bitcoin to you just by quoting a publicly known txid matching the cart value. Also there is a privacy problem - All of your shop payment history is now known to the whole world.

Step 2

Create unique bitcoin address for each order

ICOBench gives each customer unique bitcoin address for payment

To create multiple bitcoin addresses, you don’t need to keep opening your wallet each time. Bitcoin provides HD wallets; so you can create receive payment addresses easily using wallet xpub. Here are the recommended tools for doing this:

Generating unique bitcoin addresses for receiving payments using pycoin library

There is a common concern of creating too many addresses

Would my wallet be able to handle so many addresses, should I recycle them?

Recycling addresses is generally a bad idea. Bitcoin clients are able to handle millions of addresses . Unless you have order volumes of the scale of Amazon, no need to worry about this.

Step 3

Invoice Automation

When crypto order volume start picking you would cannot manually verify each order in your wallet / blockexplorer. More automation is required:

Show exact BTC amount to pay depending on current BTC price Auto detect payment and show order confirmation in real time Update order status when BTC transactions confirms

A BTC payment invoice updated in realtime (Source: Btcpay Wiki)

For this, you can choose from various open source tools. Some of these require a bit of setup including running a bitcoin node to avoid calls to third party APIs:

Cashier BTC — Self-hosted Node.js Bitcoin payment gateway. Depends on Nodejs v8+, Bitcoin Core, Couchdb for storage. BTCPay Server — Built in C# and conforms to the invoice API of BitPay. Pulls transaction information from its own bitcoin node Electrum Merchant — Uses electrum daemon as a watch only wallet to enable merchants to accept bitcoins

If you are using e-commerce platforms like Wordpress / Prestashop, there are plugins available [1] [2] that integrate easily with your order / checkout flow.

Step 4

Conversion to Fiat

I need to immediately convert received BTC to fiat

No! Please skip this step!

Be aware that you are virtually contributing nothing to the bitcoin ecosystem if you instantly convert BTC to fiat. However, merchants do need to pay bills and cannot risk holding BTC in bear market. You can convert to fiat/stablecoin by sending funds to your local exchange regularly. For this you can also use a bitcoin payment forwarding service