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?


1 Answer 1


Per ABNF grammar, this would evaluate to a single amount field.

If it were to allow more 1 or more amount fields, it would be represented as 1*amount. If it were to allow 1 OR two amount fields, it would be represented as 1*2amount.

  • I see what you are saying. However, there is also: bitcoinparams = bitcoinparam [ "&" bitcoinparams ] and so I can place bitcoinparam as many times as I want and not necessarily different ones. Right?
    – Kiminuo
    Jun 19 at 6:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.