mercury_cancel_invoice
Cancel an outstanding invoice and automatically notify the customer if it was already emailed. Use for invoices issued in error, disputed, or requiring re-issuance.
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 |