Is there a rpc/cli method for payment protocol in bitcoin-core? I have a full node running bitcoin-core 0.16 bitcoind (not bitcoin-qt). Today I tried and failed to pay a bitpay "secure" payment protocol uri invoice via the cli. The uri was in the form bitcoin:?r=https://bitpay.com/i/... with no visible bitcoin address or amount. (Guess people can't be trusted to copy-paste the address correctly?). Not surprisingly, the usual sendtoaddress method called the uri invalid.

I curled the address hoping to get the real payment details so I could enter them manually, but I just got a 301 redirect to a page on bitpay.com saying the invoice has not been paid. Guess they filter on uagent or some other header.

I also googled it but only found explanations of what the payment protocol is, why bitpay is using it, and how to do it with popular UI wallets. Nothing about cli.

Does anyone know if/how this is possible with cli/rpc only? Or perhaps the magic header bitpay looks for to distinguish a wallet app from a browser so I can get the real address? If not, I plan to open a ticket with bitcoin core devs on adding it.

Update:

bitpay link as requested: bitcoin:?r=https://bitpay.com/i/97ghKmFG8HVJNEbxkVefV though it has now been payed (via bitcoin-qt ui) so its usefulness may now be limited.
The payment protocol is only usable from the GUI (i.e. bitcoin-qt). It is supposed to be an interactive protocol so you cannot use it from the command line which is non-interactive (in the sense that you issue commands and get a response back instead of issue command and interact within the context of that command).