---
title: "Switches the business's plan to the one a preview quoted: now, charged at once at the quoted amount and applied only once paid, or from the period's end. A charge the card holder must confirm answers what to confirm it with. Not past a plan held for good, nor to Lite over its limits. Only a member with full access switches."
---

> 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 › organization

`POST /v1/stores/{store}/organization/plan/change`

## Authentication

- `bearer`, http, header `Authorization`, scopes: `organization:write`

## Path parameters

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

## Request body

_Required._

- `key` (`changePlan.key`; string, required) — The plan to switch to, as previewed.
  - one of `"lite_monthly"`, `"lite_yearly"`, `"pro_monthly"`, `"pro_yearly"`
- `quote` (`changePlan.quote`; string, required) — The quote `previewPlanChange` answered, whose amount is the one charged.
  - maxLength 4096

## Example request

```json
{
  "key": "lite_monthly",
  "quote": "string"
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url 'https://api.sherpo.io/merchant/v1/stores/<store>/organization/plan/change' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "key": "lite_monthly",
  "quote": "string"
}
'
```

### TypeScript

```typescript
const url = 'https://api.sherpo.io/merchant/v1/stores/<store>/organization/plan/change';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({key: 'lite_monthly', quote: 'string'})
};

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>/organization/plan/change"

payload = {
    "key": "lite_monthly",
    "quote": "string"
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

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

print(response.text)
```

## Responses

### 200

Switches the business's plan to the one a preview quoted: now, charged at once at the quoted amount and applied only once paid, or from the period's end. A charge the card holder must confirm answers what to confirm it with. Not past a plan held for good, nor to Lite over its limits. Only a member with full access switches.

#### Example

```json
{
  "plan": {
    "plan": "string",
    "name": "string",
    "tier": "string",
    "price_ref": "string",
    "interval": "string",
    "quantity": 0,
    "scheduled_quantity": 0,
    "scheduled_plan": "string",
    "scheduled_price_ref": "string",
    "scheduled_interval": "string",
    "scheduled_releases": 0,
    "scheduled_at": "string",
    "pending_switch": {
      "plan": "string",
      "name": "string",
      "interval": "string"
    },
    "storage_bytes": 0,
    "member_limit": 0,
    "transcription_minutes": 0,
    "status": "string",
    "valid_from": "string",
    "valid_until": "string",
    "cancelled_at": "string",
    "trial_ends_at": "string",
    "source_kind": "string",
    "updated_at": "string"
  },
  "confirm": {
    "client_secret": "string",
    "publishable_key": "string"
  }
}
```

- `plan` (`changePlan.response.200.plan`; any of, required)
  - any of: `object`, `null`
- `confirm` (`changePlan.response.200.confirm`; any of, required)
  - any of: `object`, `null`

### 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` (`changePlan.response.default.type`; string, required)
  - format `uri`
- `title` (`changePlan.response.default.title`; string, required)
- `status` (`changePlan.response.default.status`; integer, required)
- `detail` (`changePlan.response.default.detail`; string, required)
- `code` (`changePlan.response.default.code`; string, optional)
- `context` (`changePlan.response.default.context`; object, optional)
- `reached_core` (`changePlan.response.default.reached_core`; boolean, optional)
- `core_answer` (`changePlan.response.default.core_answer`; string, optional)


Source: https://docs.sherpo.io/merchant-api/reference/change-plan/index.md
