---
title: "Retrieve Invoice Item"
source_url: https://docs.rapyd.net/en/retrieve-invoice-item.html
lang: en
---

# Retrieve Invoice Item

Retrieve the details of an invoice item.

### Parameters

### Request Path Parameters

- - invoice_item
  - ID of the invoice item.

### Request Header Parameters

- - access_key
  - Unique access key provided by Rapyd for each authorized user.

    See [Developers](https://docs.rapyd.net/en/developers.md "Developers").
- - Content-Type
  - Indicates that the data appears in JSON format. Set to **application/json**.
- - salt
  - Random string. Recommended length: 8-16 characters.
- - signature
  - Signature calculated for each request individually.

    See [Request Signatures](https://docs.rapyd.net/en/request-signatures.md "Request Signatures").
- - timestamp
  - Timestamp for the request, in [Unix time](https://docs.rapyd.net/en/glossary.md#UUID-945d98cf-adae-e1cf-2606-c7fae8b4a7e1_unix_time "Unix time") (seconds).

### Response Parameters

- - amount
  - The amount of the total charge or credit for this item. Decimal, including the correct number of decimal places for the currency exponent, as defined in ISO 2417:2015.

    This is `quantity` times `unit_amount`. A credit is indicated by a negative number.
- - currency
  - Three-letter ISO 4217 code for the currency used in the `amount` field.
- - customer
  - ID of the customer. String starting with **cus_**.
- - date
  - The time of the charge or credit, in [Unix time](https://docs.rapyd.net/en/glossary.md#UUID-945d98cf-adae-e1cf-2606-c7fae8b4a7e1_unix_time "Unix time").
- - description
  - Description of the invoice item.
- - discountable
  - Determines whether this invoice item is subject to the discount defined in the coupon that is assigned to the customer or subscription.
- - id
  - ID of the invoice item. String starting with **ii_**.
- - invoice
  - ID of the invoice that this invoice item is assigned to. Relevant when `subscription` is not set.
- - metadata
  - A JSON object defined by the client. See [Metadata](https://docs.rapyd.net/en/metadata.md "Metadata").
- - period
  - Defines the start and end of the time period that this invoice item refers to. Relevant when the invoice item refers to more than one day. Contains the following fields:

    - - end
      - The end of the time period. [Unix time](https://docs.rapyd.net/en/glossary.md#UUID-945d98cf-adae-e1cf-2606-c7fae8b4a7e1_unix_time "Unix time").
    - - start
      - The start of the time period. [Unix time](https://docs.rapyd.net/en/glossary.md#UUID-945d98cf-adae-e1cf-2606-c7fae8b4a7e1_unix_time "Unix time").
- - plan
  - Describes the pricing structure for the invoice item. For details of the fields in the 'plan' object, see [Create Plan](https://docs.rapyd.net/en/create-plan.md "Create Plan").
- - proration
  - Indicates whether the invoice item is prorated.
- - quantity
  - Indicates the number of units charged as a single invoice item. Integer.
- - subscription
  - ID of the subscription this invoice item is assigned to. By default, the invoice item is assigned to the customer's subscription whose current billing cycle ends first. Relevant when `invoice` is not set.
- - unit_amount
  - Per-unit price of the product or service, adjusted as defined in the plan. Decimal.

### Code Samples

- - .NET

    - ```csharp
      using System;

      namespace RapydApiRequestSample
      {
          class Program
          {
              static void Main(string[] args)
              {
                  try
                  {
                      string invoiceItem = "ii_50f7127dd0f7725c6599697d971af8b8";

                      string result = RapydApiRequestSample.Utilities.MakeRequest("GET", $"/v1/invoice_items/{invoiceItem}");

                      Console.WriteLine(result);
                  }
                  catch (Exception e)
                  {
                      Console.WriteLine("Error completing request: " + e.Message);
                  }
              }
          }
      }
      ```
- - JavaScript

    - ```javascript
      const makeRequest = require('<path-to-your-utility-file>/utilities').makeRequest;

      async function main() {
        try {
          const result = await makeRequest(
            'GET',
            '/v1/invoice_items/ii_50f7127dd0f7725c6599697d971af8b8'
          );

          console.log(result);
        } catch (error) {
          console.error('Error completing request', error);
        }
      }
      ```
- - PHP

    - ```php
      <?php
      $path = $_SERVER['DOCUMENT_ROOT'];
      $path .= "/<path-to-your-utility-file>/utilities.php";
      include($path);
      try {
          $object = make_request('get', "/v1/invoice_items/ii_50f7127dd0f7725c6599697d971af8b8");
          var_dump($object);
      } catch(Exception $e) {
          echo "Error => $e";
      }
      ?>
      ```
- - Python

    - ```python
      from pprint import pprint

      from utilities import make_request

      result = make_request(method='get', path='/v1/invoice_items/ii_50f7127dd0f7725c6599697d971af8b8')
      pprint(result)
      ```

- /v1/invoice_items/:invoice_item

- Retrieve Invoice Item
- ```curl
  curl -X get 'https://sandboxapi.rapyd.net/v1/invoice_items/ii_6306f2e481aeba6cc023e32234a27cfb' \
  -H 'access_key: your-access-key-here' \
  -H 'Content-Type: application/json' \
  -H 'salt: your-random-string-here' \
  -H 'signature: your-calculated-signature-here' \
  -H 'timestamp: your-unix-timestamp-here'
  ```
- ```json
  {
      "status": {
          "error_code": "",
          "status": "SUCCESS",
          "message": "",
          "response_code": "",
          "operation_id": "76d17af0-9cf1-4458-8523-574e7c318f01"
      },
      "data": {
          "id": "ii_6306f2e481aeba6cc023e32234a27cfb",
          "amount": 1050,
          "customer": "cus_4e25112ac20e144ad073a614dc46934b",
          "date": 1763632007,
          "description": "",
          "discountable": true,
          "invoice": "",
          "metadata": {},
          "period": {
              "start": 0,
              "end": 0
          },
          "plan": {
              "product": {},
              "transform_usage": {}
          },
          "proration": 0,
          "quantity": 1,
          "subscription": "sub_4e6a0aff92659de2ad3be965d0633952",
          "unit_amount": 1050
      }
  }
  ```
