Skip to content
LearnBitcoin

LearnThe Journey · Chapter 4 of 7 · 5 min

How a Payment Works

One payment, followed from the tap to final. You send one yourself, with practice coins, and watch.

Where you're going: By the end you will have sent a payment, seen what it spent, and watched it become final. The chapter comes in three short parts, each with a step in the practice wallet. Reading takes about five minutes and the steps about ten. You can stop after any part and come back: the page marks the steps you have done.

A guess first. After you send bitcoin, how long until nobody can undo it: a second, ten minutes, an hour, or a week?

Part 1. What happens when you tap Send?

Alice wants to pay Bob. She opens her wallet, puts in Bob's address and an amount, and taps Send.

Her wallet writes a short message. The message says: these coins of mine now belong to that address. The wallet signs it with her key.

The signature proves that the message comes from whoever holds the key, and it does so without showing the key. It is the same kind of mathematics that protects your bank's website.

The wallet hands the signed message to the nodes, the computers that keep the record. Each one checks it against the rules and passes it to the others. Within ten seconds or so, most of them have it. No bank had to approve it.

There the payment waits, with other new payments, for a block to take it in. This place is called the mempool. You can think of it as the waiting room. Part 3 is about it.

Every payment also includes a fee: usually a small amount, for the miner who puts it in a block. Most wallets suggest one and let you change it. In a quiet week it is a few cents. On one very busy day in 2024 it was more than $45 for hours.

Now send one. In this step you pay some practice sats into "the pot". The pot is the practice wallet's own store: what you pay in is handed on to a learner who comes after you.

The step fills in the pot's address for you, it takes about a minute. The practice wallet shows the fee as a rate, and you can leave it as it is. If you have no practice wallet yet, the step helps you make one first.

Do it,

Pass it on

Your turn to tap Send: pay some practice sats into the pot for a learner who comes after you, and watch the payment get its first confirmation.

Opens LearnBitcoin's practice wallet in this tab. No account, no email, no money: its coins are worth nothing. To come back, press "Back to the chapter" in the wallet. It brings you back here and, once this step is done, marks this card done. Your browser's Back button marks nothing.

Part 2. What did the payment spend?

Your wallet shows one number. It gets that number by adding up your coins. On the record itself there are no balances, only coins.

A coin here is one amount that was paid to one of your addresses. If you were paid three times, you have three coins, much as you might have three bills of different values in your pocket.

A coin is spent whole, like a bill. Say you have one coin of 10,000 sats and you pay someone 6,000. Your wallet uses up the whole coin and makes two new ones: 6,000 for them, and about 3,800 that comes back to you.

The part that comes back is called change. With a bill, the shop gives you change. Here your own wallet makes it.

The 200 sats left over are the fee. And if no single coin is big enough, the wallet uses up two or more together.

Under the title 'A coin is spent whole', your coin of 10,000 sats sits on the left. Two arrows lead from it to two new coins on the right: 6,000 sats that you pay someone, and about 3,800 sats of change that come back to you. A line underneath reads: 'The 200 sats left over are the fee.'
The example above as a picture. The whole coin is used up, two new coins are made, and the 200 sats left over are the fee.

In the next step you count your own coins. Do not be surprised if there is only one. The payment you just made used up the coin you were given, and the change is what is left.

Do it,

There are no balances

Count the coins in your own practice wallet, then read what one of your payments did to them: what it spent, what went where, the change and the fee.

Opens LearnBitcoin's practice wallet in this tab. No account, no email, no money: its coins are worth nothing.

One thing follows that surprises people. The fee pays for room in a block, and a payment takes more room the more coins it uses up. So the fee depends on the coins in the payment, not on how much money it moves.

Part 3. When is it final?

A payment that the nodes have passed around is not on the record yet. It is in the waiting room, a queue whose technical name is the mempool.

Miners fill each new block from the waiting room. They are paid the fees on top of the new coins. So when more is waiting than a block can hold, the payments that offer the most for the room they take go first. Offer too little on a busy day, and your payment waits longer.

