How to interpret BIP21 URI with `amount` specified twice?


BIP21 includes the following grammar rule:

bitcoinparam   = [ amountparam / labelparam / messageparam / otherparam / reqparam ]

I’m not sure if this grammar rule allows to specify amountparam multiple times or not. An example might be:

bitcoin:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?amount=20.3&amount=21&label=Luke-Jr (amount twice intentionally)

The amount parameter is specified twice and I’m not sure what BIP21 parsers are supposed to do in this case. Personally, I would reject the URI as “not valid” because it feels like the safest option for payers. However, maybe only the first value (ie 20.3) is to be considered or the latest one (ie 21).

Could anyone clarify this for me please?

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top