Cancel Invoice

Cancel invoice endpoint allows you to cancel an invoice when it is still being processed. Invoices can only be canceled when they are in certain selected statuses.

Headers

  • X-request-id: For example 48855846-628d-4177-b071-80332a116f0a
  • Authorization: Bearer bearerToken

bearerToken is the Authorization token that belongs to the account created

i.e. Bearer d49e7fd4-2600-4dd4-a572-118668febbe7

see this section to generate your bearerToken

Canceling an invoice

-- Example request: POST /v1.2/invoices/36612/cancel to cancel invoice with id 36612
POST /v1.2/invoices/{{invoiceId}}/cancel
-- Example response when invoice with id 36612 is cancelled successfully 
{
  "id": 36612,
  "amount": {
    "number": 30.0,
    "currency": "USD"
  },
  "status": "Cancelled",
  "requestId": "353d99be-2add-43e3-a6f4-7c80ce5df031",
  "exchangeRate": {
    "rate": 0.80554,
    "toAmount": 24.17,
    "fromAmount": 30.0,
    "toCurrency": "EUR",
    "fromCurrency": "USD"
  }
}

Note: Invoices cannot be cancelled if they are in following statuses: Claimed, MarkAsPaid, Cancelled, or Closed. If the invoice cannot be cancelled, a response code and a reason will be returned in response body.