Author

Topic: Is there any way to locally decypher BitPay payment orders? (Read 288 times)

sr. member
Activity: 407
Merit: 250
I like the discussion that's taking place in this thread but I think it's becoming a little off topic from the original question. I asked for a way or guide on how to decipher BitPay locally, and got some such answers.

Frankly, I think a more appropriate place to discuss the technical details of how each wallet can fail to fulfill BitPay's ridiculous requirements would be a new topic. I too am very annoyed by how BitPay has started handling payments but I feel like I lack the technical knowledge to analyze it in depth.

Bitpay to me:
Quote
You must pay BCH invoices with a Payment Protocol-compatible BCH wallet which broadcasts transactions via
Payment Protocol and uses BitPay's required minimum miner fee rate. Because your payment was sent with an
incompatible wallet (or not broadcast via Payment Protocol), your payment was not accepted to the invoice.

Generally, we recommend not using "Spend Unconfirmed Funds", as you will have to wait until the incoming
transactions get confirmed before your outgoing transactions can be sent. Our invoices do not accept
payments sent with unconfirmed inputs.

You must use a Bitcoin or Bitcoin Cash wallet that supports the Payment Protocol.

refund if:

1. incompatible wallet
2. not broadcast via Payment Protocol
3. Spend Unconfirmed Funds

I make as:
Electron-Cash-4.0.11-portable
1. -------------------------------------------------ok, wallet Electron-Cash, Windows
2. not broadcast via Payment Protocol---------no
3. 2 of 6 Unconfirmed Funds--------------------no
legendary
Activity: 2422
Merit: 1451
Leading Crypto Sports Betting & Casino Platform
I like the discussion that's taking place in this thread but I think it's becoming a little off topic from the original question. I asked for a way or guide on how to decipher BitPay locally, and got some such answers.

Frankly, I think a more appropriate place to discuss the technical details of how each wallet can fail to fulfill BitPay's ridiculous requirements would be a new topic. I too am very annoyed by how BitPay has started handling payments but I feel like I lack the technical knowledge to analyze it in depth.
HCP
legendary
Activity: 2086
Merit: 4363
I feel that it actually makes it easier, use one the approved wallets and you don't have to think about fees or settings etc. For the new users all they have to do is click. Don't even have to think about setting fees or anything else.
And what happens when you use Electrum (which is an "approved wallet") and it ignores the "fee" that is prescribed in the invoice and sets whatever you usually use because you have it set to manually set the fee and it has RBF set (also by default)?




Roll Eyes It's a ridiculous situation and BitPay need to stop being so "draconian" in what they will and won't accept... I can (maybe) understand RBF as that can cause issues with transaction IDs etc (and to be fair, they do pop up an "RBF warning" at least on the mobile site)... but not accepting a payment because of the fee used? pffft... that's just ridiculous, imo.

And looking at the BIP70 specs... "fee" isn't even included in the BIP Roll Eyes Roll Eyes
sr. member
Activity: 407
Merit: 250
We care about your security
Security Seals
Quote
We utilize only the highest security standards available on the web,
passing intense security scans regularly. Rest assured, your data is
safe with us.

Due to recent changes, BitPay now requires that the Bitcoin Payment
Protocol be used for all transactions. Only Payment
Protocol-compatible wallets can be used.If you know how this works,
continue below.

For those new to this process, please note that you will no longer
see a bitcoin address on a BitPay invoice. Instead, the invoice
displays a Payment Protocol URL or a Payment Protocol QR code
instead of a bitcoin address. Once you have bitcoin in your wallet,
you can scan or click to pay. You can also copy the Payment
Protocol URL from the BitPay invoice and paste it into your
wallet's sending field.

For even more detailed instructions on how to pay without a
bitcoin address (using a Payment Protocol Wallet), check out
this Support Article on BitPay –
https://support.bitpay.com/hc/en-us/articles/115005559826

VPN ip ban, need try other VPN ip
Quote
Something went wrong
Unfortunately we have had to cancel your order for security reasons.

To continue with your order, you have the following options:
Pick a different payment method.
Reduce the total amount of your order.
Our apologies for the inconvenience.
sr. member
Activity: 407
Merit: 250
1. curl -X GET https://bitpay.com/i/GpB4....

