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

# List Subscription Items

Retrieve a list of all subscription items for a subscription.

### Parameters

### 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).

### Request Query Parameters

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

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

### Response Parameters

- - active
  - Indicates whether the subscription item is active.
- - created
  - The time the subscription item was created, in [Unix time](https://docs.rapyd.net/en/glossary.md#UUID-945d98cf-adae-e1cf-2606-c7fae8b4a7e1_unix_time "Unix time").
- - id
  - ID of the subscription item. String starting with **subi_**.
- - metadata
  - A JSON object defined by the client. See [Metadata](https://docs.rapyd.net/en/metadata.md "Metadata").
- - plan
  - The pricing plan that defines the product and pricing structure associated with this subscription item. Cannot be a plan that is already part of the subscription. For details of the fields in the 'plan' object, see [Create Plan](https://docs.rapyd.net/en/create-plan.md "Create Plan").
- - quantity
  - The number of units of the service defined in the plan. Integer. This number can be updated during the billing cycle using [Update Subscription](https://docs.rapyd.net/en/update-subscription.md "Update Subscription") or [Update Subscription Item](https://docs.rapyd.net/en/update-subscription-item.md "Update Subscription Item").
- - subscription_id
  - ID of the subscription that this subscription item belongs to. String starting with **sub_**.

### Code Samples

- - .NET

    - ```csharp
      using System;
      using System.Text.Json;

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

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

                      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/subscription_items/sub_0de9c79c1e2beee09499dc8220493d59'
          );

          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/subscription_items/sub_0de9c79c1e2beee09499dc8220493d59');
          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/subscription_items/sub_0de9c79c1e2beee09499dc8220493d59')
      pprint(result)
      ```

- /v1/subscription_items

- List Subscription Items
- ```curl
  curl -X get 'https://sandboxapi.rapyd.net/v1/subscription_items/sub_1219e2329c4c5b26f08203d826a59d92' \
  -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": "594a6b8d-f3e1-457e-8447-7210ecc3c5f9"
      },
      "data": [
          {
              "id": "subi_41e09a78ca1a10c2aedaa7d0225fe43b",
              "created": 1761573700,
              "metadata": null,
              "quantity": 1,
              "plan": {
                  "id": "plan_4304ce1f6d347a2204711cd2d5354fa9",
                  "aggregate_usage": "sum",
                  "amount": 1500,
                  "billing_scheme": "per_unit",
                  "created_at": 1761210402,
                  "currency": "USD",
                  "interval": "month",
                  "interval_count": 2,
                  "metadata": {},
                  "product": {
                      "id": "product_88fde8f1365082b50e8f4b37127edd99",
                      "active": true,
                      "attributes": [
                          "users"
                      ],
                      "created_at": 1673509005,
                      "description": "SaaS Users",
                      "images": [
                          "64bit-encoded-image-1"
                      ],
                      "metadata": {
                          "merchant_defined": true
                      },
                      "name": "SaaS Users",
                      "package_dimensions": {
                          "height": 0,
                          "length": 0,
                          "weight": 0,
                          "width": 0
                      },
                      "shippable": false,
                      "skus": [],
                      "statement_descriptor": "Number of Users",
                      "type": "services",
                      "unit_label": "users",
                      "updated_at": 1673509005
                  },
                  "nickname": "Licenses",
                  "tiers": [],
                  "tiers_mode": "",
                  "transform_usage": {
                      "divide_by": 5,
                      "round": "up"
                  },
                  "trial_period_days": 0,
                  "usage_type": "licensed",
                  "active": true
              }
          },
          {
              "id": "subi_353e05ee1107b6ecb9f1a7661358e575",
              "created": 1761213125,
              "metadata": null,
              "quantity": 1,
              "plan": {
                  "id": "plan_9338044c6ca654abd79da7319c40b7dc",
                  "aggregate_usage": "sum",
                  "amount": 0,
                  "billing_scheme": "tiered",
                  "created_at": 1761210135,
                  "currency": "USD",
                  "interval": "month",
                  "interval_count": 2,
                  "metadata": {},
                  "product": {
                      "id": "product_88fde8f1365082b50e8f4b37127edd99",
                      "active": true,
                      "attributes": [
                          "users"
                      ],
                      "created_at": 1673509005,
                      "description": "SaaS Users",
                      "images": [
                          "64bit-encoded-image-1"
                      ],
                      "metadata": {
                          "merchant_defined": true
                      },
                      "name": "SaaS Users",
                      "package_dimensions": {
                          "height": 0,
                          "length": 0,
                          "weight": 0,
                          "width": 0
                      },
                      "shippable": false,
                      "skus": [],
                      "statement_descriptor": "Number of Users",
                      "type": "services",
                      "unit_label": "users",
                      "updated_at": 1673509005
                  },
                  "nickname": "SaaS Users",
                  "tiers": [
                      {
                          "amount": 35,
                          "up_to": 5,
                          "flat_amount": 25
                      },
                      {
                          "amount": 30,
                          "up_to": 10,
                          "flat_amount": 0
                      },
                      {
                          "amount": 25,
                          "up_to": 25,
                          "flat_amount": 0
                      },
                      {
                          "amount": 20,
                          "up_to": 100,
                          "flat_amount": 0
                      },
                      {
                          "amount": 15,
                          "up_to": 500,
                          "flat_amount": 0
                      },
                      {
                          "amount": 10,
                          "up_to": "inf",
                          "flat_amount": 0
                      }
                  ],
                  "tiers_mode": "volume",
                  "transform_usage": {
                      "divide_by": 1,
                      "round": "up"
                  },
                  "trial_period_days": 0,
                  "usage_type": "licensed",
                  "active": true
              }
          }
      ]
  }
  ```
