Skip to content

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-Key optional
  • Modes: Test and live
  • Authentication: API key with the invoices:write scope
  • Since: M5

Request

Path parameters

FieldTypeDescription
idii_… IDThe invoice item ID (ii_…).

Body

This operation takes no body.

Response

200 OK with a JSON object:

FieldTypeDescription
idii_… ID
object"invoice_item"
livemodeboolean
customerIdcus_… ID
subscriptionIdsub_… ID or null
invoiceIdinv_… ID or nullThe invoice the item is on; null while it waits for the customer's next invoice.
originone of pending, invoiceinvoice: created for a draft; pending: created for the next invoice.
descriptionstring
productIdprod_… ID
priceIdprice_… ID or null
taxCategoryIdone of 9 values, e.g. electronically_supplied_service, saas, ebook (all in the OpenAPI document)
taxBehaviorone of inclusive, exclusive
quantityinteger
unitAmountmoney
amountmoneyQuantity × unit amount.
periodobject or null
prorationboolean
taxDatedate-time or nullThe date whose tax rates apply (a proration's change date).
metadataobject
createdAtdate-time
updatedAtdate-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

CodeHTTP statusWhenWhat to do
validation_failed400id isn't an invoice item ID (ii_…).Fix the fields listed in details.issues and send the request again.
resource_not_found404This 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_invalid409The 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_conflict409The item changed at the same moment; retry.Fetch the object again and retry the change.
scope_required400The 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_denied403You 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_allowed403You 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.