---
title: "List Invoice Items"
source_url: https://docs.rapyd.net/en/list-invoice-items.html
lang: en
---

# List Invoice Items

Retrieve a list of all invoice items.

You can filter the list with query parameters.

### Parameters

### Request Query Parameters

- - created
  - Date of creation of the invoice items.
- - customer
  - ID of the customer.
- - ending_before
  - The ID of the invoice item created after the last invoice item you want to retrieve.
- - invoice
  - ID of the invoice.
- - limit
  - The maximum number of invoice items to return. Range: 1-100.

    10
- - starting_after
  - The ID of the invoice item created before the first invoice item you want to retrieve.

### 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 result = RapydApiRequestSample.Utilities.MakeRequest("GET", "/v1/invoice_items?limit=5");

                      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?limit=5'
          );

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

    - ```php
      <?php
      $path .= "/<path-to-your-utility-file>/utilities.php";
      include($path);

      try {
          $object = make_request('get', "/v1/invoice_items?limit=5");
          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?limit=5')
      pprint(result)
      ```

- /v1/invoice_items

- List Invoice Items
- ```curl
  curl -X get 'https://sandboxapi.rapyd.net/v1/invoice_items?limit=5' \
  -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": "92a62c87-fad2-49be-8dc4-6023f7f7741f"
      },
      "data": [
          {
              "id": "ii_03bae0ba6b2f2d0d85b6078af82d9c04",
              "amount": 15,
              "customer": "cus_3a895204549220d7580cb20ec75db2de",
              "date": 1675946526,
              "description": "service fee",
              "discountable": false,
              "invoice": "",
              "metadata": {
                  "merchant_defined": true
              },
              "period": {
                  "start": 0,
                  "end": 0
              },
              "plan": {
                  "product": null,
                  "transform_usage": {}
              },
              "proration": 0,
              "quantity": 1,
              "subscription": "",
              "unit_amount": 15
          },
          {
              "id": "ii_5cbf768740452a4fe53c21e3758455ca",
              "amount": 1150,
              "customer": "cus_d76becaa4e0f2d0381f47fbc798137e1",
              "date": 1675856493,
              "description": "",
              "discountable": true,
              "invoice": "invoice_6abf8650aa6d4feb57724ae9d6d87625",
              "metadata": {
                  "merchant_defined": true
              },
              "period": {
                  "start": 0,
                  "end": 0
              },
              "plan": {
                  "product": null,
                  "transform_usage": {}
              },
              "proration": 0,
              "quantity": 1,
              "subscription": "",
              "unit_amount": 1150
          },
          {
              "id": "ii_bdb9694b19a14453e1a9aa8da9b996ff",
              "amount": 15,
              "customer": "cus_5bee14584a78638ba717e746be62ee01",
              "date": 1675696028,
              "description": "",
              "discountable": true,
              "invoice": "invoice_ac28a2d755d9632c377cf60813887466",
              "metadata": {
                  "merchant_defined": true
              },
              "period": {
                  "start": 0,
                  "end": 0
              },
              "plan": {
                  "product": null,
                  "transform_usage": {}
              },
              "proration": 0,
              "quantity": 1,
              "subscription": "sub_840c00bf5c86f250f15881c3add2ae5e",
              "unit_amount": 15
          },
          {
              "id": "ii_d6733ca7ee9845fb23dad902f25ab6c4",
              "amount": 15,
              "customer": "cus_5bee14584a78638ba717e746be62ee01",
              "date": 1675695499,
              "description": "",
              "discountable": true,
              "invoice": "invoice_ac28a2d755d9632c377cf60813887466",
              "metadata": {
                  "merchant_defined": true
              },
              "period": {
                  "start": 0,
                  "end": 0
              },
              "plan": {
                  "product": null,
                  "transform_usage": {}
              },
              "proration": 0,
              "quantity": 1,
              "subscription": "sub_840c00bf5c86f250f15881c3add2ae5e",
              "unit_amount": 15
          },
          {
              "id": "ii_5885610fa526632d1219c08111cc77d1",
              "amount": 1150,
              "customer": "cus_325b5edb6a897e8bd4f90c734d4b4be9",
              "date": 1674486155,
              "description": "",
              "discountable": true,
              "invoice": "invoice_61f092e4d9b5f500fa909eec13e3eddc",
              "metadata": {
                  "merchant_defined": true
              },
              "period": {
                  "start": 0,
                  "end": 0
              },
              "plan": {
                  "product": null,
                  "transform_usage": {}
              },
              "proration": 0,
              "quantity": 1,
              "subscription": "",
              "unit_amount": 1150
          }
      ]
  }
  ```
