> For the complete documentation index, see [llms.txt](https://docs.leather.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.leather.io/learn/bitcoin-transactions.md).

# How Do Bitcoin Transactions Work?

A Bitcoin transaction spends earlier outputs and creates new ones. Its parts, its path from wallet to block, and common problems.

A Bitcoin transaction moves bitcoin by spending outputs of earlier transactions and creating new outputs. Your wallet signs it with your private key, and miners add it to a block.

## The parts of a transaction

Say Alice sends Bob 1 BTC.

* **Inputs:** the earlier outputs Alice spends, called UTXOs (unspent transaction outputs). Each input proves with a signature that Alice may spend it. See [What are UTXOs?](/learn/utxos.md).
* **Outputs:** the new amounts and who can spend them. One output pays Bob 1 BTC. Another usually returns the change to Alice.
* **Fee:** whatever the inputs hold beyond the outputs. It goes to the miner. So Alice spends a little more than 1 BTC.
* **TXID:** the transaction's unique identifier. See [What is a Transaction ID (TXID)?](/learn/txid.md).

![Transaction with two inputs, a payment, change and a fee](https://4209755586-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaSQhveafXrLjROsW3JZ1%2Fuploads%2FqE9mpXJnpKlvKYqmWUGz%2Fd-support-bitcoin-transactions-01-tx-inputs-outputs-fee.png?alt=media\&token=eb0201f2-98ab-4be1-9916-54bdfa3327fa)

## From wallet to block

1. **Create and sign:** Alice's wallet picks the inputs, sets the outputs and fee, and signs.
2. **Broadcast:** the wallet sends the transaction to the network. Nodes check it and relay it.
3. **Wait in the mempool:** the transaction waits with other unconfirmed transactions. See [What is a Mempool?](/learn/mempool.md).
4. **Confirm:** a miner includes it in a block. Each later block adds a confirmation. Many services treat six confirmations as final for large payments.

![Path of a transaction from the wallet through the mempool to a block](https://4209755586-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaSQhveafXrLjROsW3JZ1%2Fuploads%2FgLPTPqb2MrRNRnqo0Ke3%2Fd-support-bitcoin-transactions-02-tx-wallet-to-block.png?alt=media\&token=c8a9e641-148b-4d9c-9d06-ec207cf6d142)

## Common problems

* **Stuck transaction:** the fee rate is too low for current demand. The sender can raise it. See [What is Replace-By-Fee (RBF)?](/learn/replace-by-fee-rbf.md).
* **Wrong address:** bitcoin sent to a wrong but valid address cannot be recovered.
* **Overpaying:** a fee set far above the current rate is not refunded.

## Track a transaction

Look up the TXID in a block explorer. In Leather, click the transaction in the "Activity" tab. See [What is a Blockchain Explorer?](/learn/what-is-a-blockchain-explorer.md).
