Bitcoin BIP21 Payment URIs Explained: Address, Amount, Label, and Message
A Bitcoin payment URI is a machine-readable instruction for a wallet, not a transaction. BIP21 defines the familiar bitcoin: scheme so a website, invoice, or QR code can supply a destination and optional payment details. The wallet must still let the payer inspect and authorize the actual payment.
Structure and a worked example
A conventional request looks like this:
bitcoin:bc1qexampleaddress?amount=0.00125000&label=Example%20Shop&message=Order%20123
The address above is illustrative, not a valid payment destination. A real implementation must substitute a validated address for the selected network. The amount is denominated in BTC, not satoshis: 0.00125000 BTC equals 125,000 sats. The label identifies the payee for the payer's wallet, while message is a human-readable request note. Neither field is recorded on-chain merely because it appears in a URI.
BIP21 parameters follow URI query syntax. Spaces and reserved characters should be percent-encoded. Wallets must parse the amount as an exact decimal value, not as an imprecise binary floating-point quantity. They should reject negative, malformed, or out-of-range amounts and avoid silently changing the destination.
Optional and required parameters
BIP21 permits additional query parameters. Its req- prefix identifies a parameter the receiver must understand to process the request; an unknown required parameter is grounds to reject the URI. Unknown optional parameters can be ignored under the base scheme. This distinction matters when newer payment protocols extend an older URI format.
The URI does not set the miner fee, specify a guaranteed confirmation time, or prove that the payee controls the destination. Those decisions require wallet validation, fee estimation, and user approval.
Network, security, and UX
A Bitcoin mainnet address should not be paid from a test network wallet. The scheme name alone does not establish the Bitcoin network; the wallet must interpret and validate the embedded address. A malicious QR code or substituted URI can redirect a payment, so display the resolved address and amount before signing. Avoid treating a label or message as authenticated identity.
A QR code normally contains the URI text, and a compatible scanner decodes that text into wallet fields. Scanning is only data entry: it does not create a signed transaction, transfer coins, or reserve funds.
Primary references
BIP21 — URI Scheme: https://github.com/bitcoin/bips/blob/master/bip-0021.mediawiki
RFC 3986 — Uniform Resource Identifier: https://www.rfc-editor.org/rfc/rfc3986