{"network":"main","currency":"BCH","requiredFeeRate":1,"outputs":[{"amount":3459300,"address":"qqpxalkyg7k4xhevhjy4qdwx2z0hy420d5znyjksz3"}


2. local decoder

0.034593
qqpxalkyg7k4xhevhjy4qdwx2z0hy420d5znyjksz3

Fee Rate (sats/byte)
1


3. app Electron Cash via Paste - bitcoincash:?r=https://bitpay.com/i/GpB4...

0.034593
1EMqSoDzMdBuuvM2RUnup3FnDeo6wuHxEg




legendary
Activity: 3500
Merit: 6320
Crypto Swap Exchange
I paid always with Electron-Cash-4.0.11-portable

BCH and make local decode bitpay


today was declined


Yes they are getting picky. If anything is missing or changed from the invoice amount (fee, rbf, etc.) they are starting to fail payments more and more.

Sometimes it seems to me that BitPay is in the hands of some people who want to portray Bitcoin as a complicated payment method, because I have to admit that I was confused when I first used it.

I feel that it actually makes it easier, use one the approved wallets and you don't have to think about fees or settings etc. For the new users all they have to do is click. Don't even have to think about setting fees or anything else.

Although core is getting rid of it sooner or later for now it's still in it, electrum desktop, exodus (ugh but some people love it), and many others for both desktop and mobile.

If you do not want to follow the rules that they put down, just go to another merchant that uses a different crypto payment method. Not saying it's the best option but it's their way of doing it.

Kind of like you now have to jump through hoops to get the bitcoincore wallet to give you a legacy address. Sorry, but there are still some older automated apps that can only send to those addresses. If you want it easy to generate them, because you are using something that does not support it switch to a different app.

-Dave
legendary
Activity: 2758
Merit: 6830
cmd
C:\curl\bin

curl -X GET https://bitpay.com/i/$BITPAYINVOICEID -H 'accept: application/payment-request'

bitcoincash:?r=https://bitpay.com/i/BITPAYINVOICEID

ok?
Yes.

E.g:
Code:
curl -X GET https://bitpay.com/i/Bjm1c6hrZ1nMz5UViffD3x -H "accept: application/payment-request"

The response:
Code:
{"network":"main","currency":"BCH","requiredFeeRate":1,"outputs":[{"amount":9437200,"address":"qzjzsjfgp8csna3pdtav59t6clpquj2yc54hlqpf76"}],"time":"2019-12-07T22:51:19.123Z","expires":"2019-12-07T23:06:19.123Z","memo":"Payment request for BitPay invoice Bjm1c6hrZ1nMz5UViffD3x for merchant Electronic Frontier Foundation","paymentUrl":"https://bitpay.com/i/Bjm1c6hrZ1nMz5UViffD3x","paymentId":"Bjm1c6hrZ1nMz5UViffD3x"}

Divide amount (9437200) by 100000000 = 0.09437200;
sr. member
Activity: 407
Merit: 250
The web service that does this is open source, meaning that you can use a local copy or just do it by yourself.

Equivalent cURL
Code:
curl -X GET https://bitpay.com/i/$BITPAYINVOICEID -H 'accept: application/payment-request'

Equivalent Python

Code:
from requests import get
url = 'https://bitpay.com/i/BITPAYINVOICEID'
resp = get(url, headers={'Accept' : 'application/payment-request'}).json()
print(resp)

The first one is also described in the same URL you linked above. Just use python or do a GET request with the "Accept: ..." header to the URL of the invoice and the response will be all the data you need.

cmd
C:\curl\bin

curl -X GET https://bitpay.com/i/BITPAYINVOICEID -H 'accept: application/payment-request'

bitcoincash:?r=https://bitpay.com/i/BITPAYINVOICEID

ok?

--
$ - delete


sr. member
Activity: 407
Merit: 250
I paid always with Electron-Cash-4.0.11-portable

BCH and make local decode bitpay


today was declined


need to decode online?
https://decoder.bip70.org/ only BTC
Quote

curl -X GET https://bitpay.com/i/$BITPAYINVOICEID -H 'accept: application/payment-request'

How to do it from under Windows?
legendary
Activity: 3234
Merit: 5637
Blackjack.fun-Free Raffle-Join&Win $50🎲
I always think that something will change in the way the payment method is set up, but this service obviously does not aspire to simplicity, but to greater complexity. I used them a few days ago (Nano S+Electrum) because that was the only option to pay Nano X with crypto, and they still have that stupid warning/message that fee is too low (even if I pay a max fee for next block confirmation). What is even more stupid is that their e-mail still claims that my transaction is not confirmed/complete, but it was done in 10 minutes.

Sometimes it seems to me that BitPay is in the hands of some people who want to portray Bitcoin as a complicated payment method, because I have to admit that I was confused when I first used it.
legendary
Activity: 3010
Merit: 3724
Join the world-leading crypto sportsbook NOW!
Got to agree with DaveF here re the fee or even the value of the invoice. I've pointed out before that it's pretty pointless to bypass BitPay when using it to pay, because their rules are just simply meant to block any other alternative. You simply have to overpay the miner's fee. And you cannot resort to RBF even as that will simply invalidate the invoice (I've had the unfortunate experience of forgetting more than a couple of times!).
legendary
Activity: 2422
Merit: 1451
Leading Crypto Sports Betting & Casino Platform
I'm guessing that was just a force of habit when recommending to run things locally Tongue Wink
You are spot on. LOL.

This fact didn't even cross my mind. Sorry. Cheesy
Of course I didn't mean offline, that doesn't make sense with bitpay. But using the service in full locally is still desired to reduce trust. I will look into this anyway, thanks.
copper member
Activity: 85
Merit: 5
I think they record IP of payment in this way Wink
legendary
Activity: 2758
Merit: 6830
I'm guessing that was just a force of habit when recommending to run things locally Tongue Wink
You are spot on. LOL.

This fact didn't even cross my mind. Sorry. Cheesy
HCP
legendary
Activity: 2086
Merit: 4363
The web service that does this is open source, meaning that you can use a local copy in an offline environment or just do it by yourself.
That simply isn't possible... BIP70 requires that you connect to the specified server to retrieve the relevant details of the invoice! You can't do that in an "offline" environment. I'm guessing that was just a force of habit when recommending to run things locally Tongue Wink

still, I like the looks of DeBitpay... Thanks for the link. I didn't know about that one... I was using: https://decoder.bip70.org/


Keep in mind that if you use one the deciphers and then do something BitPay does not like it can lead to issues.

As a for instance people have sent with lower fees then set by the invoice and it took too long to mine so by the time it was accepted the BTC / fiat rate had changed enough to matter so the sale was cancelled.
Interestingly... the fee rate suggested in the invoice doesn't seem to flow through to either Bitcoin Core or Electrum (desktop and mobile version)... I've just run a test and while DeBitPay shows a fee of ~24 sats/byte:



The wallets just run with whatever I have configured:




So, it seems that using decoders isn't really going to be any worse than simply attempting to use an external wallet... 

legendary
Activity: 3500
Merit: 6320
Crypto Swap Exchange
Keep in mind that if you use one the deciphers and then do something BitPay does not like it can lead to issues.

As a for instance people have sent with lower fees then set by the invoice and it took too long to mine so by the time it was accepted the BTC / fiat rate had changed enough to matter so the sale was cancelled.

Yeah it sucks but those are the rules they play by.

-Dave
legendary
Activity: 2758
Merit: 6830
The web service that does this is open source, meaning that you can use a local copy or just do it by yourself.

Equivalent cURL
Code:
curl -X GET https://bitpay.com/i/$BITPAYINVOICEID -H 'accept: application/payment-request'

Equivalent Python

Code:
from requests import get
url = 'https://bitpay.com/i/BITPAYINVOICEID'
resp = get(url, headers={'Accept' : 'application/payment-request'}).json()
print(resp)

The first one is also described in the same URL you linked above. Just use python or do a GET request with the "Accept: ..." header to the URL of the invoice and the response will be all the data you need.
legendary
Activity: 2422
Merit: 1451
Leading Crypto Sports Betting & Casino Platform
I'm interested in a local client or piece of software that could act way to decode BitPay payment orders with minimum trust. The issue is best described in the bitcoin wiki:
https://en.bitcoin.it/wiki/Decoding_BitPay_payment_requests

Quote
BitPay annoyingly forces users to pay via a non-standard version of the BIP70 payment protocol. BIP70 was created in 2013, and is 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 probably never will be. This page shows you how to pay to these requests without wallet support.

There's already a website which does this as a web service, but this is by no means trustless and is surely vulnerable to man in the middle (address change) attacks.

If there isn't a specific piece of software, maybe a guide on how to do this in Windows would suffice. I searched but I couldn't find any. And just to clarify, deciphering doesn't mean to also complete the payment with the same piece of software. Only to display the relevant information such as: address to send funds to, amount and required fee. The payment could then be completed with any other wallet service or software.
Jump to: