delete_invoice
Permanently delete an invoice. IRREVERSIBLE — NEVER call without explicit user confirmation for this specific invoice. Deleting is NOT the same as cancelling: to keep the invoice as history, use update_invoice with status "cancelled" instead, and offer that alternative to the user first. Money survives: wallet transactions and Sweeppea commissions from a paid invoice are NEVER deleted. Requires the Invoices module enabled — on 403 "module is not enabled", do NOT retry; tell the user to contact Sweeppea support.
delete_invoice
When to use
Permanently delete an invoice. IRREVERSIBLE — NEVER call without explicit user confirmation for this specific invoice. Deleting is NOT the same as cancelling: to keep the invoice as history, use update_invoice with status "cancelled" instead, and offer that alternative to the user first. Money survives: wallet transactions and Sweeppea commissions from a paid invoice are NEVER deleted. Requires the Invoices module enabled — on 403 "module is not enabled", do NOT retry; tell the user to contact Sweeppea support.
Pre-calls required
get_invoice— confirm which invoice is being deleted and show the user its InvoiceNumber and status
Parameters to validate before calling
invoice_token(string, required) — The invoice token (UUID v4) of the invoice to delete
Notes
DESTRUCTIVE — IRREVERSIBLE. Always confirm with the user before calling. Explain what will be lost.
NOT the same as cancelling — offer update_invoice with status "cancelled" first (keeps the invoice as history)
Wallet transactions and Sweeppea commissions from a paid invoice are NEVER deleted
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | Yes | Must be true. Set it ONLY after the user explicitly confirmed THIS deletion in this conversation, having been told what is lost: the invoice and its history (cancelling with update_invoice keeps it). Never assume, never carry a confirmation over from a previous item, never set it to satisfy the schema. | |
| invoice_token | Yes | The invoice token (UUID v4) of the invoice to delete |