How do Bitpay invoices hide the Bitcoin address to pay to? I want to pay with another wallet.


Bitpay invoices are not compatible with most Bitcoin wallets out right now. I wanted to pay a bitpay invoice, but my wallet doesn't support it.

  • How does Bitpay hide the bitcoin address on their invoice pages? I don't even see it in the source.
  • I know there is Debitpay ( ) static app to decode these invoices, but I'd like to extract the Bitcoin address from the bitpay invoice manually myself. How can this be done?

Patoshi パトシ

Posted 2018-12-24T21:15:22.463

Reputation: 9 661

i found the link similar to the link you put this just easier:

– asu – 2019-06-15T18:15:00.580



Bitpay uses the BIP 70 Payment Protocol. This protocol does not use addresses, which is why they are able to now show an address. Rather, the Bitcoin URI that you are given (either you scanned it with a QR code reader or you entered it into your wallet) points to a place where your wallet can download a PaymentRequest. The Bitcoin URI format for pointing to the PaymentRequest download location is specified by BIP 72.

The PaymentRequest that is downloaded contains a list of outputs (amounts and scriptPubKeys) that Bitpay wants you to have in your transaction. These outputs do not contain addresses; instead they have directly the scriptPubKey that should be in the output. This allows for forward compatibility with other new script or address types that did not exist at the time of BIP 70's writing.

but I'd like to extract the Bitcoin address from the bitpay invoice manually myself.

You can download the PaymentRequest as a file from the URL specified by the PaymentRequest. That PaymentRequest encoded using Google's Protocol Buffers with the fields specified in BIP 70. So using a Protobuf decoder, you can get each specific field of the PaymentRequest, and from there, each field of each output, and then convert the output scripts to addresses if those scripts even have addresses. I have a slightly outdated project that runs locally to do all of this for you.

Andrew Chow

Posted 2018-12-24T21:15:22.463

Reputation: 50 267