user120481: I need some help understanding a finer point of BIP21 URIs. Is there a required order for the parameters? I'm not very experienced with the concept of ABNF grammar, so I'm having trouble understanding.
For example, I know this is valid.
bitcoin:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?amount=20.3&label=Luke-Jr
And I know this valid:
bitcoin:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?amount=20.3&label=Luke-Jr&optionalparam=blahblahblah
But is this valid?
bitcoin:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?optionalparam=blahblahblah&amount=20.3&label=Luke-Jr
Very specifically, must the order of parameters always be amount, label, message, and then optional params? Or is it OK to include optional params before the amount?

user13866: The ABNF in BIP21 indicates that the bitcoinparam can be in any order.
bitcoinurn     = "bitcoin:" bitcoinaddress [ "?" bitcoinparams ]
bitcoinaddress = *base58
bitcoinparams  = bitcoinparam [ "&" bitcoinparams ]
bitcoinparam   = [ amountparam / labelparam / messageparam / otherparam / reqparam ]

The third item in this list shows that ordering is not important. Any valid bitcoinparam can be first in the RHS expression. You can then prepend any other bitcoinparam using the same rule. Repeat as needed.

120481: <p>I need some help understanding a finer point of <a href="https://github.com/bitcoin/bips/blob/master/bip-0021.mediawiki" rel="nofollow noreferrer">BIP21 URIs</a>. Is there a required order for the parameters? I'm not very experienced with the concept of ABNF grammar, so I'm having trouble understanding.</p>
<p>For example, I know this is valid.</p>
<p><code>bitcoin:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?amount=20.3&amp;label=Luke-Jr</code></p>
<p>And I know this valid:</p>
<p><code>bitcoin:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?amount=20.3&amp;label=Luke-Jr&amp;optionalparam=blahblahblah</code></p>
<p>But is this valid?</p>
<p><code>bitcoin:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?optionalparam=blahblahblah&amp;amount=20.3&amp;label=Luke-Jr</code></p>
<p>Very specifically, must the order of parameters always be amount, label, message, and then optional params? Or is it OK to include optional params before the amount?</p>
 13866: <p>The ABNF in BIP21 indicates that the <code>bitcoinparam</code> can be in any order.</p>
<pre><code>bitcoinurn     = &quot;bitcoin:&quot; bitcoinaddress [ &quot;?&quot; bitcoinparams ]
bitcoinaddress = *base58
bitcoinparams  = bitcoinparam [ &quot;&amp;&quot; bitcoinparams ]
bitcoinparam   = [ amountparam / labelparam / messageparam / otherparam / reqparam ]
</code></pre>
<p>The third item in this list shows that ordering is not important. Any valid <code>bitcoinparam</code> can be first in the RHS expression. You can then prepend any other <code>bitcoinparam</code> using the same rule. Repeat as needed.</p>
