In our previous guide on “What is Bitcoin?”, we talked a bit about the monetary value associated with the Bitcoin protocol. As you may remember, we talked about how the Bitcoin technology can be used to send money to anyone else in the world. But how do these transactions work exactly?
Bitcoin Transactions: How, What and Why?
Bitcoin transactions take part between two people on the Bitcoin network in a true peer-to-peer fashion. Person A sends a [piece of a] Bitcoin to user B, who will see the transaction on the blockchain in mere seconds. And that is the beauty of Bitcoin transactions; they take place instantaneously and are visible on the public ledger we call the blockchain.
Every Bitcoin transaction requires at least one input (sending from person A) and one output (sending to person B). However, most Bitcoin transactions will consist of several inputs and outputs, which may contain other transactions as well. If you recall, transactions are bunched up in “blocks” of data, and your transactions are part of that data.
In order to make sure a transaction is valid [so it can be confirmed on the network], every input needs to be an unspent output of a previous transaction. If this is not the case, the transaction will be deemed invalid, and is rejected by the Bitcoin network. An example of a rejected transaction is when a user tries to send the same transaction twice to two different people, in an attempt to “double-spend” Bitcoin.
Note from the author: A more simple example would be trying to use the same 20 EUR bill to pay for two separate 20 EUR transactions at the same time. You simply can’t spend money that is already spent elsewhere. The same principle is applicable to Bitcoin.
One thing you may notice is when a Bitcoin transaction has one input, but multiple outputs. There are several reasons for this occurrence. One explanation is that one sender is transferring money to different Bitcoin addresses at once, comparable to how you would sign multiple transactions with PC banking in one go.
But what if the Bitcoin network would charge you too much for sending a transaction to a different user, similar to how you pay too much in a store and get change in return? The Bitcoin network also supports “change transactions”, which take place when the sum of inputs exceeds the intended sum of payment. The “change amount” is simply returned to the sender in a separate transaction output.
Sending Money To Another User
There are several ways to transfer Bitcoins from user to user B. The most obvious method is to ask for user B’s Bitcoin wallet address, entering it in your Bitcoin client, and sending a specified amount of coins to him/her. While this way is the most obvious one – and still widely used – it’s not exactly practical if you have to remember your own address to give it to different people.
Luckily for us, there are far more user-friendly solutions out there as well. If you own an online shop, you can add buttons to your checkout page, which will take customers to a dedicated Bitcoin checkout page. On this page, users can click a link to send a transaction with their Bitcoin wallet on their computer, or scan a QR code with their mobile device and pay that way.
Note from the author : We will talk more about the various types of Bitcoin wallets in an upcoming guide.
Images courtesy of Pixabay