> ## Documentation Index
> Fetch the complete documentation index at: https://developers.mageloyalty.com/llms.txt
> Use this file to discover all available pages before exploring further.

# getSubscriptions

> List the logged-in customer's active subscriptions.

List the customer's active subscriptions from the subscription app connected in Mage (Loop Subscriptions, Stay.ai or Skio). Use the returned `id` with [`redeemFlexibleToSubscription`](/js-sdk/subscriptions/redeem-flexible-to-subscription) or [`redeemRewardToSubscription`](/js-sdk/subscriptions/redeem-reward-to-subscription).

## Usage

```javascript theme={null}
MageSDK.getSubscriptions().then(function(resp) {
  if (resp.success) {
    console.log(resp.data.subscriptions);
  } else {
    console.log('Error:', resp.error);
  }
});
```

## Response

**success** `boolean`

Whether the request was successful.

**data.provider** `string | null`

The connected subscription app: `"loop"`, `"stay"` or `"skio"`. `null` when none is connected.

**data.subscriptions** `array`

The customer's active subscriptions. Paused and cancelled subscriptions are not included. Empty when the customer is logged out or no subscription app is connected.

**Subscription properties**

**id** `string`

The subscription ID. Pass this to the redeem methods.

**currencyCode** `string`

The subscription's currency, for example `"USD"`.

**totalPerRenewal** `number`

The price of each renewal in major currency units, including delivery.

**nextBillingDate** `string | null`

ISO date of the next order.

**interval** `string`

`"DAY"`, `"WEEK"`, `"MONTH"` or `"YEAR"`.

**intervalCount** `number`

How many intervals between orders.

**lines** `array`

The products on the subscription, each with `productTitle`, `variantTitle`, `quantity` and `isOneTimeAdded`. The first line with `isOneTimeAdded: false` is the main product.

## Sample response

```json theme={null}
{
  "success": true,
  "data": {
    "provider": "skio",
    "subscriptions": [
      {
        "id": "7d993128-2570-4386-97a8-a04e074fc7ff",
        "shopifyContractId": "147824017456",
        "status": "ACTIVE",
        "currencyCode": "USD",
        "totalPerRenewal": 49.99,
        "nextBillingDate": "2026-10-24T20:23:15.234Z",
        "interval": "MONTH",
        "intervalCount": 1,
        "lines": [
          {
            "productShopifyId": "7888863756336",
            "variantShopifyId": "42751679725616",
            "productTitle": "Coffee Subscription",
            "variantTitle": "Whole bean",
            "quantity": 1,
            "isOneTimeAdded": false
          }
        ],
        "provider": "skio"
      }
    ]
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.