Decoding BitPay payment requests

From Bitcoin Wiki
Revision as of 22:45, 3 September 2018 by Theymos (talk | contribs) (Created page with "BitPay annoyingly forces users to pay via the [ BIP70] payment protocol. BIP70 was created in 2013, and befor...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

BitPay annoyingly forces users to pay via the BIP70 payment protocol. BIP70 was created in 2013, and before BitPay did this, it had become more-or-less deprecated due to its complexity, reliance on the insecure & centralized certificate authority architecture, privacy issues, and lack of compelling reasons to use it. Therefore, it is not widely supported by wallets, and it may never be. This page shows you how to pay to these requests without wallet support.

Easy Way

Paste the request URI into, and it will give you the address. This is slightly insecure, since that page could be suddenly changed to give you an incorrect address instead of the real one.

Doing it yourself

BitPay supports a non-standard extension to BIP70 which uses JSON instead of a binary format. Therefore, you can use curl or similar to get the payment info. Use a command like:

curl -H 'Accept: application/payment-request'

curl supports Tor and proxies. For Tor, you'd add --socks5-hostname localhost:9050 before -H. Replace 9050 with 9150 for Tor Browser.

In the response, address is the address you pay to, amount is the exact number of satoshi you are expected to send (divide by 100000000 for BTC), and requiredFeeRate is the minimum satoshi/byte fee rate that you must pay. Warning: if you don't pay at least the fee rate specified, then BitPay might not register your payment. Round your fees up if necessary.

It should be possible to use built-in tools such as PowerShell to do the same thing on Windows. Edit this page if you know how.