---
title: "Create checkout session"
---

> 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

`POST /v2/billing/checkout`

## Request body

_Required._

- `planId` (`billing-create-checkout-session.planId`; string, required)
  - one of `"individual_starter"`, `"individual_professional"`, `"individual_enterprise"`, `"business_startup"`, `"business_growth"`, `"business_enterprise"`, `"reputation_score"`
- `billingCycle` (`billing-create-checkout-session.billingCycle`; string, required)
  - one of `"monthly"`, `"quarterly"`, `"annual"`
- `entityId` (`billing-create-checkout-session.entityId`; string, optional)
  - format `uuid`
- `successUrl` (`billing-create-checkout-session.successUrl`; string, optional)
  - format `uri`
- `cancelUrl` (`billing-create-checkout-session.cancelUrl`; string, optional)
  - format `uri`

## Example request

```json
{
  "planId": "individual_starter",
  "billingCycle": "monthly",
  "entityId": "156e622c-6cdf-4c27-9bc9-2f2db69919f5",
  "successUrl": "http://example.com",
  "cancelUrl": "http://example.com"
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url https://api.sureshake.com/v2/billing/checkout \
  --header 'Content-Type: application/json' \
  --data '
{
  "planId": "individual_starter",
  "billingCycle": "monthly",
  "entityId": "156e622c-6cdf-4c27-9bc9-2f2db69919f5",
  "successUrl": "http://example.com",
  "cancelUrl": "http://example.com"
}
'
```

### TypeScript

```typescript
const url = 'https://api.sureshake.com/v2/billing/checkout';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({
    planId: 'individual_starter',
    billingCycle: 'monthly',
    entityId: '156e622c-6cdf-4c27-9bc9-2f2db69919f5',
    successUrl: 'http://example.com',
    cancelUrl: 'http://example.com'
  })
};

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/checkout"

payload = {
    "planId": "individual_starter",
    "billingCycle": "monthly",
    "entityId": "156e622c-6cdf-4c27-9bc9-2f2db69919f5",
    "successUrl": "http://example.com",
    "cancelUrl": "http://example.com"
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 201

Default Response

#### Example

```json
{
  "data": {
    "id": "string",
    "url": "http://example.com",
    "expiresAt": 0,
    "planId": "individual_starter",
    "billingCycle": "monthly"
  },
  "meta": {
    "timestamp": "2019-08-24T14:15:22Z"
  }
}
```

- `data` (`billing-create-checkout-session.response.201.data`; object, required)
  - `id` (`billing-create-checkout-session.response.201.data.id`; string, required)
  - `url` (`billing-create-checkout-session.response.201.data.url`; string, required)
    - format `uri`
  - `expiresAt` (`billing-create-checkout-session.response.201.data.expiresAt`; number, required, nullable)
  - `planId` (`billing-create-checkout-session.response.201.data.planId`; string, required)
    - one of `"individual_starter"`, `"individual_professional"`, `"individual_enterprise"`, `"business_startup"`, `"business_growth"`, `"business_enterprise"`, `"reputation_score"`
  - `billingCycle` (`billing-create-checkout-session.response.201.data.billingCycle`; string, required)
    - one of `"monthly"`, `"quarterly"`, `"annual"`
- `meta` (`billing-create-checkout-session.response.201.meta`; object, optional)
  - `timestamp` (`billing-create-checkout-session.response.201.meta.timestamp`; string, required)
    - format `date-time`

### 400

Default Response

#### Example

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

- `error` (`billing-create-checkout-session.response.400.error`; object, required)
  - `code` (`billing-create-checkout-session.response.400.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`billing-create-checkout-session.response.400.error.message`; string, required) — Human-readable error message
  - `details` (`billing-create-checkout-session.response.400.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`billing-create-checkout-session.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-create-checkout-session.response.401.error`; object, required)
  - `code` (`billing-create-checkout-session.response.401.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`billing-create-checkout-session.response.401.error.message`; string, required) — Human-readable error message
  - `details` (`billing-create-checkout-session.response.401.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`billing-create-checkout-session.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-create-checkout-session.response.403.error`; object, required)
  - `code` (`billing-create-checkout-session.response.403.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`billing-create-checkout-session.response.403.error.message`; string, required) — Human-readable error message
  - `details` (`billing-create-checkout-session.response.403.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`billing-create-checkout-session.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-create-checkout-session.response.404.error`; object, required)
  - `code` (`billing-create-checkout-session.response.404.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`billing-create-checkout-session.response.404.error.message`; string, required) — Human-readable error message
  - `details` (`billing-create-checkout-session.response.404.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`billing-create-checkout-session.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-create-checkout-session.response.409.error`; object, required)
  - `code` (`billing-create-checkout-session.response.409.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`billing-create-checkout-session.response.409.error.message`; string, required) — Human-readable error message
  - `details` (`billing-create-checkout-session.response.409.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`billing-create-checkout-session.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-create-checkout-session.response.500.error`; object, required)
  - `code` (`billing-create-checkout-session.response.500.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`billing-create-checkout-session.response.500.error.message`; string, required) — Human-readable error message
  - `details` (`billing-create-checkout-session.response.500.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`billing-create-checkout-session.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-create-checkout-session.response.502.error`; object, required)
  - `code` (`billing-create-checkout-session.response.502.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`billing-create-checkout-session.response.502.error.message`; string, required) — Human-readable error message
  - `details` (`billing-create-checkout-session.response.502.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`billing-create-checkout-session.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-create-checkout-session.response.503.error`; object, required)
  - `code` (`billing-create-checkout-session.response.503.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`billing-create-checkout-session.response.503.error.message`; string, required) — Human-readable error message
  - `details` (`billing-create-checkout-session.response.503.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`billing-create-checkout-session.response.503.error.traceId`; string, optional) — Unique ID for log correlation


Source: https://docs.sureshake.com/reference/billing-create-checkout-session/index.md
