Update README.md

This commit is contained in:
Jeff Vandrew Jr 2019-03-11 16:55:22 -04:00 committed by GitHub
parent 66c82a1a45
commit a7c8554eeb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,7 +37,7 @@ client = BTCPayClient.create_client(host='https://btcpay.example.com', code=<pai
You'll probably only ever need the `create_invoice` and `get_invoice` methods, but the client object also has other methods, such as those for getting and setting custom rate information.
The `get_invoice` method is very important. When BTCPay sends a payment notification, it is unsigned and insecure. This is necessary to maintain Bitpay compatibility. You therefore cannot rely upon the data transmitted in the payment notification.
The `get_invoice` method is very important. When BTCPay sends a payment notification (described [here in Bitpay's API docs](https://bitpay.com/docs/create-invoice), it is unsigned and insecure. Being unsigned and insecure is necessary to maintain compatibility with software originally designed for Bitpay. You therefore cannot rely upon the data transmitted in the payment notification.
Instead, take the `invoiceId` from the payment notification, and use it to securely fetch the paid invoice data from BTCPay using `get_invoice`.