Skip to main content
£0.00 0

Basket

No products in the basket.

ASIC mining articles and advice

BIP 21 Bitcoin Payment URIs Explained and Safely Implemented

BIP 21 Bitcoin payment URIs explained: parse addresses, amounts and required parameters safely, understand replacement by BIP 321 and test wallet handling.

BIP 21 URI Scheme guide cover

This guide explains BIP 21 URI Scheme in plain English. It covers the problem behind the BIP, why it matters and whether the proposal is part of Bitcoin today.

TL;DR

  • What it is: BIP 21 standardised bitcoin payment URIs so a user could click a link or scan a QR code and open a wallet with a destination and optional payment details. It replaced BIP 20 and is now itself marked Closed with BIP 321 proposed as its replacement.
  • Why it matters: BIP 21 made Bitcoin payment links interoperable, but the link remains untrusted input. Safe wallets parse strictly, honour required extensions, convert amounts exactly and require explicit confirmation while planning migration to the applicable successor specification.
  • Current position: BIP 21 standardised bitcoin payment URIs so a user could click a link or scan a QR code and open a wallet with a destination and optional payment details.

BIP 21 URI Scheme in simple English

BIP 21 URI Scheme: The bitcoin scheme is followed by an address and optional ampersand-separated query parameters. The scheme is case-insensitive while the remaining components retain case-sensitive rules.

Simple example

A node operator is checking BIP 21 URI Scheme. Implementations must use a real URI parser, validate percent encoding and reject malformed separators rather than splitting arbitrary text casually.

Key terms in plain English

BIP:
Bitcoin Improvement Proposal: a document describing a proposed rule, standard or process. Its status must be checked separately.
Node:
A computer running Bitcoin software that checks data and communicates with other peers.

Structure of a payment URI

The bitcoin scheme is followed by an address and optional ampersand-separated query parameters. The scheme is case-insensitive while the remaining components retain case-sensitive rules. Implementations must use a real URI parser, validate percent encoding and reject malformed separators rather than splitting arbitrary text casually.

Amount parsing without floating point

The amount is decimal BTC with a period separator and no commas. A wallet should parse it into integer satoshis with an explicit eight-decimal limit, rejecting negatives, exponent notation, overflow and excess precision. Display units may vary, but the confirmed BTC or satoshi value must not be ambiguous.

Labels and messages are untrusted

label and message help the payer understand a request but are not authenticated by the URI. They can contain encoded text supplied by an attacker. Interfaces should escape them, limit lengths and keep them visually separate from the independently decoded address, amount, fee and network.

BIP 21 URI Scheme technical diagram
Labels and messages are untrusted: the fields, validation boundary and operational evidence that implementations need to agree.

Required and optional extensions

Unknown ordinary parameters may be ignored, but an unknown req- parameter makes the entire URI invalid. This rule allows future mandatory semantics without old wallets silently discarding them. Tests must include multiple unknown parameters and confirm that only the required prefix changes acceptance.

User authorisation boundary

The specification says clients must not act without user authorisation and should require manual approval per payment. Protocol-handler registration, QR scanning and clipboard import are entry points, not signing permissions. The final trusted display must show destination, amount, fee and change before approval.

Replacement and compatibility

BIP 21 replaced BIP 20 and its record now points to BIP 321 as the modern successor. Wallets need an explicit compatibility matrix rather than assuming all bitcoin URIs mean the same revision. Generate the supported current form while accepting legacy syntax only where tests define the result.

How specialists test it

Developers test the proposal with made-up data on an isolated test network. They check normal cases and deliberately invalid cases. Different implementations should reach the same result before anyone relies on the proposal.

Frequently asked questions

What is the main point of BIP 21 URI Scheme?

BIP 21 URI Scheme: The bitcoin scheme is followed by an address and optional ampersand-separated query parameters.

For BIP 21 URI Scheme, what should a beginner know about structure of a payment URI?

The bitcoin scheme is followed by an address and optional ampersand-separated query parameters.

For BIP 21 URI Scheme, what should a beginner know about amount parsing without floating point?

The amount is decimal BTC with a period separator and no commas.

For BIP 21 URI Scheme, what should a beginner know about labels and messages are untrusted?

label and message help the payer understand a request but are not authenticated by the URI.

Conclusion

BIP 21 made Bitcoin payment links interoperable, but the link remains untrusted input. Safe wallets parse strictly, honour required extensions, convert amounts exactly and require explicit confirmation while planning migration to the applicable successor specification.

Primary sources

Check the current specification status and the documentation for the exact implementation you operate before moving production funds or changing a mining node.

ASIC MINER PICKS

Recommended ASIC Mining Hardware

Compare three of our highest ranked ASIC miners currently available, with live product details and pricing.
Overall ranking
Equihash
·
ZEC
Overall rank#1of 100AvailableAll: #3 / 831
Bitmain Antminer Z15K 525KSol Equihash Zcash Miner
Bitmain
Pre-Order
Hashrate
525KSOL
Efficiency
4.73W/KSOL
Power
2483W
Earns/kWh
41.5p
Free Shipping
Price · delivered
£6,050.00
ex VAT
Est. per month
£751.05
Payback 8.1 Months
Overall ranking
Equihash
·
ZEC
Overall rank#2of 100AvailableAll: #4 / 831
Bitmain Antminer Z15 Pro 800KSol Equihash Zcash Miner
Bitmain
In stock
Hashrate
800KSOL
Efficiency
3.3W/KSOL
Power
2640W
Earns/kWh
59.4p
Price · delivered
£11,925.00
ex VAT
Est. per month
£1144.46
Payback 10.4 Months
Overall ranking
SHA-256
·
BTC
Overall rank#6of 100AvailableAll: #9 / 831
Bitmain Antminer S23e Hydro 2U 865Th SHA-256 Bitcoin Miner
Bitmain
Pre-Order
Hashrate
865TH
Efficiency
10W/TH
Power
8650W
Earns/kWh
13.2p
Free Shipping
Price · delivered
£9,382.50
ex VAT
Est. per month
£835.74
Payback 11.2 Months
Browse all ASIC miners
MORE MINING ADVICE

More ASIC Mining Articles

Read practical advice about choosing hardware, calculating electricity costs, setting up miners, hosting and maintenance.
MINER COMMUNITY

Join the ASIC Mining Discussion

Ask a question or share what has worked for you. Your experience may help another miner make a better decision.

Members can read and join the discussion

Log in to read comments from other miners. Create a free account if you would like to ask a question or share your experience.

Log in to read comments Register to join the discussion

Membership helps us protect the discussion from spam and keep answers useful.

ASIC MINING SUPPORT

Need Help Choosing an ASIC Miner?

Tell us what you want to mine, your electricity cost and where the machine will run. We can help you compare hardware, power requirements, hosting and repairs.
Contact our mining team
Browse ASIC miners