Does anyone understand how would this work if different payment methods had to be processed by different programs? As far as I understand, protocol handlers can only be registered for a protocol/scheme in general but not be limited to a protocol with a particular parameter as e.g. payto://IBAN/ or payto://bitcoin/.
If you’re dealing with a web app registering itself as a protocol handler, the scheme is the highest precision you get: navigator.registerProtocolHandler("payto", "https://bank.example/payto-handler/%s"). So there, you only get the protocol level of granularity. You might therefore set up bank.example and bitcoin.example, and now when you click on a payto: link, the browser will say “do you want to open this link with bank.example or bitcoin.example?”
On mobile platforms, I’m not certain, but you may be able to have the bank app only register for payto://iban/ (and any other payment authorities it supports) and the Bitcoin app only register for payto://bitcoin/.