# line\_item

From **Stripe API**.

- Type: `object`

## Properties

### `amount`

- Required: true
- Type: `integer`

The amount, in %s.

### `currency`

- Required: true
- Type: `string`

Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).

### `description`

- Required: false
- Type: `string`
- Nullable: true
- maxLength: `5000`

An arbitrary string attached to the object. Often useful for displaying to users.

### `discount_amounts`

- Required: false
- Type: `array`
- Nullable: true

The amount of discount calculated per discount for this line item.

### `discountable`

- Required: true
- Type: `boolean`

If true, discounts will apply to this line item. Always false for prorations.

### `discounts`

- Required: false
- Type: `array`
- Nullable: true

The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.

### `id`

- Required: true
- Type: `string`
- maxLength: `5000`

Unique identifier for the object.

### `invoice_item`

- Required: false
- Type: `string`
- maxLength: `5000`

The ID of the [invoice item](https://stripe.com/docs/api/invoiceitems) associated with this line item if any.

### `livemode`

- Required: true
- Type: `boolean`

Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.

### `metadata`

- Required: true
- Type: `object`

Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Note that for line items with `type=subscription` this will reflect the metadata of the subscription that caused the line item to be created.

### `object`

- Required: true
- Type: `string`
- Allowed values: `"line_item"`

String representing the object's type. Objects of the same type share the same value.

### `period`

- Required: true
- Type: `object`

### `price`

- Required: false
- Nullable: true

The price of the line item.

### `proration`

- Required: true
- Type: `boolean`

Whether this is a proration.

### `quantity`

- Required: false
- Type: `integer`
- Nullable: true

The quantity of the subscription, if the line item is a subscription or a proration.

### `subscription`

- Required: false
- Type: `string`
- Nullable: true
- maxLength: `5000`

The subscription that the invoice item pertains to, if any.

### `subscription_item`

- Required: false
- Type: `string`
- maxLength: `5000`

The subscription item that generated this invoice item. Left empty if the line item is not an explicit result of a subscription.

### `tax_amounts`

- Required: false
- Type: `array`

The amount of tax calculated per tax rate for this line item

### `tax_rates`

- Required: false
- Type: `array`

The tax rates which apply to the line item.

### `type`

- Required: true
- Type: `string`
- Allowed values: `"invoiceitem"`, `"subscription"`

A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`.

## JSON Schema

```json
{"properties":{"amount":{"description":"The amount, in %s.","type":"integer"},"currency":{"description":"Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).","type":"string"},"description":{"description":"An arbitrary string attached to the object. Often useful for displaying to users.","maxLength":5000,"nullable":true,"type":"string"},"discount_amounts":{"description":"The amount of discount calculated per discount for this line item.","items":{"$ref":"#/components/schemas/discounts_resource_discount_amount"},"nullable":true,"type":"array"},"discountable":{"description":"If true, discounts will apply to this line item. Always false for prorations.","type":"boolean"},"discounts":{"description":"The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.","items":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/components/schemas/discount"}],"x-expansionResources":{"oneOf":[{"$ref":"#/components/schemas/discount"}]}},"nullable":true,"type":"array"},"id":{"description":"Unique identifier for the object.","maxLength":5000,"type":"string"},"invoice_item":{"description":"The ID of the [invoice item](https://stripe.com/docs/api/invoiceitems) associated with this line item if any.","maxLength":5000,"type":"string"},"livemode":{"description":"Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.","type":"boolean"},"metadata":{"additionalProperties":{"maxLength":500,"type":"string"},"description":"Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Note that for line items with `type=subscription` this will reflect the metadata of the subscription that caused the line item to be created.","type":"object"},"object":{"description":"String representing the object's type. Objects of the same type share the same value.","enum":["line_item"],"type":"string"},"period":{"$ref":"#/components/schemas/invoice_line_item_period"},"price":{"anyOf":[{"$ref":"#/components/schemas/price"}],"description":"The price of the line item.","nullable":true},"proration":{"description":"Whether this is a proration.","type":"boolean"},"quantity":{"description":"The quantity of the subscription, if the line item is a subscription or a proration.","nullable":true,"type":"integer"},"subscription":{"description":"The subscription that the invoice item pertains to, if any.","maxLength":5000,"nullable":true,"type":"string"},"subscription_item":{"description":"The subscription item that generated this invoice item. Left empty if the line item is not an explicit result of a subscription.","maxLength":5000,"type":"string"},"tax_amounts":{"description":"The amount of tax calculated per tax rate for this line item","items":{"$ref":"#/components/schemas/invoice_tax_amount"},"type":"array"},"tax_rates":{"description":"The tax rates which apply to the line item.","items":{"$ref":"#/components/schemas/tax_rate"},"type":"array"},"type":{"description":"A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`.","enum":["invoiceitem","subscription"],"type":"string"}},"required":["amount","currency","discountable","id","livemode","metadata","object","period","proration","type"],"title":"InvoiceLineItem","type":"object","x-expandableFields":["discount_amounts","discounts","period","price","tax_amounts","tax_rates"],"x-resourceId":"line_item"}
```
