> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Update invoice item

> Update a pending or draft Stripe invoice item.

Use `stripe.updateInvoiceItem` before its invoice closes to change pricing, quantity, description, discounts, or metadata.

```ts automations/stripe-update-invoice-item.automation.ts theme={null}
import { automation, onDashboardRun } from "automate.ax"
import { stripe } from "automate.ax/stripe"

export default automation("Update invoice item", () => {
  onDashboardRun({ title: "Update invoice item" })
  stripe.updateInvoiceItem({
    invoiceItemId: "ii_123",
    description: "Priority support",
  })
})
```

## Inputs

`invoiceItemId` is required. Stripe permits updates only while the item is pending or belongs to a draft invoice. `idempotencyKey` is optional.

## Output

Returns the updated invoice item. Stripe decimal fields such as `quantityDecimal` are lossless strings.
