mercury_cancel_invoice
Cancel outstanding invoices with automatic customer notification if already sent. Ideal for correcting errors, disputes, or re-issuing with corrected line items. Not for paid invoices.
Instructions
Cancel an outstanding invoice. Mercury sends a cancellation notice to the customer if the invoice was already emailed.
USE WHEN: voiding an invoice that was issued in error, that the customer disputes, or that needs to be re-issued under a corrected line-item set. ALWAYS confirm with the user before calling — the customer-facing notification is automatic.
DO NOT USE: on an invoice already paid (Mercury rejects cancellation). To refund a paid invoice, refund out-of-band via the bank, then optionally update the internal note.
SIDE EFFECTS: marks the invoice as cancelled on Mercury. The customer-facing payment URL stops accepting payments. If the invoice was emailed, Mercury notifies the customer of the cancellation by email — confirm with the user before calling. The action is logged in Mercury's audit trail. Cancellation is final from the API perspective.
RETURNS: { id, status: "cancelled", ... }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| invoiceId | Yes | Invoice ID |