Skip to main content

Void Invoice

Cancels an open invoice by setting its status to void. The invoice stays on record with the date, the reason and who voided it.

HTTP Request​

  • URL: /invoices/{id}/void
  • Method: POST
  • Headers:
    • accessToken: Required. Your API access token.
    • Content-Type: application/json
  • Required scope: READ_WRITE_INVOICE

Path Parameters​

ParameterTypeDescription
idStringRequired. The ID of the invoice to void.

Request Body​

The request body is optional.

FieldTypeRequiredDescription
reasonStringNoReason for voiding the invoice.

cURL Example​

curl --location '<BASE_URL>/invoices/665f2310d5775459152d6dd8/void' \
--header 'accessToken: <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"reason": "Order cancelled by customer"
}'

Response​

  • 200 OK: The invoice was voided.
  • 400 Bad Request: The invoice ID is not valid, or the invoice is not open.
  • 401 Unauthorized: The access token is missing or invalid.
  • 403 Forbidden: The access token does not have the required scope.
  • 404 Not Found: No invoice exists with this ID.
  • 409 Conflict: The invoice was paid or changed while it was being voided. Get the invoice again and retry.

Sample JSON Response​

{
"success": true,
"message": "Invoice voided successfully",
"data": {
"id": "665f2310d5775459152d6dd8",
"entityId": "INV-1001",
"status": "void",
"voidedAt": "2026-07-14T09:02:11.204Z",
"voidedBy": { "id": "6489b2479467bbcf8c3d33aa", "name": "ERP Connector", "type": "api" },
"voidReason": "Order cancelled by customer"
}
}

Response Details​

Invoice Data​

FieldTypeDescription
successBooleanWhether the invoice was voided.
messageStringResult message.
dataObjectThe voided invoice. See Get Invoice for all fields.

Notes​

  • Only open invoices can be voided. To remove a draft invoice, use Delete Invoice.
  • After an order's invoice is voided, you can create a new invoice for that order.