Closed kspearrin closed 5 years ago
The following is an example of the JSON returned for a GET /invoices/{id} call to the BitPay API.
GET /invoices/{id}
I found several useful things (for my use case, at least) missing from the invoice object. This PR adds them so that they can be used.
TxId
ReceivedTime
DateTimeOffset
RefundAddressRequestPending
RefundAddresses
RefundAddress
RefundInfo
TransactionCurrency
Thanks @NicolasDorier . Any chance of getting an update published to nuget with this any time soon?
already did
The following is an example of the JSON returned for a
GET /invoices/{id}
call to the BitPay API.Toggle GET /invoices/{id} JSON Response
``` { "facade":"merchant/invoice", "data":{ "url":"https://test.bitpay.com/invoice?id=***************", "posData":"some data", "status":"complete", "price":10, "currency":"USD", "itemDesc":"Item Desc", "invoiceTime":1550840708425, "expirationTime":1550841608425, "currentTime":1550931615822, "guid":"********************", "id":"***************", "lowFeeDetected":false, "amountPaid":254200, "exceptionStatus":false, "transactions":[ { "amount":254200, "confirmations":6, "receivedTime":"2019-02-22T13:05:36.481Z", "txid":"***********************", "exRates":{ "BTC":1, "USD":3933.84, "BCH":27.54789915966386 }, "outputIndex":1 } ], "buyer":{ "email":"test@example.com" }, "redirectURL":"https://google.com", "refundAddresses":[ { "********************":{ "type":"buyerSupplied", "date":"2019-02-22T14:02:59.595Z" } } ], "refundAddressRequestPending":false, "buyerProvidedEmail":"test@example.com", "buyerProvidedInfo":{ "selectedTransactionCurrency":"BTC", "emailAddress":"test@example.com" }, "paymentSubtotals":{ "BTC":254200, "BCH":7007700 }, "paymentTotals":{ "BTC":254200, "BCH":7007700 }, "exchangeRates":{ "BTC":{ "USD":3933.84, "BCH":27.54789915966386 }, "BCH":{ "USD":142.7, "BTC":0.03627950729022334 } }, "minerFees":{ "BTC":{ "satoshisPerByte":0, "totalFee":0 }, "BCH":{ "satoshisPerByte":0, "totalFee":0 } }, "transactionCurrency":"BTC", "supportedTransactionCurrencies":{ "BTC":{ "enabled":true }, "BCH":{ "enabled":true } }, "paymentCodes":{ "BTC":{ "BIP72b":"bitcoin:?r=https://test.bitpay.com/i/***************", "BIP73":"https://test.bitpay.com/i/***************" }, "BCH":{ "BIP72b":"bitcoincash:?r=https://test.bitpay.com/i/***************", "BIP73":"https://test.bitpay.com/i/***************" } }, "token":"****************" } } ```I found several useful things (for my use case, at least) missing from the invoice object. This PR adds them so that they can be used.
TxId
to invoice transaction object.ReceivedTime
to a properDateTimeOffset
type.RefundAddressRequestPending
to invoice object.RefundAddresses
array to invoice object, along with its new object class forRefundAddress
.RefundInfo
array as documented at https://bitpay.com/api#resource-InvoicesTransactionCurrency
string as documented at https://bitpay.com/api#resource-Invoices