---
title: "Reads one of the customer's 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 customer API › subscription

`GET /v1/stores/{store}/subscriptions/{subscription}`

## Authentication

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

## Path parameters

- `store` (`getSubscription.path.store`; string, required) — A hostname of the store.
- `subscription` (`getSubscription.path.subscription`; string, required)
  - minLength 1

## Code samples

### cURL

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

### TypeScript

```typescript
const url = 'https://api.sherpo.io/customer/v1/stores/<store>/subscriptions/<subscription>';
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/customer/v1/stores/<store>/subscriptions/<subscription>"

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

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

print(response.text)
```

## Responses

### 200

Reads one of the customer's subscriptions.

#### Example

```json
{
  "display_status": "string",
  "next_event": {
    "kind": "string",
    "at": "string"
  },
  "renews_on_card": true,
  "actions": {
    "cancel": {
      "period_end": true,
      "now": true
    },
    "resume": true,
    "change_plan": true
  },
  "plan_changes": [
    {
      "price_id": "string",
      "name": "string",
      "tier": {
        "id": "string",
        "product_id": "string",
        "rank": 0,
        "name": "string"
      },
      "amount": 0,
      "currency": "string",
      "exponent": 0,
      "period": {
        "unit": "string",
        "multiplier": 0
      },
      "autorenew": true
    }
  ],
  "product": {
    "id": "string",
    "slug": "string",
    "path": "string",
    "url": "string",
    "title": "string",
    "category": "string",
    "deleted": true
  },
  "plan": {
    "tier": {
      "id": "string",
      "product_id": "string",
      "rank": 0,
      "name": "string"
    },
    "id": "string",
    "price_id": "string",
    "amount": 0,
    "currency": "string",
    "exponent": 0,
    "period": {
      "unit": "string",
      "multiplier": 0
    },
    "autorenew": true
  },
  "current_period": {
    "id": "string",
    "starts_at": "string",
    "ends_at": "string",
    "status": "string",
    "lead_in": true
  },
  "next_charge": {
    "at": "string",
    "amount": 0,
    "currency": "string",
    "exponent": 0
  },
  "instrument_id": "string",
  "renews_here": true,
  "scheduled_change": {
    "plan": {
      "tier": {
        "id": "string",
        "product_id": "string",
        "rank": 0,
        "name": "string"
      },
      "id": "string",
      "price_id": "string",
      "amount": 0,
      "currency": "string",
      "exponent": 0,
      "period": {
        "unit": "string",
        "multiplier": 0
      },
      "autorenew": true
    },
    "effective_at": "string"
  },
  "id": "string",
  "product_id": "string",
  "status": "string",
  "cancel_at_period_end": true,
  "cancel_reason": "string",
  "cancel_code": "string",
  "created_at": "string",
  "ended_at": "string"
}
```

- `display_status` (`getSubscription.response.200.display_status`; string, required) — Its status as people read it: `cancelling` while it bills and is set to stop.
- `next_event` (`getSubscription.response.200.next_event`; any of, required) — What happens at the end of its latest paid period, as of the answer; null when nothing is ahead.
  - any of: `object`, `null`
- `renews_on_card` (`getSubscription.response.200.renews_on_card`; boolean, required) — Whether the store holds its saved card for its renewals: billed here, renewing and not set to stop.
- `actions` (`getSubscription.response.200.actions`; object, required) — The moves the store offers on it as of the answer, billed here and still renewing; a write still decides again.
  - `cancel` (`getSubscription.response.200.actions.cancel`; object, required)
    - `period_end` (`getSubscription.response.200.actions.cancel.period_end`; boolean, required) — Stopping at the period's end.
    - `now` (`getSubscription.response.200.actions.cancel.now`; boolean, required) — Its cancel ends it at once, every payment of it refunded.
  - `resume` (`getSubscription.response.200.actions.resume`; boolean, required) — Taking a stop back.
  - `change_plan` (`getSubscription.response.200.actions.change_plan`; boolean, required) — Scheduling another plan from `plan_changes`, or keeping the current one.
