Delete an invoice item
The invoice_items.delete operation: DELETE /api/v1/invoice_items/{id} in the REST API and the invoice_items_delete tool in the MCP server.
DELETE
/api/v1/invoice_items/{id}Deletes an invoice item that isn't billed yet: a pending item, or a line of a draft. Items of a finalized or voided invoice are part of its record and stay. Returns the deleted item.
At a glance
- REST:
DELETE /api/v1/invoice_items/{id} - MCP tool:
invoice_items_delete - Operation ID:
invoice_items.delete - Scope: Brand
- Permission:
invoices:write - Risk tier:
write - Dry run: Supported (send
Ownrecord-Dry-Run: true) - Idempotency:
Idempotency-Keyoptional - Modes: Test and live
- Authentication: API key with the
invoices:writescope - Since: M5
Request
Path parameters
| Field | Type | Description |
|---|---|---|
id | ii_… ID | The invoice item ID (ii_…). |
Body
This operation takes no body.
Response
200 OK with a JSON object:
| Field | Type | Description |
|---|---|---|
id | ii_… ID | |
object | "invoice_item" | |
livemode | boolean | |
customerId | cus_… ID | |
subscriptionId | sub_… ID or null | |
invoiceId | inv_… ID or null | The invoice the item is on; null while it waits for the customer's next invoice. |
origin | one of pending, invoice | invoice: created for a draft; pending: created for the next invoice. |
description | string | |
productId | prod_… ID | |
priceId | price_… ID or null | |
taxCategoryId | one of 9 values, e.g. electronically_supplied_service, saas, ebook (all in the OpenAPI document) | |
taxBehavior | one of inclusive, exclusive | |
quantity | integer | |
unitAmount | money | |
amount | money | Quantity × unit amount. |
period | object or null | |
proration | boolean | |
taxDate | date-time or null | The date whose tax rates apply (a proration's change date). |
metadata | object | |
createdAt | date-time | |
updatedAt | date-time |
Examples
Remove a line from a draft
HTTP
DELETE /api/v1/invoice_items/ii_01m4tx5nj8emwbyf7y9vcf47ys
Authorization: Bearer or_test_…
Response (200):
JSON
{
"id": "ii_01m4tx5nj8emwbyf7y9vcf47ys",
"object": "invoice_item",
"livemode": false,
"customerId": "cus_01m4tx5nj8emwbyf7y9vcf47ym",
"subscriptionId": null,
"invoiceId": "inv_01m4tx5nj8emwbyf7y9vcf47yk",
"origin": "invoice",
"description": "Implementation workshop (days)",
"productId": "prod_01m4tx5nj8emwbyf7y9vcf47yr",
"priceId": null,
"taxCategoryId": "consulting_remote",
"taxBehavior": "exclusive",
"quantity": 2,
"unitAmount": {
"amount": "600000000",
"currency": "EUR"
},
"amount": {
"amount": "1200000000",
"currency": "EUR"
},
"period": null,
"proration": false,
"taxDate": null,
"metadata": {},
"createdAt": "2026-10-20T08:30:00.000Z",
"updatedAt": "2026-10-20T08:30:00.000Z"
}
Errors
| Code | HTTP status | When | What to do |
|---|---|---|---|
validation_failed | 400 | id isn't an invoice item ID (ii_…). | Fix the fields listed in details.issues and send the request again. |
resource_not_found | 404 | This brand has no such invoice item in this mode. | Check the ID and that your credentials are scoped to the right organization, entity, brand and mode. |
invoice_status_invalid | 409 | The item is on a finalized or voided invoice: it's part of that invoice's record. | Check the invoice's status (details.status) and what it still allows (details.allowed_actions). Drafts are edited and finalized; open invoices are sent, paid, voided or marked uncollectible; paid and void invoices don't change (corrections are credit notes). |
version_conflict | 409 | The item changed at the same moment; retry. | Fetch the object again and retry the change. |
scope_required | 400 | The request names no brand (an org or entity key without Ownrecord-Brand). | Call the operation with credentials or a target at its level: an organization, a legal entity, a brand or the platform (details.required_scope). |
permission_denied | 403 | You can't change this brand's invoices (invoices:write: finance, owners and admins). | Ask an organization owner or admin for a role or scope that allows this action. |
livemode_not_allowed | 403 | You have no live-mode access, so you can't use live invoices. | Use test mode, or credentials for the target's mode. Developers need live access granted by an organization owner or admin. |
It can also return these common errors: api_version_unsupported, invalid_json, unsupported_media_type, authentication_required, api_key_invalid, idempotency_key_reused, idempotency_in_progress, approval_required, approval_rejected, approval_expired, stale_approval, approval_policy_denied, rate_limited, internal_error.