Delete an invoice
⚠️ Cancellation will require EITHER an SMS or E-mail to have already been set if the invoice has proceeded to the point where it may have
been paid.
DELETE /invoices/:invoiceId
Facades POS
MERCHANT
HTTP Request
Headers
Invoice cancelInvoice = bitpay.CancelInvoice(invoice.Id).Result;
HTTP Response
Field | Description | Type |
---|---|---|
isCancelled | Indicates whether or not the invoice was cancelled explicitly (vs expiring or being decline for other reasons) | string |
Error Scenarios & Format:
Field | Description | Type |
---|---|---|
status | will be “error” in an error scenario | string |
code | six digit code that maps to an error on BitPay’s side | string |
data | will be null in an error scenario | string |
message | error message pertaining to the specific error | string |
{
"status": "error",
"code": "040107",
"data": null,
"error": "Invalid invoice state for cancel"
}