# Standardizes invoice line item IDs

## What’s new

Changes the [id](https://docs.stripe.com/api/invoice-line-item/object.md?api-version=2024-06-20#invoice_line_item_object-id) field of all invoice line items, prefixing them with `il_`. The new ID has consistent prefixes across all line items, is globally unique, and can be used for pagination. Old prefixes included `sub_`, `su_`, `item_`, `sli_`, and `ii_` and weren`t globally unique.

- You can no longer use the prefix of the ID to determine the source of the line item. Instead use the `type` field for this purpose.
- For lines with `type=invoiceitem`, use the `invoice_item` field to reference or update the originating `Invoice Item` object.
- On earlier API versions, the `Invoice Line Item` object also has a `unique_id` field that you can use to migrate internal references before upgrading to this version.
- When [setting a tax rate to individual line items](https://docs.stripe.com/invoicing/taxes/tax-rates.md#setting-tax-rates-on-individual-items), use the new `id`. If you’re on an earlier API version, pass in either a line item `id` or `unique_id`.

## Impact

Lets you work with a more consistent and globally unique invoice line item ID format. The new IDs are prefixed with “il_” instead of various legacy prefixes, providing a standardized approach across all line items.

## Changes

#### REST API

| Parameter | Change | Resources or endpoints |
| --- | --- | --- |
| `id` | Changed | [InvoiceLineItem](/api/invoice-line-item/object?api-version=2024-06-20) |

#### Ruby

| Parameters | Change | Resources or methods |
| --- | --- | --- |
| `invoice_line_item_unique_id` | Removed | [CreditNoteLineItem](/api/credit_notes/line_item?api-version=2024-06-20) |
| `unique_id` | Removed | [InvoiceLineItem](/api/invoice-line-item/object?api-version=2024-06-20) |

#### Python

| Parameters | Change | Resources or methods |
| --- | --- | --- |
| `invoice_line_item_unique_id` | Removed | [CreditNoteLineItem](/api/credit_notes/line_item?api-version=2024-06-20) |
| `unique_id` | Removed | [InvoiceLineItem](/api/invoice-line-item/object?api-version=2024-06-20) |

#### PHP

| Parameters | Change | Resources or methods |
| --- | --- | --- |
| `invoice_line_item_unique_id` | Removed | [CreditNoteLineItem](/api/credit_notes/line_item?api-version=2024-06-20) |
| `unique_id` | Removed | [InvoiceLineItem](/api/invoice-line-item/object?api-version=2024-06-20) |

#### Java

| Parameters | Change | Resources or methods |
| --- | --- | --- |
| `invoiceLineItemUniqueId` | Removed | [CreditNoteLineItem](/api/credit_notes/line_item?api-version=2024-06-20) |
| `uniqueId` | Removed | [InvoiceLineItem](/api/invoice-line-item/object?api-version=2024-06-20) |

#### Node.js

| Parameters | Change | Resources or methods |
| --- | --- | --- |
| `invoice_line_item_unique_id` | Removed | [CreditNoteLineItem](/api/credit_notes/line_item?api-version=2024-06-20) |
| `unique_id` | Removed | [InvoiceLineItem](/api/invoice-line-item/object?api-version=2024-06-20) |

#### Go

| Parameters | Change | Resources or methods |
| --- | --- | --- |
| `InvoiceLineItemUniqueID` | Removed | [CreditNoteLineItem](/api/credit_notes/line_item?api-version=2024-06-20) |
| `UniqueID` | Removed | [InvoiceLineItem](/api/invoice-line-item/object?api-version=2024-06-20) |

#### .NET

| Parameters | Change | Resources or methods |
| --- | --- | --- |
| `InvoiceLineItemUniqueId` | Removed | [CreditNoteLineItem](/api/credit_notes/line_item?api-version=2024-06-20) |
| `UniqueId` | Removed | [InvoiceLineItem](/api/invoice-line-item/object?api-version=2024-06-20) |

## Upgrade

#### REST API

1. [View your current API version](https://docs.stripe.com/upgrades.md#view-your-api-version-and-the-latest-available-upgrade-in-workbench) in Workbench.
2. If you use an SDK, upgrade to the corresponding SDK version for this API version.
   - If you don’t use an SDK, update your [API requests](https://docs.stripe.com/api/versioning.md) to include `Stripe-Version: 2019-12-03`
3. Upgrade the API version used for [webhook endpoints](https://docs.stripe.com/webhooks/versioning.md).
4. [Test your integration](https://docs.stripe.com/testing.md) against the new version.
5. If you use Connect, [test your Connect integration](https://docs.stripe.com/connect/testing.md).
6. In Workbench, [perform the upgrade](https://docs.stripe.com/upgrades.md#perform-the-upgrade). You can [roll back the version](https://docs.stripe.com/upgrades.md#roll-back-your-api-version) for 72 hours.

Learn more about [Stripe API upgrades](https://docs.stripe.com/upgrades.md).

#### Ruby

1. [View your current API version](https://docs.stripe.com/upgrades.md#view-your-api-version-and-the-latest-available-upgrade-in-workbench) in Workbench.
2. Upgrade your Ruby SDK to the latest version.
3. Upgrade the API version used for [webhook endpoints](https://docs.stripe.com/webhooks/versioning.md).
4. [Test your integration](https://docs.stripe.com/testing.md) against the new version.
5. If you use Connect, [test your Connect integration](https://docs.stripe.com/connect/testing.md).
6. In Workbench, [perform the upgrade](https://docs.stripe.com/upgrades.md#perform-the-upgrade). You can [roll back the version](https://docs.stripe.com/upgrades.md#roll-back-your-api-version) for 72 hours.

Learn more about [Stripe API upgrades](https://docs.stripe.com/upgrades.md).

#### Python

1. [View your current API version](https://docs.stripe.com/upgrades.md#view-your-api-version-and-the-latest-available-upgrade-in-workbench) in Workbench.
2. Upgrade your Python SDK to the latest version.
3. Upgrade the API version used for [webhook endpoints](https://docs.stripe.com/webhooks/versioning.md).
4. [Test your integration](https://docs.stripe.com/testing.md) against the new version.
5. If you use Connect, [test your Connect integration](https://docs.stripe.com/connect/testing.md).
6. In Workbench, [perform the upgrade](https://docs.stripe.com/upgrades.md#perform-the-upgrade). You can [roll back the version](https://docs.stripe.com/upgrades.md#roll-back-your-api-version) for 72 hours.

Learn more about [Stripe API upgrades](https://docs.stripe.com/upgrades.md).

#### PHP

1. [View your current API version](https://docs.stripe.com/upgrades.md#view-your-api-version-and-the-latest-available-upgrade-in-workbench) in Workbench.
2. Upgrade your PHP SDK to the latest version.
3. Upgrade the API version used for [webhook endpoints](https://docs.stripe.com/webhooks/versioning.md).
4. [Test your integration](https://docs.stripe.com/testing.md) against the new version.
5. If you use Connect, [test your Connect integration](https://docs.stripe.com/connect/testing.md).
6. In Workbench, [perform the upgrade](https://docs.stripe.com/upgrades.md#perform-the-upgrade). You can [roll back the version](https://docs.stripe.com/upgrades.md#roll-back-your-api-version) for 72 hours.

Learn more about [Stripe API upgrades](https://docs.stripe.com/upgrades.md).

#### Java

1. [View your current API version](https://docs.stripe.com/upgrades.md#view-your-api-version-and-the-latest-available-upgrade-in-workbench) in Workbench.
2. Upgrade your Java SDK to the latest version.
3. Upgrade the API version used for [webhook endpoints](https://docs.stripe.com/webhooks/versioning.md).
4. [Test your integration](https://docs.stripe.com/testing.md) against the new version.
5. If you use Connect, [test your Connect integration](https://docs.stripe.com/connect/testing.md).
6. In Workbench, [perform the upgrade](https://docs.stripe.com/upgrades.md#perform-the-upgrade). You can [roll back the version](https://docs.stripe.com/upgrades.md#roll-back-your-api-version) for 72 hours.

Learn more about [Stripe API upgrades](https://docs.stripe.com/upgrades.md).

#### Node.js

1. [View your current API version](https://docs.stripe.com/upgrades.md#view-your-api-version-and-the-latest-available-upgrade-in-workbench) in Workbench.
2. Upgrade your Node SDK to the latest version.
3. Upgrade the API version used for [webhook endpoints](https://docs.stripe.com/webhooks/versioning.md).
4. [Test your integration](https://docs.stripe.com/testing.md) against the new version.
5. If you use Connect, [test your Connect integration](https://docs.stripe.com/connect/testing.md).
6. In Workbench, [perform the upgrade](https://docs.stripe.com/upgrades.md#perform-the-upgrade). You can [roll back the version](https://docs.stripe.com/upgrades.md#roll-back-your-api-version) for 72 hours.

Learn more about [Stripe API upgrades](https://docs.stripe.com/upgrades.md).

#### Go

1. [View your current API version](https://docs.stripe.com/upgrades.md#view-your-api-version-and-the-latest-available-upgrade-in-workbench) in Workbench.
2. Upgrade your Go SDK to the latest version.
3. Upgrade the API version used for [webhook endpoints](https://docs.stripe.com/webhooks/versioning.md).
4. [Test your integration](https://docs.stripe.com/testing.md) against the new version.
5. If you use Connect, [test your Connect integration](https://docs.stripe.com/connect/testing.md).
6. In Workbench, [perform the upgrade](https://docs.stripe.com/upgrades.md#perform-the-upgrade). You can [roll back the version](https://docs.stripe.com/upgrades.md#roll-back-your-api-version) for 72 hours.

Learn more about [Stripe API upgrades](https://docs.stripe.com/upgrades.md).

#### .NET

1. [View your current API version](https://docs.stripe.com/upgrades.md#view-your-api-version-and-the-latest-available-upgrade-in-workbench) in Workbench.
2. Upgrade your .NET SDK to the latest version.
3. Upgrade the API version used for [webhook endpoints](https://docs.stripe.com/webhooks/versioning.md).
4. [Test your integration](https://docs.stripe.com/testing.md) against the new version.
5. If you use Connect, [test your Connect integration](https://docs.stripe.com/connect/testing.md).
6. In Workbench, [perform the upgrade](https://docs.stripe.com/upgrades.md#perform-the-upgrade). You can [roll back the version](https://docs.stripe.com/upgrades.md#roll-back-your-api-version) for 72 hours.

Learn more about [Stripe API upgrades](https://docs.stripe.com/upgrades.md).
