Payment Processing #
Payment processing encompasses the steps spenders and receivers perform to make and accept payments in exchange for products or services. The basic steps have not changed since the dawn of commerce, but the technology has.
Introduction #
This section will explain how receivers and spenders can, respectively, request and make payments using Bitcoin—and how they can deal with complications such as refunds and recurrent rebilling.
Bitcoin Payment Processing
The figure above illustrates payment processing using Bitcoin from a receiver’s perspective, starting with a new order. The following subsections will each Address A 20-byte hash formatted using base58check to produce either a P2PKH or P2SH Bitcoin address. Currently the most common way users exchange payment information. Not to be confused with: IP address
It is worth mentioning that each of these steps can be outsourced by using third party APIs and services.
Pricing Orders #
Because of exchange rate variability between Satoshis Denominations of Bitcoin value, usually measured in fractions of a bitcoin but sometimes measured in multiples of a satoshi. One bitcoin equals 100,000,000 satoshis. Not to be confused with: Binary bits, a unit of data with two possible values
National currencies such as the dollar or euro.
National currencies such as the dollar or euro.
Denominations of Bitcoin value, usually measured in fractions of a bitcoin but sometimes measured in multiples of a satoshi. One bitcoin equals 100,000,000 satoshis.
Not to be confused with: Binary bits, a unit of data with two possible values
Exchange rate data is widely available through HTTP-based APIs provided by currency exchanges. Several organizations also aggregate data from multiple exchanges to create index prices, which are also available using HTTP-based APIs.
Any applications which automatically calculate order totals using exchange rate data must take steps to ensure the price quoted reflects the current general market value of Satoshis Denominations of Bitcoin value, usually measured in fractions of a bitcoin but sometimes measured in multiples of a satoshi. One bitcoin equals 100,000,000 satoshis. Not to be confused with: Binary bits, a unit of data with two possible values
Denominations of Bitcoin value, usually measured in fractions of a bitcoin but sometimes measured in multiples of a satoshi. One bitcoin equals 100,000,000 satoshis.
Not to be confused with: Binary bits, a unit of data with two possible values
Denominations of Bitcoin value, usually measured in fractions of a bitcoin but sometimes measured in multiples of a satoshi. One bitcoin equals 100,000,000 satoshis.
Not to be confused with: Binary bits, a unit of data with two possible values
To minimize problems, your applications may want to collect data from at least two separate sources and compare them to see how much they differ. If the difference is substantial, your applications can enter a safe mode until a human is able to evaluate the situation.
You may also want to program your applications to enter a safe mode if exchange rates are rapidly increasing or decreasing, indicating a possible problem in the Bitcoin market which could make it difficult to spend any Satoshis Denominations of Bitcoin value, usually measured in fractions of a bitcoin but sometimes measured in multiples of a satoshi. One bitcoin equals 100,000,000 satoshis. Not to be confused with: Binary bits, a unit of data with two possible values
Exchange rates lie outside the control of Bitcoin and related technologies, so there are no new or planned technologies which will make it significantly easier for your program to correctly convert order totals from Fiat National currencies such as the dollar or euro.
Denominations of Bitcoin value, usually measured in fractions of a bitcoin but sometimes measured in multiples of a satoshi. One bitcoin equals 100,000,000 satoshis.
Not to be confused with: Binary bits, a unit of data with two possible values
Because the exchange rate fluctuates over time, order totals pegged to Fiat National currencies such as the dollar or euro.
Denominations of Bitcoin value, usually measured in fractions of a bitcoin but sometimes measured in multiples of a satoshi. One bitcoin equals 100,000,000 satoshis.
Not to be confused with: Binary bits, a unit of data with two possible values
Shorter expiration periods increase the chance the invoice will expire before payment is received, possibly necessitating manual intervention to request an additional payment or to issue a refund. Longer expiration periods increase the chance that the exchange rate will fluctuate a significant amount before payment is received.
Requesting Payments #
Before requesting payment, your application must create a Bitcoin Address A 20-byte hash formatted using base58check to produce either a P2PKH or P2SH Bitcoin address. Currently the most common way users exchange payment information. Not to be confused with: IP address
A 20-byte hash formatted using base58check to produce either a P2PKH or P2SH Bitcoin address. Currently the most common way users exchange payment information.
Not to be confused with: IP address
A 20-byte hash formatted using base58check to produce either a P2PKH or P2SH Bitcoin address. Currently the most common way users exchange payment information.
Not to be confused with: IP address
Using a separate Address A 20-byte hash formatted using base58check to produce either a P2PKH or P2SH Bitcoin address. Currently the most common way users exchange payment information. Not to be confused with: IP address
The deprecated protocol defined in BIP70 (and other BIPs) which lets spenders get signed payment details from receivers.
Not to be confused with: IP-to-IP payment protocol (an insecure, discontinued protocol included in early versions of Bitcoin)
A 20-byte hash formatted using base58check to produce either a P2PKH or P2SH Bitcoin address. Currently the most common way users exchange payment information.
Not to be confused with: IP address
One or more transactions prefaced by a block header and protected by proof of work. Blocks are the data stored on the block chain.
A 20-byte hash formatted using base58check to produce either a P2PKH or P2SH Bitcoin address. Currently the most common way users exchange payment information.
Not to be confused with: IP address
The next subsections will describe in detail the following four compatible ways to give the spender the Address A 20-byte hash formatted using base58check to produce either a P2PKH or P2SH Bitcoin address. Currently the most common way users exchange payment information. Not to be confused with: IP address
-
All Wallet
software lets its users paste in or manually enter an AddressSoftware that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive satoshis.
Not to be confused with: HD wallet (a protocol that allows all of a wallet’s keys to be created from a single seed)
and amount into a payment screen. This is, of course, inconvenient—but it makes an effective fallback option.A 20-byte hash formatted using base58check to produce either a P2PKH or P2SH Bitcoin address. Currently the most common way users exchange payment information.
Not to be confused with: IP address
-
Almost all desktop wallets can associate with “bitcoin:” URIs, so spenders can click a link to pre-fill the payment screen. This also works with many mobile wallets, but it generally does not work with web-based wallets unless the spender installs a browser extension or manually configures a URI handler.
-
Most mobile wallets support scanning “bitcoin:” URIs encoded in a QR code, and almost all wallets can display them for accepting payment. While also handy for online orders, QR Codes are especially useful for in-person purchases.
-
Recent Wallet
updates add support for the new Payment protocolSoftware that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive satoshis.
Not to be confused with: HD wallet (a protocol that allows all of a wallet’s keys to be created from a single seed)
providing increased security, authentication of a receiver’s identity using X.509 certificates, and other important features such as refunds.The deprecated protocol defined in BIP70 (and other BIPs) which lets spenders get signed payment details from receivers.
Not to be confused with: IP-to-IP payment protocol (an insecure, discontinued protocol included in early versions of Bitcoin)
A 20-byte hash formatted using base58check to produce either a P2PKH or P2SH Bitcoin address. Currently the most common way users exchange payment information. Not to be confused with: IP address Warning: Special care must be taken to avoid the theft of incoming payments. In particular, private keys should not be stored on web servers, and payment requests should be sent over HTTPS or other secure methods to prevent man-in-the-middle attacks from replacing your Bitcoin Address
A 20-byte hash formatted using base58check to produce either a P2PKH or P2SH Bitcoin address. Currently the most common way users exchange payment information.
Not to be confused with: IP address
Plain Text #
To specify an amount directly for copying and pasting, you must provide the Address A 20-byte hash formatted using base58check to produce either a P2PKH or P2SH Bitcoin address. Currently the most common way users exchange payment information. Not to be confused with: IP address
Denominations of Bitcoin value, usually measured in fractions of a bitcoin but sometimes measured in multiples of a satoshi. One bitcoin equals 100,000,000 satoshis.
Not to be confused with: Binary bits, a unit of data with two possible values
(Note: all examples in this section use Testnet A global testing environment in which developers can obtain and spend satoshis that have no real-world value on a network that is very similar to the Bitcoin mainnet. Not to be confused with: Regtest (a local testing environment where developers can control block generation)
Pay: mjSk1Ny9spzU2fouzYgLqGUD8U41iR35QN
Amount: 100 BTC
You must pay by: 2014-04-01 at 23:00 UTC
Indicating the Denomination Denominations of Bitcoin value, usually measured in fractions of a bitcoin but sometimes measured in multiples of a satoshi. One bitcoin equals 100,000,000 satoshis. Not to be confused with: Binary bits, a unit of data with two possible values
Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive satoshis.
Not to be confused with: HD wallet (a protocol that allows all of a wallet’s keys to be created from a single seed)
Denominations of Bitcoin value, usually measured in fractions of a bitcoin but sometimes measured in multiples of a satoshi. One bitcoin equals 100,000,000 satoshis.
Not to be confused with: Binary bits, a unit of data with two possible values
Denominations of Bitcoin value, usually measured in fractions of a bitcoin but sometimes measured in multiples of a satoshi. One bitcoin equals 100,000,000 satoshis.
Not to be confused with: Binary bits, a unit of data with two possible values
Bitcoins Denominations of Bitcoin value, usually measured in fractions of a bitcoin but sometimes measured in multiples of a satoshi. One bitcoin equals 100,000,000 satoshis. Not to be confused with: Binary bits, a unit of data with two possible values |
Unit (Abbreviation) |
---|---|
1.0 |
bitcoin (BTC) |
0.01 |
bitcent (cBTC) |
0.001 |
millibitcoin (mBTC) |
0.000001 |
microbitcoin (uBTC, “bits”) |
0.0000001 |
finney |
0.00000001 |
satoshi |
bitcoin: URI #
The “bitcoin:” URI scheme defined in BIP21 eliminates Denomination Denominations of Bitcoin value, usually measured in fractions of a bitcoin but sometimes measured in multiples of a satoshi. One bitcoin equals 100,000,000 satoshis. Not to be confused with: Binary bits, a unit of data with two possible values
The deprecated protocol defined in BIP70 (and other BIPs) which lets spenders get signed payment details from receivers.
Not to be confused with: IP-to-IP payment protocol (an insecure, discontinued protocol included in early versions of Bitcoin)
bitcoin:mjSk1Ny9spzU2fouzYgLqGUD8U41iR35QN?amount=100
Only the Address A 20-byte hash formatted using base58check to produce either a P2PKH or P2SH Bitcoin address. Currently the most common way users exchange payment information. Not to be confused with: IP address
The deprecated protocol defined in BIP70 (and other BIPs) which lets spenders get signed payment details from receivers.
Not to be confused with: IP-to-IP payment protocol (an insecure, discontinued protocol included in early versions of Bitcoin)
Denominations of Bitcoin value, usually measured in fractions of a bitcoin but sometimes measured in multiples of a satoshi. One bitcoin equals 100,000,000 satoshis.
Not to be confused with: Binary bits, a unit of data with two possible values
Two other parameters are widely supported. The “Label The label parameter of a bitcoin: URI which provides the spender with the receiver’s name (unauthenticated).
Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive satoshis.
Not to be confused with: HD wallet (a protocol that allows all of a wallet’s keys to be created from a single seed)
A parameter of bitcoin: URIs which allows the receiver to optionally specify a message to the spender.
The deprecated protocol defined in BIP70 (and other BIPs) which lets spenders get signed payment details from receivers.
Not to be confused with: IP-to-IP payment protocol (an insecure, discontinued protocol included in early versions of Bitcoin)
The label parameter of a bitcoin: URI which provides the spender with the receiver’s name (unauthenticated).
A parameter of bitcoin: URIs which allows the receiver to optionally specify a message to the spender.
Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive satoshis.
Not to be confused with: HD wallet (a protocol that allows all of a wallet’s keys to be created from a single seed)
The label parameter of a bitcoin: URI which provides the spender with the receiver’s name (unauthenticated).
A parameter of bitcoin: URIs which allows the receiver to optionally specify a message to the spender.
All four parameters used together, with appropriate URI encoding, can be seen in the line-wrapped example below.
bitcoin:mjSk1Ny9spzU2fouzYgLqGUD8U41iR35QN
?amount=0.10
&LabelThe label parameter of a bitcoin: URI which provides the spender with the receiver’s name (unauthenticated).
=Example+Merchant
&MessageA parameter of bitcoin: URIs which allows the receiver to optionally specify a message to the spender.
=Order+of+flowers+%26+chocolates
The URI scheme can be extended, as will be seen in the Payment protocol The deprecated protocol defined in BIP70 (and other BIPs) which lets spenders get signed payment details from receivers. Not to be confused with: IP-to-IP payment protocol (an insecure, discontinued protocol included in early versions of Bitcoin)
The deprecated protocol defined in BIP70 (and other BIPs) which lets spenders get signed payment details from receivers.
Not to be confused with: IP-to-IP payment protocol (an insecure, discontinued protocol included in early versions of Bitcoin)
Programs accepting URIs in any form must ask the user for permission before paying unless the user has explicitly disabled prompting (as might be the case for micropayments).
QR Codes #
QR codes are a popular way to exchange “bitcoin:” URIs in person, in images, or in videos. Most mobile Bitcoin Wallet Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive satoshis. Not to be confused with: HD wallet (a protocol that allows all of a wallet’s keys to be created from a single seed)
The figure below shows the same “bitcoin:” URI code encoded as four different Bitcoin QR codes at four different error correction levels. The QR code can include the “Label The label parameter of a bitcoin: URI which provides the spender with the receiver’s name (unauthenticated).
A parameter of bitcoin: URIs which allows the receiver to optionally specify a message to the spender.
Bitcoin QR Codes
The error correction is combined with a checksum to ensure the Bitcoin QR code cannot be successfully decoded with data missing or accidentally altered, so your applications should choose the appropriate level of error correction based on the space you have available to display the code. Low-level damage correction works well when space is limited, and quartile-level damage correction helps ensure fast scanning when displayed on high-resolution screens.
Payment protocolThe deprecated protocol defined in BIP70 (and other BIPs) which lets spenders get signed payment details from receivers.
Not to be confused with: IP-to-IP payment protocol (an insecure, discontinued protocol included in early versions of Bitcoin)
#
The deprecated protocol defined in BIP70 (and other BIPs) which lets spenders get signed payment details from receivers.
Not to be confused with: IP-to-IP payment protocol (an insecure, discontinued protocol included in early versions of Bitcoin)
The deprecated protocol defined in BIP70 (and other BIPs) which lets spenders get signed payment details from receivers. Not to be confused with: IP-to-IP payment protocol (an insecure, discontinued protocol included in early versions of Bitcoin) Warning: The Payment protocol
Bitcoin Core 0.9 supports the new Payment protocol The deprecated protocol defined in BIP70 (and other BIPs) which lets spenders get signed payment details from receivers. Not to be confused with: IP-to-IP payment protocol (an insecure, discontinued protocol included in early versions of Bitcoin)
The deprecated protocol defined in BIP70 (and other BIPs) which lets spenders get signed payment details from receivers.
Not to be confused with: IP-to-IP payment protocol (an insecure, discontinued protocol included in early versions of Bitcoin)
-
Supports X.509 certificates and SSL encryption to verify receivers’ identity and help prevent man-in-the-middle attacks.
-
Provides more detail about the requested payment to spenders.
-
Allows spenders to submit transactions directly to receivers without going through the Peer
-to-PeerA computer that connects to the Bitcoin network.
Not to be confused with: Lightweight node, SPV node
network. This can speed up payment processing and work with planned features such as child-pays-for-parent transaction fees and offline NFC or Bluetooth-based payments.A computer that connects to the Bitcoin network.
Not to be confused with: Lightweight node, SPV node
Instead of being asked to pay a meaningless Address A 20-byte hash formatted using base58check to produce either a P2PKH or P2SH Bitcoin address. Currently the most common way users exchange payment information. Not to be confused with: IP address
To request payment using the Payment protocol The deprecated protocol defined in BIP70 (and other BIPs) which lets spenders get signed payment details from receivers. Not to be confused with: IP-to-IP payment protocol (an insecure, discontinued protocol included in early versions of Bitcoin)
bitcoin:mjSk1Ny9spzU2fouzYgLqGUD8U41iR35QN
?amount=0.10
&LabelThe label parameter of a bitcoin: URI which provides the spender with the receiver’s name (unauthenticated).
=Example+Merchant
&MessageA parameter of bitcoin: URIs which allows the receiver to optionally specify a message to the spender.
=Order+of+flowers+%26+chocolates
&r=https://example.com/pay/mjSk1Ny9spzU2fouzYgLqGUD8U41iR35QN
None of the parameters provided above, except “r”, are required for the Payment protocol The deprecated protocol defined in BIP70 (and other BIPs) which lets spenders get signed payment details from receivers. Not to be confused with: IP-to-IP payment protocol (an insecure, discontinued protocol included in early versions of Bitcoin)
Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive satoshis.
Not to be confused with: HD wallet (a protocol that allows all of a wallet’s keys to be created from a single seed)
The deprecated protocol defined in BIP70 (and other BIPs) which lets spenders get signed payment details from receivers.
Not to be confused with: IP-to-IP payment protocol (an insecure, discontinued protocol included in early versions of Bitcoin)
The “r” parameter tells payment-protocol-aware Wallet Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive satoshis. Not to be confused with: HD wallet (a protocol that allows all of a wallet’s keys to be created from a single seed)
Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive satoshis.
Not to be confused with: HD wallet (a protocol that allows all of a wallet’s keys to be created from a single seed)
BIP70 Payment protocol The deprecated protocol defined in BIP70 (and other BIPs) which lets spenders get signed payment details from receivers. Not to be confused with: IP-to-IP payment protocol (an insecure, discontinued protocol included in early versions of Bitcoin)
The Payment protocol The deprecated protocol defined in BIP70 (and other BIPs) which lets spenders get signed payment details from receivers. Not to be confused with: IP-to-IP payment protocol (an insecure, discontinued protocol included in early versions of Bitcoin)
The deprecated protocol defined in BIP70 (and other BIPs) which lets spenders get signed payment details from receivers.
Not to be confused with: IP-to-IP payment protocol (an insecure, discontinued protocol included in early versions of Bitcoin)
The deprecated protocol defined in BIP70 (and other BIPs) which lets spenders get signed payment details from receivers.
Not to be confused with: IP-to-IP payment protocol (an insecure, discontinued protocol included in early versions of Bitcoin)
The deprecated protocol defined in BIP70 (and other BIPs) which lets spenders get signed payment details from receivers.
Not to be confused with: IP-to-IP payment protocol (an insecure, discontinued protocol included in early versions of Bitcoin)
Charlie, the client, is shopping on a website run by Bob, the businessman. Charlie adds a few items to his shopping cart and clicks the “Checkout With Bitcoin” button.
Bob’s server automatically adds the following information to its invoice database:
-
The details of Charlie’s order, including items ordered and shipping Address
.A 20-byte hash formatted using base58check to produce either a P2PKH or P2SH Bitcoin address. Currently the most common way users exchange payment information.
Not to be confused with: IP address
-
An order total in Satoshis
, perhaps created by converting prices in FiatDenominations of Bitcoin value, usually measured in fractions of a bitcoin but sometimes measured in multiples of a satoshi. One bitcoin equals 100,000,000 satoshis.
Not to be confused with: Binary bits, a unit of data with two possible values
to prices in SatoshisNational currencies such as the dollar or euro.
.Denominations of Bitcoin value, usually measured in fractions of a bitcoin but sometimes measured in multiples of a satoshi. One bitcoin equals 100,000,000 satoshis.
Not to be confused with: Binary bits, a unit of data with two possible values
-
An expiration time when that total will no longer be acceptable.
-
A Pubkey script
to which Charlie should send payment. Typically this will be a P2PKH or P2SH Pubkey scriptA script included in outputs which sets the conditions that must be fulfilled for those satoshis to be spent. Data for fulfilling the conditions can be provided in a signature script. Pubkey Scripts are called a scriptPubKey in code.
Not to be confused with: Pubkey (a public key, which can be used as part of a pubkey script but don’t provide a programmable authentication mechanism), Signature script (a script that provides data to the pubkey script)
containing a unique (never before used) secp256k1 Public keyA script included in outputs which sets the conditions that must be fulfilled for those satoshis to be spent. Data for fulfilling the conditions can be provided in a signature script. Pubkey Scripts are called a scriptPubKey in code.
Not to be confused with: Pubkey (a public key, which can be used as part of a pubkey script but don’t provide a programmable authentication mechanism), Signature script (a script that provides data to the pubkey script)
.The public portion of a keypair which can be used to verify signatures made with the private portion of the keypair.
Not to be confused with: Private key (data from which the public key is derived), Parent key (a key used to create child keys, not necessarily a public key)
After adding all that information to the database, Bob’s server displays a “bitcoin:” URI for Charlie to click to pay.
Charlie clicks on the “bitcoin:” URI in his browser. His browser’s URI handler sends the URI to his Wallet Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive satoshis. Not to be confused with: HD wallet (a protocol that allows all of a wallet’s keys to be created from a single seed)
Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive satoshis.
Not to be confused with: HD wallet (a protocol that allows all of a wallet’s keys to be created from a single seed)
The deprecated protocol defined in BIP70 (and other BIPs) which lets spenders get signed payment details from receivers.
Not to be confused with: IP-to-IP payment protocol (an insecure, discontinued protocol included in early versions of Bitcoin)
A parameter of bitcoin: URIs which allows the receiver to optionally specify a message to the spender.
The PaymentRequest Message A parameter of bitcoin: URIs which allows the receiver to optionally specify a message to the spender.
A 20-byte hash formatted using base58check to produce either a P2PKH or P2SH Bitcoin address. Currently the most common way users exchange payment information.
Not to be confused with: IP address
Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive satoshis.
Not to be confused with: HD wallet (a protocol that allows all of a wallet’s keys to be created from a single seed)
The public portion of a keypair which can be used to verify signatures made with the private portion of the keypair.
Not to be confused with: Private key (data from which the public key is derived), Parent key (a key used to create child keys, not necessarily a public key)
The deprecated protocol defined in BIP70 (and other BIPs) which lets spenders get signed payment details from receivers.
Not to be confused with: IP-to-IP payment protocol (an insecure, discontinued protocol included in early versions of Bitcoin)
A 20-byte hash formatted using base58check to produce either a P2PKH or P2SH Bitcoin address. Currently the most common way users exchange payment information.
Not to be confused with: IP address
https://example.com/pay/mjSk1Ny9spzU2fouzYgLqGUD8U41iR35QN
After receiving the HTTP GET to the URL above, the PaymentRequest-generating CGI program on Bob’s webserver takes the unique identifier from the URL and looks up the corresponding details in the database. It then creates a PaymentDetails Message A parameter of bitcoin: URIs which allows the receiver to optionally specify a message to the spender.
-
The amount of the order in Satoshis
and the Pubkey scriptDenominations of Bitcoin value, usually measured in fractions of a bitcoin but sometimes measured in multiples of a satoshi. One bitcoin equals 100,000,000 satoshis.
Not to be confused with: Binary bits, a unit of data with two possible values
to be paid.A script included in outputs which sets the conditions that must be fulfilled for those satoshis to be spent. Data for fulfilling the conditions can be provided in a signature script. Pubkey Scripts are called a scriptPubKey in code.
Not to be confused with: Pubkey (a public key, which can be used as part of a pubkey script but don’t provide a programmable authentication mechanism), Signature script (a script that provides data to the pubkey script)
-
A memo containing the list of items ordered, so Charlie knows what he’s paying for. It may also include Charlie’s mailing Address
so he can double-check it.A 20-byte hash formatted using base58check to produce either a P2PKH or P2SH Bitcoin address. Currently the most common way users exchange payment information.
Not to be confused with: IP address
-
The time the PaymentDetails Message
was created plus the time it expires.A parameter of bitcoin: URIs which allows the receiver to optionally specify a message to the spender.
-
A URL to which Charlie’s Wallet
should send its completed transaction.Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive satoshis.
Not to be confused with: HD wallet (a protocol that allows all of a wallet’s keys to be created from a single seed)
That PaymentDetails Message A parameter of bitcoin: URIs which allows the receiver to optionally specify a message to the spender.
A parameter of bitcoin: URIs which allows the receiver to optionally specify a message to the spender.
The deprecated protocol defined in BIP70 (and other BIPs) which lets spenders get signed payment details from receivers.
Not to be confused with: IP-to-IP payment protocol (an insecure, discontinued protocol included in early versions of Bitcoin)
The deprecated protocol defined in BIP70 (and other BIPs) which lets spenders get signed payment details from receivers.
Not to be confused with: IP-to-IP payment protocol (an insecure, discontinued protocol included in early versions of Bitcoin)
The deprecated protocol defined in BIP70 (and other BIPs) which lets spenders get signed payment details from receivers.
Not to be confused with: IP-to-IP payment protocol (an insecure, discontinued protocol included in early versions of Bitcoin)
Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive satoshis.
Not to be confused with: HD wallet (a protocol that allows all of a wallet’s keys to be created from a single seed)

Bitcoin Core Showing Validated Payment request The deprecated protocol defined in BIP70 (and other BIPs) which lets spenders get signed payment details from receivers. Not to be confused with: IP-to-IP payment protocol (an insecure, discontinued protocol included in early versions of Bitcoin)
Charlie’s Wallet Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive satoshis. Not to be confused with: HD wallet (a protocol that allows all of a wallet’s keys to be created from a single seed)
A parameter of bitcoin: URIs which allows the receiver to optionally specify a message to the spender.
A value related to a public key which could only have reasonably been created by someone who has the private key that created that public key. Used in Bitcoin to authorize spending satoshis previously sent to a public key.
A parameter of bitcoin: URIs which allows the receiver to optionally specify a message to the spender.
Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive satoshis.
Not to be confused with: HD wallet (a protocol that allows all of a wallet’s keys to be created from a single seed)
A script included in outputs which sets the conditions that must be fulfilled for those satoshis to be spent. Data for fulfilling the conditions can be provided in a signature script. Pubkey Scripts are called a scriptPubKey in code.
Not to be confused with: Pubkey (a public key, which can be used as part of a pubkey script but don’t provide a programmable authentication mechanism), Signature script (a script that provides data to the pubkey script)
Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive satoshis.
Not to be confused with: HD wallet (a protocol that allows all of a wallet’s keys to be created from a single seed)
Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive satoshis.
Not to be confused with: HD wallet (a protocol that allows all of a wallet’s keys to be created from a single seed)
A parameter of bitcoin: URIs which allows the receiver to optionally specify a message to the spender.
A parameter of bitcoin: URIs which allows the receiver to optionally specify a message to the spender.
A parameter of bitcoin: URIs which allows the receiver to optionally specify a message to the spender.
-
The signed transaction in which Charlie pays Bob.
-
An optional memo Charlie can send to Bob. (There’s no guarantee that Bob will read it.)
-
A refund Address
(Pubkey scriptA 20-byte hash formatted using base58check to produce either a P2PKH or P2SH Bitcoin address. Currently the most common way users exchange payment information.
Not to be confused with: IP address
) which Bob can pay if he needs to return some or all of Charlie’s SatoshisA script included in outputs which sets the conditions that must be fulfilled for those satoshis to be spent. Data for fulfilling the conditions can be provided in a signature script. Pubkey Scripts are called a scriptPubKey in code.
Not to be confused with: Pubkey (a public key, which can be used as part of a pubkey script but don’t provide a programmable authentication mechanism), Signature script (a script that provides data to the pubkey script)
.Denominations of Bitcoin value, usually measured in fractions of a bitcoin but sometimes measured in multiples of a satoshi. One bitcoin equals 100,000,000 satoshis.
Not to be confused with: Binary bits, a unit of data with two possible values
Bob’s server receives the Payment Message A parameter of bitcoin: URIs which allows the receiver to optionally specify a message to the spender.
A 20-byte hash formatted using base58check to produce either a P2PKH or P2SH Bitcoin address. Currently the most common way users exchange payment information.
Not to be confused with: IP address
A parameter of bitcoin: URIs which allows the receiver to optionally specify a message to the spender.
A parameter of bitcoin: URIs which allows the receiver to optionally specify a message to the spender.
Charlie’s Wallet Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive satoshis. Not to be confused with: HD wallet (a protocol that allows all of a wallet’s keys to be created from a single seed)
One or more transactions prefaced by a block header and protected by proof of work. Blocks are the data stored on the block chain.
In the case of a dispute, Charlie can generate a cryptographically proven Receipt A cryptographically-verifiable receipt created using parts of a payment request and a confirmed transaction.
-
The PaymentDetails Message
signed by Bob’s webserver proves Charlie received an invoice to pay a specified Pubkey scriptA parameter of bitcoin: URIs which allows the receiver to optionally specify a message to the spender.
for a specified number of SatoshisA script included in outputs which sets the conditions that must be fulfilled for those satoshis to be spent. Data for fulfilling the conditions can be provided in a signature script. Pubkey Scripts are called a scriptPubKey in code.
Not to be confused with: Pubkey (a public key, which can be used as part of a pubkey script but don’t provide a programmable authentication mechanism), Signature script (a script that provides data to the pubkey script)
for goods specified in the memo field.Denominations of Bitcoin value, usually measured in fractions of a bitcoin but sometimes measured in multiples of a satoshi. One bitcoin equals 100,000,000 satoshis.
Not to be confused with: Binary bits, a unit of data with two possible values
-
The Bitcoin Block
chain can prove that the Pubkey scriptOne or more transactions prefaced by a block header and protected by proof of work. Blocks are the data stored on the block chain.
specified by Bob was paid the specified number of SatoshisA script included in outputs which sets the conditions that must be fulfilled for those satoshis to be spent. Data for fulfilling the conditions can be provided in a signature script. Pubkey Scripts are called a scriptPubKey in code.
Not to be confused with: Pubkey (a public key, which can be used as part of a pubkey script but don’t provide a programmable authentication mechanism), Signature script (a script that provides data to the pubkey script)
.Denominations of Bitcoin value, usually measured in fractions of a bitcoin but sometimes measured in multiples of a satoshi. One bitcoin equals 100,000,000 satoshis.
Not to be confused with: Binary bits, a unit of data with two possible values
If a refund needs to be issued, Bob’s server can safely pay the refund-to Pubkey script A script included in outputs which sets the conditions that must be fulfilled for those satoshis to be spent. Data for fulfilling the conditions can be provided in a signature script. Pubkey Scripts are called a scriptPubKey in code. Not to be confused with: Pubkey (a public key, which can be used as part of a pubkey script but don’t provide a programmable authentication mechanism), Signature script (a script that provides data to the pubkey script)
Verifying Payment #
As explained in the Transactions and Block One or more transactions prefaced by a block header and protected by proof of work. Blocks are the data stored on the block chain.
An input in a transaction which contains three fields: an outpoint, a signature script, and a sequence number. The outpoint references a previous output and the signature script allows spending it.
One or more transactions prefaced by a block header and protected by proof of work. Blocks are the data stored on the block chain.
Two or more transactions spending the same Input An input in a transaction which contains three fields: an outpoint, a signature script, and a sequence number. The outpoint references a previous output and the signature script allows spending it.
A transaction that uses the same input as an already broadcast transaction. The attempt of duplication, deceit, or conversion, will be adjudicated when only one of the transactions is recorded in the blockchain.
Once the transaction is included in a Block One or more transactions prefaced by a block header and protected by proof of work. Blocks are the data stored on the block chain.
One or more transactions prefaced by a block header and protected by proof of work. Blocks are the data stored on the block chain.
One or more transactions prefaced by a block header and protected by proof of work. Blocks are the data stored on the block chain.
0 Confirmations A score indicating the number of blocks on the best block chain that would need to be modified to remove or modify a particular transaction. A confirmed transaction has a confirmation score of one or higher.
One or more transactions prefaced by a block header and protected by proof of work. Blocks are the data stored on the block chain.
1 confirmation: The transaction is included in the latest Block One or more transactions prefaced by a block header and protected by proof of work. Blocks are the data stored on the block chain.
One or more transactions prefaced by a block header and protected by proof of work. Blocks are the data stored on the block chain.
A transaction that uses the same input as an already broadcast transaction. The attempt of duplication, deceit, or conversion, will be adjudicated when only one of the transactions is recorded in the blockchain.
2 Confirmations A score indicating the number of blocks on the best block chain that would need to be modified to remove or modify a particular transaction. A confirmed transaction has a confirmation score of one or higher.
One or more transactions prefaced by a block header and protected by proof of work. Blocks are the data stored on the block chain.
One or more transactions prefaced by a block header and protected by proof of work. Blocks are the data stored on the block chain.
One or more transactions prefaced by a block header and protected by proof of work. Blocks are the data stored on the block chain.
One or more transactions prefaced by a block header and protected by proof of work. Blocks are the data stored on the block chain.
Mining is the act of creating valid Bitcoin blocks, which requires demonstrating proof of work, and miners are devices that mine or people who own those devices.
6 Confirmations A score indicating the number of blocks on the best block chain that would need to be modified to remove or modify a particular transaction. A confirmed transaction has a confirmation score of one or higher.
A score indicating the number of blocks on the best block chain that would need to be modified to remove or modify a particular transaction. A confirmed transaction has a confirmation score of one or higher.
Bitcoin Core provides several RPCs which can provide your program with the Confirmation score A score indicating the number of blocks on the best block chain that would need to be modified to remove or modify a particular transaction. A confirmed transaction has a confirmation score of one or higher.
Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive satoshis.
Not to be confused with: HD wallet (a protocol that allows all of a wallet’s keys to be created from a single seed)
A score indicating the number of blocks on the best block chain that would need to be modified to remove or modify a particular transaction. A confirmed transaction has a confirmation score of one or higher.
Although Confirmations A score indicating the number of blocks on the best block chain that would need to be modified to remove or modify a particular transaction. A confirmed transaction has a confirmation score of one or higher.
-
In the case when the program or its user cannot wait for a confirmation and wants to accept unconfirmed payments.
-
In the case when the program or its user is accepting high value transactions and cannot wait for at least six Confirmations
or more.A score indicating the number of blocks on the best block chain that would need to be modified to remove or modify a particular transaction. A confirmed transaction has a confirmation score of one or higher.
-
In the case of an implementation bug or prolonged attack against Bitcoin which makes the system less reliable than expected.
An interesting source of double-spend risk analysis can be acquired by connecting to large numbers of Bitcoin peers to track how transactions and blocks differ from each other. Some third-party APIs can provide you with this type of service.
For example, unconfirmed transactions can be compared among all connected peers to see if any UTXO An Unspent Transaction Output (UTXO) that can be spent as an input in a new transaction. Not to be confused with: Output (any output, whether spent or not. Outputs are a superset of UTXOs)
The amount remaining when the value of all outputs in a transaction are subtracted from all inputs in a transaction; the fee is paid to the miner who includes that transaction in a block.
Not to be confused with: Minimum relay fee (the lowest fee a transaction must pay to be accepted into the memory pool and relayed by Bitcoin Core nodes)
One or more transactions prefaced by a block header and protected by proof of work. Blocks are the data stored on the block chain.
Another example could be to detect a Fork When two or more blocks have the same block height, forking the block chain. Typically occurs when two or more miners find blocks at nearly the same time. Can also happen as part of an attack. Not to be confused with: Hard fork (a change in consensus rules that breaks security for nodes that don’t upgrade), Soft fork (a change in consensus rules that weakens security for nodes that don’t upgrade), Software fork (when one or more developers permanently develops a codebase separately from other developers), Git fork (when one or more developers temporarily develops a codebase separately from other developers)
One or more transactions prefaced by a block header and protected by proof of work. Blocks are the data stored on the block chain.
An 80-byte header belonging to a single block which is hashed repeatedly to create proof of work.
One or more transactions prefaced by a block header and protected by proof of work. Blocks are the data stored on the block chain.
The number of blocks preceding a particular block on a block chain. For example, the genesis block has a height of zero because zero block preceded it.
When two or more blocks have the same block height, forking the block chain. Typically occurs when two or more miners find blocks at nearly the same time. Can also happen as part of an attack.
Not to be confused with: Hard fork (a change in consensus rules that breaks security for nodes that don’t upgrade), Soft fork (a change in consensus rules that weakens security for nodes that don’t upgrade), Software fork (when one or more developers permanently develops a codebase separately from other developers), Git fork (when one or more developers temporarily develops a codebase separately from other developers)
One or more transactions prefaced by a block header and protected by proof of work. Blocks are the data stored on the block chain.
Another good source of double-spend protection can be human intelligence. For example, fraudsters may act differently from legitimate customers, letting savvy merchants manually flag them as high risk. Your program can provide a safe mode which stops automatic payment acceptance on a global or per-customer basis.
Issuing Refunds #
Occasionally receivers using your applications will need to issue refunds. The obvious way to do that, which is very unsafe, is simply to return the Satoshis Denominations of Bitcoin value, usually measured in fractions of a bitcoin but sometimes measured in multiples of a satoshi. One bitcoin equals 100,000,000 satoshis. Not to be confused with: Binary bits, a unit of data with two possible values
A script included in outputs which sets the conditions that must be fulfilled for those satoshis to be spent. Data for fulfilling the conditions can be provided in a signature script. Pubkey Scripts are called a scriptPubKey in code.
Not to be confused with: Pubkey (a public key, which can be used as part of a pubkey script but don’t provide a programmable authentication mechanism), Signature script (a script that provides data to the pubkey script)
-
Alice wants to buy a widget from Bob, so Bob gives Alice a price and Bitcoin Address
.A 20-byte hash formatted using base58check to produce either a P2PKH or P2SH Bitcoin address. Currently the most common way users exchange payment information.
Not to be confused with: IP address
-
Alice opens her Wallet
program and sends some SatoshisSoftware that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive satoshis.
Not to be confused with: HD wallet (a protocol that allows all of a wallet’s keys to be created from a single seed)
to that AddressDenominations of Bitcoin value, usually measured in fractions of a bitcoin but sometimes measured in multiples of a satoshi. One bitcoin equals 100,000,000 satoshis.
Not to be confused with: Binary bits, a unit of data with two possible values
. Her WalletA 20-byte hash formatted using base58check to produce either a P2PKH or P2SH Bitcoin address. Currently the most common way users exchange payment information.
Not to be confused with: IP address
program automatically chooses to spend those SatoshisSoftware that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive satoshis.
Not to be confused with: HD wallet (a protocol that allows all of a wallet’s keys to be created from a single seed)
from one of its unspent outputs, an OutputDenominations of Bitcoin value, usually measured in fractions of a bitcoin but sometimes measured in multiples of a satoshi. One bitcoin equals 100,000,000 satoshis.
Not to be confused with: Binary bits, a unit of data with two possible values
corresponding to the Bitcoin AddressAn output in a transaction which contains two fields: a value field for transferring zero or more satoshis and a pubkey script for indicating what conditions must be fulfilled for those satoshis to be further spent.
Not to be confused with: Outpoint (a reference to a particular output)
mjSk1Ny9spzU2fouzYgLqGUD8U41iR35QN.A 20-byte hash formatted using base58check to produce either a P2PKH or P2SH Bitcoin address. Currently the most common way users exchange payment information.
Not to be confused with: IP address
-
Bob discovers Alice paid too many Satoshis
. Being an honest fellow, Bob refunds the extra SatoshisDenominations of Bitcoin value, usually measured in fractions of a bitcoin but sometimes measured in multiples of a satoshi. One bitcoin equals 100,000,000 satoshis.
Not to be confused with: Binary bits, a unit of data with two possible values
to the mjSk… AddressDenominations of Bitcoin value, usually measured in fractions of a bitcoin but sometimes measured in multiples of a satoshi. One bitcoin equals 100,000,000 satoshis.
Not to be confused with: Binary bits, a unit of data with two possible values
.A 20-byte hash formatted using base58check to produce either a P2PKH or P2SH Bitcoin address. Currently the most common way users exchange payment information.
Not to be confused with: IP address
This seems like it should work, but Alice is using a centralized multi-user web Wallet Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive satoshis. Not to be confused with: HD wallet (a protocol that allows all of a wallet’s keys to be created from a single seed)
Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive satoshis.
Not to be confused with: HD wallet (a protocol that allows all of a wallet’s keys to be created from a single seed)
Denominations of Bitcoin value, usually measured in fractions of a bitcoin but sometimes measured in multiples of a satoshi. One bitcoin equals 100,000,000 satoshis.
Not to be confused with: Binary bits, a unit of data with two possible values
This leaves receivers only two correct ways to issue refunds:
-
If an Address
was copy-and-pasted or a basic “bitcoin:” URI was used, contact the spender directly and ask them to provide a refund AddressA 20-byte hash formatted using base58check to produce either a P2PKH or P2SH Bitcoin address. Currently the most common way users exchange payment information.
Not to be confused with: IP address
.A 20-byte hash formatted using base58check to produce either a P2PKH or P2SH Bitcoin address. Currently the most common way users exchange payment information.
Not to be confused with: IP address
-
If the Payment protocol
was used, send the refund to the OutputThe deprecated protocol defined in BIP70 (and other BIPs) which lets spenders get signed payment details from receivers.
Not to be confused with: IP-to-IP payment protocol (an insecure, discontinued protocol included in early versions of Bitcoin)
listed in theAn output in a transaction which contains two fields: a value field for transferring zero or more satoshis and a pubkey script for indicating what conditions must be fulfilled for those satoshis to be further spent.
Not to be confused with: Outpoint (a reference to a particular output)
refund_to
field of the Payment Message.A parameter of bitcoin: URIs which allows the receiver to optionally specify a message to the spender.
Note: it would be wise to contact the spender directly if the refund is being issued a long time after the original payment was made. This allows you to ensure the user still has access to the key or keys for the A 20-byte hash formatted using base58check to produce either a P2PKH or P2SH Bitcoin address. Currently the most common way users exchange payment information. Not to be confused with: IP addressrefund_to
Address
Disbursing Income (Limiting Forex Risk) #
Many receivers worry that their Satoshis Denominations of Bitcoin value, usually measured in fractions of a bitcoin but sometimes measured in multiples of a satoshi. One bitcoin equals 100,000,000 satoshis. Not to be confused with: Binary bits, a unit of data with two possible values
If your application provides this business logic, it will need to choose which outputs to spend first. There are a few different algorithms which can lead to different results.
-
A Merge
avoidance algorithm makes it harder for outsiders looking at BlockSpending, in the same transaction, multiple outputs which can be traced back to different previous spenders, leaking information about how many satoshis you control.
chain data to figure out how many SatoshisOne or more transactions prefaced by a block header and protected by proof of work. Blocks are the data stored on the block chain.
the receiver has earned, spent, and saved.Denominations of Bitcoin value, usually measured in fractions of a bitcoin but sometimes measured in multiples of a satoshi. One bitcoin equals 100,000,000 satoshis.
Not to be confused with: Binary bits, a unit of data with two possible values
-
A last-in-first-out (LIFO) algorithm spends newly acquired Satoshis
while there’s still Double spendDenominations of Bitcoin value, usually measured in fractions of a bitcoin but sometimes measured in multiples of a satoshi. One bitcoin equals 100,000,000 satoshis.
Not to be confused with: Binary bits, a unit of data with two possible values
risk, possibly pushing that risk on to others. This can be good for the receiver’s balance sheet but possibly bad for their reputation.A transaction that uses the same input as an already broadcast transaction. The attempt of duplication, deceit, or conversion, will be adjudicated when only one of the transactions is recorded in the blockchain.
-
A first-in-first-out (FIFO) algorithm spends the oldest Satoshis
first, which can help ensure that the receiver’s payments always confirm, although this has utility only in a few edge cases.Denominations of Bitcoin value, usually measured in fractions of a bitcoin but sometimes measured in multiples of a satoshi. One bitcoin equals 100,000,000 satoshis.
Not to be confused with: Binary bits, a unit of data with two possible values
MergeSpending, in the same transaction, multiple outputs which can be traced back to different previous spenders, leaking information about how many satoshis you control.
Avoidance #
Spending, in the same transaction, multiple outputs which can be traced back to different previous spenders, leaking information about how many satoshis you control.
When a receiver receives Satoshis Denominations of Bitcoin value, usually measured in fractions of a bitcoin but sometimes measured in multiples of a satoshi. One bitcoin equals 100,000,000 satoshis. Not to be confused with: Binary bits, a unit of data with two possible values
An output in a transaction which contains two fields: a value field for transferring zero or more satoshis and a pubkey script for indicating what conditions must be fulfilled for those satoshis to be further spent.
Not to be confused with: Outpoint (a reference to a particular output)
Denominations of Bitcoin value, usually measured in fractions of a bitcoin but sometimes measured in multiples of a satoshi. One bitcoin equals 100,000,000 satoshis.
Not to be confused with: Binary bits, a unit of data with two possible values
Denominations of Bitcoin value, usually measured in fractions of a bitcoin but sometimes measured in multiples of a satoshi. One bitcoin equals 100,000,000 satoshis.
Not to be confused with: Binary bits, a unit of data with two possible values
However, if the receiver spends Satoshis Denominations of Bitcoin value, usually measured in fractions of a bitcoin but sometimes measured in multiples of a satoshi. One bitcoin equals 100,000,000 satoshis. Not to be confused with: Binary bits, a unit of data with two possible values
Spending, in the same transaction, multiple outputs which can be traced back to different previous spenders, leaking information about how many satoshis you control.
Denominations of Bitcoin value, usually measured in fractions of a bitcoin but sometimes measured in multiples of a satoshi. One bitcoin equals 100,000,000 satoshis.
Not to be confused with: Binary bits, a unit of data with two possible values
Merge Spending, in the same transaction, multiple outputs which can be traced back to different previous spenders, leaking information about how many satoshis you control.
A crude Merge Spending, in the same transaction, multiple outputs which can be traced back to different previous spenders, leaking information about how many satoshis you control.
An output in a transaction which contains two fields: a value field for transferring zero or more satoshis and a pubkey script for indicating what conditions must be fulfilled for those satoshis to be further spent.
Not to be confused with: Outpoint (a reference to a particular output)
Denominations of Bitcoin value, usually measured in fractions of a bitcoin but sometimes measured in multiples of a satoshi. One bitcoin equals 100,000,000 satoshis.
Not to be confused with: Binary bits, a unit of data with two possible values
Denominations of Bitcoin value, usually measured in fractions of a bitcoin but sometimes measured in multiples of a satoshi. One bitcoin equals 100,000,000 satoshis.
Not to be confused with: Binary bits, a unit of data with two possible values
An output in a transaction which contains two fields: a value field for transferring zero or more satoshis and a pubkey script for indicating what conditions must be fulfilled for those satoshis to be further spent.
Not to be confused with: Outpoint (a reference to a particular output)
More advanced Merge Spending, in the same transaction, multiple outputs which can be traced back to different previous spenders, leaking information about how many satoshis you control.
The deprecated protocol defined in BIP70 (and other BIPs) which lets spenders get signed payment details from receivers.
Not to be confused with: IP-to-IP payment protocol (an insecure, discontinued protocol included in early versions of Bitcoin)
Last In, First Out (LIFO) #
Outputs can be spent as soon as they’re received—even before they’re confirmed. Since recent outputs are at the greatest risk of being double-spent, spending them before older outputs allows the spender to hold on to older confirmed outputs which are much less likely to be double-spent.
There are two closely-related downsides to LIFO:
-
If you spend an Output
from one Unconfirmed transactionAn output in a transaction which contains two fields: a value field for transferring zero or more satoshis and a pubkey script for indicating what conditions must be fulfilled for those satoshis to be further spent.
Not to be confused with: Outpoint (a reference to a particular output)
in a second transaction, the second transaction becomes invalid if Transaction malleabilityA score indicating the number of blocks on the best block chain that would need to be modified to remove or modify a particular transaction. A confirmed transaction has a confirmation score of one or higher.
changes the first transaction.The ability of someone to change (mutate) unconfirmed transactions without making them invalid, which changes the transaction’s txid, making child transactions invalid.
Not to be confused with: BIP62 (a proposal for an optional new transaction version that reduces the set of known mutations for common transactions)
-
If you spend an Output
from one Unconfirmed transactionAn output in a transaction which contains two fields: a value field for transferring zero or more satoshis and a pubkey script for indicating what conditions must be fulfilled for those satoshis to be further spent.
Not to be confused with: Outpoint (a reference to a particular output)
in a second transaction and the first transaction’s OutputA score indicating the number of blocks on the best block chain that would need to be modified to remove or modify a particular transaction. A confirmed transaction has a confirmation score of one or higher.
is successfully double spent to another OutputAn output in a transaction which contains two fields: a value field for transferring zero or more satoshis and a pubkey script for indicating what conditions must be fulfilled for those satoshis to be further spent.
Not to be confused with: Outpoint (a reference to a particular output)
, the second transaction becomes invalid.An output in a transaction which contains two fields: a value field for transferring zero or more satoshis and a pubkey script for indicating what conditions must be fulfilled for those satoshis to be further spent.
Not to be confused with: Outpoint (a reference to a particular output)
In either of the above cases, the receiver of the second transaction will see the incoming transaction notification disappear or turn into an error Message A parameter of bitcoin: URIs which allows the receiver to optionally specify a message to the spender.
Because LIFO puts the recipient of secondary transactions in as much double-spend risk as the recipient of the primary transaction, they’re best used when the secondary recipient doesn’t care about the risk—such as an exchange or other service which is going to wait for six Confirmations A score indicating the number of blocks on the best block chain that would need to be modified to remove or modify a particular transaction. A confirmed transaction has a confirmation score of one or higher.
LIFO should not be used when the primary transaction recipient’s reputation might be at stake, such as when paying employees. In these cases, it’s better to wait for transactions to be fully verified (see the Verification subsection above) before using them to make payments.
First In, First Out (FIFO) #
The oldest outputs are the most reliable, as the longer it’s been since they were received, the more blocks would need to be modified to Double spend A transaction that uses the same input as an already broadcast transaction. The attempt of duplication, deceit, or conversion, will be adjudicated when only one of the transactions is recorded in the blockchain.
Blocks |
Chance of successful modification |
---|---|
5 |
17.73523% |
10 |
4.16605% |
15 |
1.01008% |
20 |
0.24804% |
25 |
0.06132% |
30 |
0.01522% |
35 |
0.00379% |
40 |
0.00095% |
45 |
0.00024% |
50 |
0.00006% |
FIFO does have a small advantage when it comes to transaction fees, as older outputs may be eligible for inclusion in the 50,000 bytes set aside for no-fee-required high-priority transactions by miners running the default Bitcoin Core codebase. However, with transaction fees being so low, this is not a significant advantage.
The only practical use of FIFO is by receivers who spend all or most of their income within a few blocks, and who want to reduce the chance of their payments becoming accidentally invalid. For example, a receiver who holds each payment for six Confirmations A score indicating the number of blocks on the best block chain that would need to be modified to remove or modify a particular transaction. A confirmed transaction has a confirmation score of one or higher.
Rebilling Recurring Payments #
Automated recurring payments are not possible with decentralized Bitcoin wallets. Even if a Wallet Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive satoshis. Not to be confused with: HD wallet (a protocol that allows all of a wallet’s keys to be created from a single seed)
This means automated recurring Bitcoin payments can only be made from a centralized server which handles Satoshis Denominations of Bitcoin value, usually measured in fractions of a bitcoin but sometimes measured in multiples of a satoshi. One bitcoin equals 100,000,000 satoshis. Not to be confused with: Binary bits, a unit of data with two possible values
National currencies such as the dollar or euro.
Non-automated rebilling can be managed by the same mechanism used before credit-card recurring payments became common: contact the spender and ask them to pay again—for example, by sending them a PaymentRequest “bitcoin:” URI in an HTML email.
In the future, extensions to the Payment protocol The deprecated protocol defined in BIP70 (and other BIPs) which lets spenders get signed payment details from receivers. Not to be confused with: IP-to-IP payment protocol (an insecure, discontinued protocol included in early versions of Bitcoin)
Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive satoshis.
Not to be confused with: HD wallet (a protocol that allows all of a wallet’s keys to be created from a single seed)
Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive satoshis.
Not to be confused with: HD wallet (a protocol that allows all of a wallet’s keys to be created from a single seed)
Leave a Reply
Want to join the discussion?Feel free to contribute!