Quick update on this. There was various pushback on the idea of updating a "Final" BIP, so instead
this is gonna be a new BIP.
Since its a new BIP we have the opportunity to add a bit more, so I went ahead and added a "payment
info callback" parameter. Like the original proposed change this doesn't impact any existing
wallets, but it does provide a new (important) feature for some use-cases, especially things like
nostr zaps. The same PR is still where the new BIP lives, and there's examples and rationale, but to
higlight the new (normative) section, it is included below:
=== Proof of Payment ===
The URI MAY include a "pop" (or "req-pop") parameter whose value can be used to build a URI which
the wallet application can, after payment completes, "open" to provide proof the payment was
completed or other information about the payment.
The value of a "pop" (or "req-pop") parameter shall be a percent-encoded (per RFC 3986 section 2.1)
URI prefix. The wallet application, if it supports providing payment information SHOULD
percent-decode the provided URI once, append the query parameter key from which the payment
instructions used were read, append a single =, and finally append the Payment Information to the
resulting URI and open it with the default system handler for the URI. For payment instructions read
from the body of the URI, "onchain" SHALL be used in place of the key.
A wallet MUST validate that the provided URI's scheme is not (case-insensitive) "http", "https",
"file", "javascript", "mailto" or any other scheme which will open in a web browser prior to opening it.
If a wallet will not open the pop scheme (either because it does not support returning payment
information for the selected payment method or because it uses a URI scheme which should not be
opened) and the parameter was passed as a "req-pop" parameter, the wallet MUST NOT initiate payment.
For payments made using an on-chain transaction, the Payment Information shall be the full
(including witness data) Bitcoin transaction as it was broadcasted to the Bitcoin network, encoded
in hex.
For payments made using a BOLT 11 invoice (communicated via the `lightning` parameter), the Payment
Information shall be the hex-encoded payment preimage.
Other payment schemes will define their own Payment Information format. This BIP may be updated from
time to time with Payment Information formats for other payment schemes.