Cancel invoice
Cancel a sent invoice: its balance goes to zero and the client balance drops.
MCP tool invoice_ninja_write → cancel_invoice
Cancels an invoice that is Sent, Partial or Paid. The invoice balance is zeroed, the client balance drops by that amount and the status becomes Cancelled; payments already linked stay linked. Cancel does not delete the invoice and does not turn a paid invoice into a credit, which is what Reverse does in the app, so this tool does not reverse payments. A cancelled invoice cannot be sent again. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| company string | string | Company name, for accounts with several companies. Default: the company open when you signed in. |
| invoice_number string required | string | Invoice number from list_invoices or create_invoice, e.g. INV-0038. |
tools/call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "invoice_ninja_write",
"arguments": {
"operation": "cancel_invoice",
"arguments": {
"invoice_number": "invoice number"
}
}
}
} Example response
{
"content": [
{
"type": "text",
"text": "{ ... same JSON as structuredContent ... }"
}
],
"structuredContent": {
"invoice_number": "INV-0031",
"status": "cancelled",
"balance": 0,
"client": "Fenwick Ltd",
"client_balance": 0
},
"isError": false
}