# Retrieve an invoice item

Retrieves the invoice item with the given ID.

## Prerequisites

Before you can run the following code snippet, you need to call these APIs with the provided parameters to set up the prerequisite API object(s).

1. createCustomer
POST /v1/customers {"name":"Jenny Rosen","email":"jennyrosen@example.com"}
2. createPrice
POST /v1/prices {"currency":"usd","unit_amount":1000,"recurring":{"interval":"month"},"product_data":{"name":"Gold Plan"}}
3. createInvoiceitem
POST /v1/invoiceitems {"customer":"${node.prerequisites.createCustomer.createCustomer:id}","pricing":{"price":"${node.prerequisites.createPrice.createPrice:id}"}}

## Request

```curl
curl https://api.stripe.com/v1/invoiceitems/{{INVOICEITEM_ID}} \
  -u "<<YOUR_SECRET_KEY>>"
```

### Response

```json
{
  "id": "ii_1MtGUtLkdIwHu7ixBYwjAM00",
  "object": "invoiceitem",
  "amount": 1099,
  "currency": "usd",
  "customer": "cus_NeZei8imSbMVvi",
  "date": 1680640231,
  "description": "T-shirt",
  "discountable": true,
  "discounts": [],
  "invoice": null,
  "livemode": false,
  "metadata": {},
  "parent": null,
  "period": {
    "end": 1680640231,
    "start": 1680640231
  },
  "pricing": {
    "price_details": {
      "price": "price_1MtGUsLkdIwHu7ix1be5Ljaj",
      "product": "prod_NeZe7xbBdJT8EN"
    },
    "type": "price_details",
    "unit_amount_decimal": "1099"
  },
  "proration": false,
  "quantity": 1,
  "quantity_decimal": "1",
  "tax_rates": [],
  "test_clock": null
}
```

## Returns

Returns an invoice item if a valid invoice item ID was provided. Raises [an error](https://docs.stripe.com/api/invoiceitems/retrieve.md#errors) otherwise.
