---
title: "Get current subscription"
---

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

Path: Sureshake API › billing

`GET /v2/billing/subscription`

## Code samples

### cURL

```bash
curl --request GET \
  --url https://api.sureshake.com/v2/billing/subscription
```

### TypeScript

```typescript
const url = 'https://api.sureshake.com/v2/billing/subscription';
const options = {method: 'GET'};

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

### Python

```python
import requests

url = "https://api.sureshake.com/v2/billing/subscription"

response = requests.get(url)

print(response.text)
```

## Responses

### 200

Default Response

#### Example

```json
{
  "data": {
    "id": "string",
    "userId": "string",
    "status": "string",
    "planId": "string",
    "billingCycle": "string",
    "cancelAtPeriodEnd": true,
    "currentPeriodStart": "2019-08-24T14:15:22Z",
    "currentPeriodEnd": "2019-08-24T14:15:22Z",
    "trialStart": "2019-08-24T14:15:22Z",
    "trialEnd": "2019-08-24T14:15:22Z"
  },
  "meta": {
    "timestamp": "2019-08-24T14:15:22Z"
  }
}
```

- `data` (`billing-get-current-subscription.response.200.data`; object, required, nullable)
  - `id` (`billing-get-current-subscription.response.200.data.id`; string, required)
  - `userId` (`billing-get-current-subscription.response.200.data.userId`; string, required)
  - `status` (`billing-get-current-subscription.response.200.data.status`; string, required)
  - `planId` (`billing-get-current-subscription.response.200.data.planId`; string, required)
  - `billingCycle` (`billing-get-current-subscription.response.200.data.billingCycle`; string, required)
  - `cancelAtPeriodEnd` (`billing-get-current-subscription.response.200.data.cancelAtPeriodEnd`; boolean, required)
  - `currentPeriodStart` (`billing-get-current-subscription.response.200.data.currentPeriodStart`; string, required)
    - format `date-time`
  - `currentPeriodEnd` (`billing-get-current-subscription.response.200.data.currentPeriodEnd`; string, required)
    - format `date-time`
  - `trialStart` (`billing-get-current-subscription.response.200.data.trialStart`; string, required, nullable)
    - format `date-time`
  - `trialEnd` (`billing-get-current-subscription.response.200.data.trialEnd`; string, required, nullable)
    - format `date-time`
- `meta` (`billing-get-current-subscription.response.200.meta`; object, optional)
  - `timestamp` (`billing-get-current-subscription.response.200.meta.timestamp`; string, required)
    - format `date-time`

### 400

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`billing-get-current-subscription.response.400.error`; object, required)
  - `code` (`billing-get-current-subscription.response.400.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`billing-get-current-subscription.response.400.error.message`; string, required) — Human-readable error message
  - `details` (`billing-get-current-subscription.response.400.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`billing-get-current-subscription.response.400.error.traceId`; string, optional) — Unique ID for log correlation

### 401

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`billing-get-current-subscription.response.401.error`; object, required)
  - `code` (`billing-get-current-subscription.response.401.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`billing-get-current-subscription.response.401.error.message`; string, required) — Human-readable error message
  - `details` (`billing-get-current-subscription.response.401.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`billing-get-current-subscription.response.401.error.traceId`; string, optional) — Unique ID for log correlation

### 403

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`billing-get-current-subscription.response.403.error`; object, required)
  - `code` (`billing-get-current-subscription.response.403.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`billing-get-current-subscription.response.403.error.message`; string, required) — Human-readable error message
  - `details` (`billing-get-current-subscription.response.403.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`billing-get-current-subscription.response.403.error.traceId`; string, optional) — Unique ID for log correlation

### 404

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`billing-get-current-subscription.response.404.error`; object, required)
  - `code` (`billing-get-current-subscription.response.404.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`billing-get-current-subscription.response.404.error.message`; string, required) — Human-readable error message
  - `details` (`billing-get-current-subscription.response.404.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`billing-get-current-subscription.response.404.error.traceId`; string, optional) — Unique ID for log correlation

### 409

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`billing-get-current-subscription.response.409.error`; object, required)
  - `code` (`billing-get-current-subscription.response.409.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`billing-get-current-subscription.response.409.error.message`; string, required) — Human-readable error message
  - `details` (`billing-get-current-subscription.response.409.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`billing-get-current-subscription.response.409.error.traceId`; string, optional) — Unique ID for log correlation

### 500

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`billing-get-current-subscription.response.500.error`; object, required)
  - `code` (`billing-get-current-subscription.response.500.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`billing-get-current-subscription.response.500.error.message`; string, required) — Human-readable error message
  - `details` (`billing-get-current-subscription.response.500.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`billing-get-current-subscription.response.500.error.traceId`; string, optional) — Unique ID for log correlation

### 502

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`billing-get-current-subscription.response.502.error`; object, required)
  - `code` (`billing-get-current-subscription.response.502.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`billing-get-current-subscription.response.502.error.message`; string, required) — Human-readable error message
  - `details` (`billing-get-current-subscription.response.502.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`billing-get-current-subscription.response.502.error.traceId`; string, optional) — Unique ID for log correlation

### 503

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`billing-get-current-subscription.response.503.error`; object, required)
  - `code` (`billing-get-current-subscription.response.503.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`billing-get-current-subscription.response.503.error.message`; string, required) — Human-readable error message
  - `details` (`billing-get-current-subscription.response.503.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`billing-get-current-subscription.response.503.error.traceId`; string, optional) — Unique ID for log correlation


Source: https://docs.sureshake.com/reference/billing-get-current-subscription/index.md
