# Subscription List

Use the `subscriptions` query to retrieve a list of available subscriptions for a given user.

### Available Fields

<table data-header-hidden><thead><tr><th>Field</th><th width="159.33333333333331">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>Field</strong></td><td><strong>Type</strong></td><td><strong>Description</strong></td></tr><tr><td><code>id</code></td><td>String</td><td>Unique subscription ID</td></tr><tr><td><code>databaseId</code></td><td>String</td><td>Unique subscription database ID</td></tr><tr><td><code>name</code></td><td>String</td><td>Subscription name</td></tr><tr><td><code>isActive</code></td><td>String</td><td>True if the subscription is active. Otherwise, false</td></tr><tr><td><code>billingPeriod</code></td><td>Enum</td><td>Possible Values: <code>MONTH</code>, <code>ONCE</code>, <code>TRI_MONTH</code>, <code>YEAR</code></td></tr><tr><td><code>duration</code></td><td>SubscriptionDuation</td><td>Possible Values: <code>FOREVER</code>, <code>MONTH</code>, <code>TRI_MONTH</code>, <code>YEAR</code></td></tr><tr><td><code>totalPrice</code></td><td>Int</td><td>Subscription total price</td></tr><tr><td><code>periodPrice</code></td><td>Int</td><td>Subscription period price</td></tr><tr><td><code>trialPeriodDays</code></td><td>Int</td><td>Number of left trial days</td></tr></tbody></table>

## Example

{% tabs %}
{% tab title="Query" %}

```graphql
{
  subscriptions {
    edges {
      node {
        id
        name
        isActive
        billingPeriod
        duration
        totalPrice
        periodPrice
        appleId
        googleplaySku
        trialPeriodDays
        isRecurring
        databaseId
      }
    }
  }
}
```

{% endtab %}

{% tab title="Response" %}

```graphql
{
  "data": {
    "subscriptions": {
      "edges": [
        {
          "node": {
            "id": "U3Vic2NyaXB0aW9uOmViNjNlYzlmLWNlYzQtNGM1Mi05ZDAyLWFkYzI5YzA4NzUxYQ==",
            "name": "Yearly with 50% discount",
            "isActive": true,
            "billingPeriod": "ONCE",
            "duration": "YEAR",
            "totalPrice": 4999,
            "periodPrice": 4999,
            "appleId": null,
            "googleplaySku": null,
            "trialPeriodDays": -1,
            "isRecurring": false,
            "databaseId": "eb63ec9f-cec4-4c52-9d02-adc29c08751a"
          }
        },
        {
          "node": {
            "id": "U3Vic2NyaXB0aW9uOjYzMDM0ZDIyLWJjYWYtNGUxZC05NmFkLTdkY2EwMWNiMTViYQ==",
            "name": "Admin Subscription",
            "isActive": true,
            "billingPeriod": "MONTH",
            "duration": "MONTH",
            "totalPrice": 0,
            "periodPrice": 0,
            "appleId": "",
            "googleplaySku": null,
            "trialPeriodDays": -1,
            "isRecurring": false,
            "databaseId": "63034d22-bcaf-4e1d-96ad-7dca01cb15ba"
          }
        },
        {
          "node": {
            "id": "U3Vic2NyaXB0aW9uOjdmOWY1ZDBhLWE3ZWUtNDFhNy1hMjlhLTE0NGJhNDJlN2QzYg==",
            "name": "KetoChallenge50Off",
            "isActive": true,
            "billingPeriod": "YEAR",
            "duration": "YEAR",
            "totalPrice": 4995,
            "periodPrice": 4995,
            "appleId": "",
            "googleplaySku": null,
            "trialPeriodDays": -1,
            "isRecurring": false,
            "databaseId": "7f9f5d0a-a7ee-41a7-a29a-144ba42e7d3b"
          }
        }
      ]
    }
  }
}
```

{% endtab %}
{% endtabs %}

## Update
