---
title: "Pages the billing periods of subscriptions."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.sherpo.io/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Sherpo merchant API › subscription

`GET /v1/stores/{store}/subscription_periods`

## Authentication

- `bearer`, http, header `Authorization`, scopes: `subscription:read`

## Path parameters

- `store` (`listSubscriptionPeriods.path.store`; string, required) — The store's id.

## Query parameters

- `filter` (`listSubscriptionPeriods.query.filter`; object, optional) — `filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.
- `sort` (`listSubscriptionPeriods.query.sort`; string, optional)
  - one of `"billed"`
- `direction` (`listSubscriptionPeriods.query.direction`; string, optional)
  - one of `"asc"`, `"desc"`
- `limit` (`listSubscriptionPeriods.query.limit`; integer, optional)
  - min 1; max 100
- `cursor` (`listSubscriptionPeriods.query.cursor`; string, optional)
  - maxLength 8192
- `count` (`listSubscriptionPeriods.query.count`; boolean, optional)

## Code samples

### cURL

```bash
curl --request GET \
  --url 'https://api.sherpo.io/merchant/v1/stores/<store>/subscription_periods' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.sherpo.io/merchant/v1/stores/<store>/subscription_periods';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.sherpo.io/merchant/v1/stores/<store>/subscription_periods"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

Pages the billing periods of subscriptions.

#### Example

```json
{
  "items": [
    {
      "id": "string",
      "subscription_id": "string",
      "starts_at": "string",
      "ends_at": "string",
      "status": "string",
      "lead_in": true,
      "settlement_id": "string",
      "grant_id": "string",
      "currency": "string",
      "exponent": 0,
      "amount": 0,
      "order": {
        "id": "string",
        "number": 0
      }
    }
  ],
  "cursor": "string",
  "total": 0,
  "facets": {
    "property1": {
      "property1": 0,
      "property2": 0
    },
    "property2": {
      "property1": 0,
      "property2": 0
    }
  }
}
```

- `items` (`listSubscriptionPeriods.response.200.items`; array<object>, required)
  - `id` (`listSubscriptionPeriods.response.200.items.id`; string, required)
  - `subscription_id` (`listSubscriptionPeriods.response.200.items.subscription_id`; string, required)
  - `starts_at` (`listSubscriptionPeriods.response.200.items.starts_at`; any of, required)
    - any of: `string`, `null`
  - `ends_at` (`listSubscriptionPeriods.response.200.items.ends_at`; any of, required)
    - any of: `string`, `null`
  - `status` (`listSubscriptionPeriods.response.200.items.status`; string, required)
  - `lead_in` (`listSubscriptionPeriods.response.200.items.lead_in`; boolean, required) — A first period the customer's own grant covered, charged nothing; the plan's first charge pays the next.
  - `settlement_id` (`listSubscriptionPeriods.response.200.items.settlement_id`; any of, required)
    - any of: `string`, `null`
  - `grant_id` (`listSubscriptionPeriods.response.200.items.grant_id`; any of, required)
    - any of: `string`, `null`
  - `currency` (`listSubscriptionPeriods.response.200.items.currency`; any of, required)
    - any of: `string`, `null`
  - `exponent` (`listSubscriptionPeriods.response.200.items.exponent`; any of, required)
    - any of: `number`, `null`
  - `amount` (`listSubscriptionPeriods.response.200.items.amount`; any of, required)
    - any of: `number`, `null`
  - `order` (`listSubscriptionPeriods.response.200.items.order`; any of, required)
    - any of: `object`, `null`
- `cursor` (`listSubscriptionPeriods.response.200.cursor`; any of, required)
  - any of: `string`, `null`
- `total` (`listSubscriptionPeriods.response.200.total`; number, optional)
- `facets` (`listSubscriptionPeriods.response.200.facets`; map<map<number>>, optional)

### default

A problem; see https://api.sherpo.io/merchant/docs/errors.

#### Example

```json
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "context": {},
  "reached_core": true,
  "core_answer": "string"
}
```

- `type` (`listSubscriptionPeriods.response.default.type`; string, required)
  - format `uri`
- `title` (`listSubscriptionPeriods.response.default.title`; string, required)
- `status` (`listSubscriptionPeriods.response.default.status`; integer, required)
- `detail` (`listSubscriptionPeriods.response.default.detail`; string, required)
- `code` (`listSubscriptionPeriods.response.default.code`; string, optional)
- `context` (`listSubscriptionPeriods.response.default.context`; object, optional)
- `reached_core` (`listSubscriptionPeriods.response.default.reached_core`; boolean, optional)
- `core_answer` (`listSubscriptionPeriods.response.default.core_answer`; string, optional)


Source: https://docs.sherpo.io/merchant-api/reference/list-subscription-periods/index.md
