Bitcoin payment from the point of view of an online store
The following article describes how a Bitcoin payment works from a merchant’s point of view. You will learn how to initiate a Bitcoin payment, how to convert Euro to Bitcoin and how to inform the merchant about the successful payment in order to deliver the goods.
If you already run your own online store, you have already integrated the most common payment methods such as credit card, PayPal and online bank transfers). Thus, you are familiar with the basics of payment processing. The payment processing for Bitcoin payments is identical in many areas and even simpler in terms of technical implementation. For a better understanding of how to incorporate Bitcoin, as another payment method, this post will serve.
Customer payment in online store
In an online store, prices are usually marked with euros, but then how can the customer pay with Bitcoin?
In an online store, the end customer selects goods priced in euros and places everything in the shopping cart. After completing the purchase, the customer goes to the checkout and the so-called checkout process begins. When purchasing physical goods, the end customer enters the required data at the checkout, such as shipping address and contact details, and is then taken to the payment page.
The payment page lists all the payment options offered. Besides credit card and PayPal, Bitcoin and other cryptocurrencies can also be listed as payment methods at this point.
If the customer decides to use Bitcoin as a payment method, the current Bitcoin rate is requested from a Bitcoin exchange in the background. Based on the current exchange rate, the Euro value of the shopping cart is converted and the value of the shopping cart is converted into Bitcoin.
In parallel, a unique and one-time Bitcoin address is generated for this order. This Bitcoin address, including the invoice amount in Bitcoin, is displayed to the end customer in the form of a QR code.
Payment page for a Bitcoin payment
The end customer pays by scanning the QR code and the payment process is triggered.
Bitcoin payment incurs fees in the form of a transaction fee. This fee is paid by the payer, the buyer. The transaction fee is paid to the miner as a reward for processing and confirming this transaction.
Each transaction must be recorded and confirmed in a block. Only when the Bitcoin payment has been confirmed, this payment is considered final and irrevocably completed. Before a transaction can be confirmed in a block, the transaction waits for it to be given a place in a future block.
The order on the waiting list is assigned according to the principle of an auction. The higher the transaction fee the payer is willing to pay, the further forward the place in the queue and the faster the transaction is processed and confirmed.
The price of a transaction is based on the size of the file and is paid in satoshi per byte. The average file size is about 220 bytes. The price per byte is determined by what you are willing to pay to be in the next block.
More information on the calculation of transaction fees
This procedure can be imagined as at a bus stop, where numerous people are waiting for the next bus. On average, a bus leaves every 10 minutes. If the current bus has only a few seats left, the price will increase by the last few seats. Some of the people waiting for the bus do not take the current bus, preferring to secure a favorable seat on the next, empty bus.
As a rule, it is divided into three speed levels (fast, normal, slow). When the payer makes a payment in their wallet, most wallets suggest a normal speed. The customer can follow this recommendation or adjust the fee himself.
The amount of the transaction fee and, consequently, the speed of the payment is solely up to the payer. The payee (merchant) has no means of influence to accelerate the crediting of the payment.
Bitcoin payment is in mempool
The lifecycle of a Bitcoin transaction consists of two steps: First, the transaction is propagated on the network. This means that every transaction can be recognized by anyone after just a few milliseconds. In this state, the transaction is still considered unconfirmed.
Only when a miner puts the transaction into a block and appends that block to the blockchain is the transaction considered confirmed. This can happen after just a minute or two. Depending on the amount of transaction fee chosen by the payer and the operation on the blockchain, a transaction can also take hours or days.
The mempool is virtually the waiting room for all unconfirmed transactions waiting for a free place in one of the next blocks.
When the payer makes the payment, this transaction is propagated in the mempool within one millisecond. The merchant immediately recognizes that the transaction is on its way. The merchant can also read how high the transaction fee paid was and draw conclusions from this as to how long it could take until the transaction is finally confirmed.
Depending on the business model, there are different recommendations for action. If the goods are high-priced, you should wait with the delivery of the order until at least 6-7 confirmations of the transaction have been made. Then the payment is safe and can not be reversed. Payment is virtually guaranteed.
But this can still take one to two hours with a normal or high transaction fee. If the goods are sent by mail, this is not a big problem. In the meantime, the goods can be made ready for shipment and will not go on their journey until the confirmations of the transaction are recorded in the blockchain.
For digital or low-value goods, such a long waiting time cannot be expected of customers. It is therefore advisable to enable access to digital goods as soon as the payment has been executed by the customer. The payment has been made by the customer, but not yet credited to the merchant. It is only a matter of time when the credit will be issued.
The risk is low that the payment will not be completed at all. In theory, this is only possible if no transaction fee has been paid by the customer at all. The marginal risk of default should be accepted by a merchant, as customers expect fast settlement. The added value from satisfied customers is far greater than the low, potential risk of default.
Receipt of payment from the dealer
If the customer’s Bitcoin payment was successfully processed and confirmed in a block, the Bitcoin will be on the merchant’s wallet.
The merchant must now assign the incoming payment to the corresponding order.
In a Bitcoin payment, the merchant knows the Bitcoin address assigned to the particular order. The amount of bitcoin expected to be received by the wallet is also known.
There is no clear purpose for the payment, which would make it possible to unambiguously identify the incoming payment. This function is indirectly fulfilled by the Bitcoin address, which is only used once.
The bitcoin amount also cannot be used as a unique identifier. The amount transferred may have been changed by the payer and then there will be an underpayment or overpayment.
There are two main reasons for this. For example, the customer wants to buy a product for €50 in Bitcoin. The trader has calculated the equivalent value based on the current rate at the time of the order.
The trader has calculated the equivalent value based on the current rate at the time of the order. Different rates may apply here. This may result because some time has passed or because different exchanges were used to calculate the price.
More often, underpayment occurs because the end user makes the Bitcoin payment directly from an exchange rather than from their wallet. Here, the transaction fees on the part of the exchange are deducted from the payout amount. Accordingly, the payment received by the merchant is reduced by the transaction fee.
The dealer must decide how to deal with such an underpayment. Will the underpayment be tolerated and accepted as a successful payment or will the difference be demanded.
Due to the potential difference between the expected Bitcoin amount and the actual credit, a clear attribution of the Bitcoin payment is not unambiguously possible via the amount alone.
This problem is solved in which the merchant uses a separate and unique Bitcoin address for each order. This ensures a clear assignment of an order to an incoming payment.
The organization and processing of a Bitcoin payment is offered by Bitcoin payment providers as a service for online merchants. A detailed description of the services can be found in the article “What does a Bitcoin payment provider do?„