- `plan_changes` (`getSubscription.response.200.plan_changes`; array<object>, required) — The prices `changeSubscriptionPlan` schedules for it, ordered as offers are; empty unless `actions.change_plan`.
  - `price_id` (`getSubscription.response.200.plan_changes.price_id`; string, required)
  - `name` (`getSubscription.response.200.plan_changes.name`; string, required) — The price's title, else its tier's name.
  - `tier` (`getSubscription.response.200.plan_changes.tier`; object, required)
    - `id` (`getSubscription.response.200.plan_changes.tier.id`; string, required)
    - `product_id` (`getSubscription.response.200.plan_changes.tier.product_id`; string, required)
    - `rank` (`getSubscription.response.200.plan_changes.tier.rank`; number, required)
    - `name` (`getSubscription.response.200.plan_changes.tier.name`; string, required)
  - `amount` (`getSubscription.response.200.plan_changes.amount`; number, required)
  - `currency` (`getSubscription.response.200.plan_changes.currency`; string, required)
  - `exponent` (`getSubscription.response.200.plan_changes.exponent`; any of, required)
    - any of: `number`, `null`
  - `period` (`getSubscription.response.200.plan_changes.period`; object, required)
    - `unit` (`getSubscription.response.200.plan_changes.period.unit`; string, required)
    - `multiplier` (`getSubscription.response.200.plan_changes.period.multiplier`; number, required)
  - `autorenew` (`getSubscription.response.200.plan_changes.autorenew`; boolean, required) — Whether the plan it schedules renews past its first period.
- `product` (`getSubscription.response.200.product`; any of, required)
  - any of: `object`, `null`
- `plan` (`getSubscription.response.200.plan`; any of, required)
  - any of: `object`, `null`
- `current_period` (`getSubscription.response.200.current_period`; any of, required) — Its latest paid period, whose end is when the next payment is due; null when none is paid.
  - any of: `object`, `null`
- `next_charge` (`getSubscription.response.200.next_charge`; any of, required) — What its next payment charges and when, a day ahead of the period's end as every renewal is, on the plan it renews on; null unless it renews. A `current_period` that is a `lead_in` makes it the first.
  - any of: `object`, `null`
- `instrument_id` (`getSubscription.response.200.instrument_id`; any of, required) — The saved payment method its renewals charge, as `getBillingProfile` names it.
  - any of: `string`, `null`
- `renews_here` (`getSubscription.response.200.renews_here`; boolean, required) — Whether the store bills it here, so its plan and card can change.
- `scheduled_change` (`getSubscription.response.200.scheduled_change`; any of, required) — The plan it renews on from `effective_at`, the end of its paid run, as the customer scheduled; null for none.
  - any of: `object`, `null`
- `id` (`getSubscription.response.200.id`; string, required)
- `product_id` (`getSubscription.response.200.product_id`; string, required)
- `status` (`getSubscription.response.200.status`; string, required)
- `cancel_at_period_end` (`getSubscription.response.200.cancel_at_period_end`; boolean, required)
- `cancel_reason` (`getSubscription.response.200.cancel_reason`; any of, required) — Why it stops or stopped, in the seller's or the customer's own words; null when no one gave one.
  - any of: `string`, `null`
- `cancel_code` (`getSubscription.response.200.cancel_code`; any of, required) — How the store stopped it, when no one gave a reason in words: `refund` (its payments were refunded), `dispute` (a payment was disputed), `upgraded` (an upgrade replaced it), `account_erased` (the customer's account was erased) or `seller_ended` (the seller ended it); null otherwise.
  - any of: `string`, `null`
- `created_at` (`getSubscription.response.200.created_at`; any of, required)
  - any of: `string`, `null`
- `ended_at` (`getSubscription.response.200.ended_at`; any of, required)
  - any of: `string`, `null`

### default

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

#### Example

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

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


Source: https://docs.sherpo.io/customer-api/reference/get-subscription/index.md
