diff --git a/README.md b/README.md index e564342..403ceab 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,6 @@ To connect your website with your BTCPay server, you must first pair your applic ``` Label: Public key: leave blank -Facade: 'merchant' ``` 3. Click save and then copy the 7 digit pairing code from the success page @@ -57,6 +56,10 @@ fetched_invoice = client.get_invoice() ``` The `fetched_invoice` above will be a dictionary of all invoice data from the Bitpay API. For instance, you can check the payment status with `fetched_invoice['status']`. +This `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 the `get_invoice` method above. + ### Get a list of invoices matching certain parameters ```python