Update an invoice
Update an invoice — only the fields you send change. Changing the line items recalculates the amount, and a changed amount clears the existing payment link.
PATCH
https://api.centerfy.ai/webhooks/inbound/invoices/:id Headers
| Header | Required | Value | Description |
|---|---|---|---|
x-api-key | Yes | your sub-account API key (cfy_…) | Authenticates the request; or use Authorization: Bearer <key>. |
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | Yes | The invoice id. |
Body parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
contact_id | string (uuid) | No | — | Bill a different contact in this sub-account. |
items | { item, quantity, amount }[] | No | — | Replaces all line items. Line items (1–200). item: non-empty string; quantity: integer ≥ 1; amount: unit price, number ≥ 0.01. The total is the sum of amount × quantity, rounded to cents. |
due_date | string (YYYY-MM-DD) | No | — | New due date. |
notes | string | null | No | — | Notes; null or empty clears them. |
status | string | No | — | One of pending, void, refunded. Use Mark an invoice paid to set paid. |
Request body
{
"status": "void"
}Example
curl -X PATCH "https://api.centerfy.ai/webhooks/inbound/invoices/{id}" \
-H "x-api-key: $CENTERFY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"status": "void"
}' import { CenterfyClient } from "@centerfy/sdk";
const centerfy = new CenterfyClient({ apiKey: process.env.CENTERFY_API_KEY! });
const result = await centerfy.invoices.update("<invoiceId>", {
"status": "void"
});
console.log(result); centerfy invoices update <invoiceId> '{"status":"void"}' MCP tool: centerfy_invoices_update (see MCP server)
Response
{
"status": "success",
"invoice": {
"id": "e1f2a3b4-c5d6-4e7f-8a9b-0c1d2e3f4a5b",
"invoice_number": "INV-2026-0012",
"contact_id": "3f1c2a9e-7b4d-4c8a-9e2f-1a2b3c4d5e6f",
"quote_id": null,
"amount": 1575,
"status": "void",
"issued_at": "2026-10-06T10:00:00.000Z",
"due_date": "2026-11-05",
"paid_at": null,
"payment_method": null,
"notes": "Net 30",
"items": [
{
"item": "Website redesign",
"quantity": 1,
"amount": 1500
},
{
"item": "Monthly hosting",
"quantity": 3,
"amount": 25
}
],
"payment_url": null,
"payment_link_expires_at": null,
"created_at": "2026-10-06T10:00:00.000Z",
"updated_at": "2026-10-06T10:00:00.000Z"
},
"payment_link_cleared": false
}Errors
400— if nothing to update, contact_id is not a UUID, an item is invalid or due_date is not a valid date.409— if you try to set a paid invoice back to pending.404— if the invoice or contact is not in this sub-account.
Notes
payment_link_cleared is true when a changed amount removed an existing payment link.