A block comes about every ten minutes on average. Some come within a minute, and some take an hour.

The block that takes your payment in is its first confirmation. To undo the payment, someone would have to make that block again, and every block after it, faster than all the other miners together. Making a block takes a huge amount of computing, and the electricity to run it, so that is costly from the first block and grows with each one.

After six blocks, about an hour on average, undoing a payment would take a large share of all the mining power there is. That is why six is the usual point at which people call a payment final. It is a custom, not a rule of the system.

Nobody can undo a payment for you, either. No bank will reverse one that went to the wrong address, or to someone who tricked you. The habit that guards against a wrong address: check the whole address before you send, and send a small amount first.

Watch it happen. Blocks come much faster on the practice version of Bitcoin, so six of them take a few minutes, not an hour.

Do it,

The waiting room

Send a payment and watch it wait, get into a block, and reach six confirmations.

Opens LearnBitcoin's practice wallet in this tab. No account, no email, no money: its coins are worth nothing.

A fair objection

"An hour to be sure, and no way to undo a mistake. My bank card is faster and safer."

For buying a coffee, it is. A card payment is approved in seconds, and for months afterwards the bank can reverse it if something was wrong. That protects the buyer.

Bitcoin offers the opposite: a payment that no bank or government has to approve and that, once final, nobody can reverse. For someone whose bank has frozen their account, or will not send their payment, that can matter more than speed. For a mistake or a fraud it is exactly the wrong property. The next two chapters are about the care that takes.

Faster ways to pay with bitcoin exist, and they rest on this one. The final chapter points to them.

Check yourself

What does a signature prove?

That the payment was approved by whoever holds the key. It proves this without showing the key. Reread Part 1.

You have two coins of 5,000 sats each and pay someone 6,000. What is on the record afterwards?

Both old coins are used up. There are two new coins: 6,000 for them, and a little under 4,000 for you as change. The small difference went to a miner as the fee. Reread Part 2.

Your guess at the start: how long until nobody can undo it?

About an hour, which is six blocks. No rule says six. By then, undoing the payment would take a large share of all the mining power there is. Reread Part 3.

Words you now know

  • Signature. Proof, made with a key, that a payment was approved by whoever holds that key.
  • Fee. What a payment pays the miner who puts it in a block.
  • Coin. One amount received in one payment. A wallet's total is its coins added up.
  • Change. The part of a spent coin that comes back to you as a new coin.
  • The waiting room. Where new payments wait for a block. Its technical name is the mempool.

What do you actually hold, then?

Go deeper

Corrected

  • Was: The description of the merkle tree picture said the block's 80-byte header 'contains only' the merkle root.

    Now: The header holds six fields and the root is one of them. The description, and the same sentence inside the diagram file, now say that of the whole tree only the root goes into the header. The Spanish edition carries the same correction. Details

  • Was: The confirmations table said it showed a 30% attacker, but its odds fit no standard model and fell to 0.025% after six confirmations. The chapter also called difficulty adjustments exact, put the chain at about 600 GB, and said rewriting old history would take as long as the chain has been running.

    Now: The table uses Meni Rosenfeld's 2012 figures for a 10% attacker, about 0.06% (1 in 1,700) after six confirmations, and says a 30% attacker still has about a 16% chance after six. One difficulty adjustment is capped at a factor of four either way, the chain is about 775 GB as of October 2026, and redoing all of its work would keep every mining machine busy for a little over three years at October 2026 hash rates. Details

  • Was: The chapter said the deepest accidental reorg in Bitcoin's history was 4 blocks, in 2010.

    Now: The deep reorgs came from software bugs. The chain was rolled back 53 blocks in August 2010 to undo the inflation bug, and 25 blocks in March 2013, when two versions of the software disagreed about a valid block. Details

Sources

Published . Revised . Fact-checked . Three corrections logged for this page.

Edit this page on GitHub