---
title: "Previews what one more store on the business's plan charges now and bills from its next renewal."
---

> 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}/plan_store/preview/query`

## Authentication

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

## Path parameters

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

## Request body

_Required._

- `price` (`previewPlanStore.price`; any of, required) — The plan as the seller saw it, so a plan changed since is never previewed.
  - any of: `string`, `null`
- `quantity` (`previewPlanStore.quantity`; integer, required) — Stores the plan bills before the one added.
  - min 1; max 10

## Example request

```json
{
  "price": "string",
  "quantity": 1
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url 'https://api.sherpo.io/merchant/v1/stores/<store>/plan_store/preview/query' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "price": "string",
  "quantity": 1
}
'
```

### TypeScript

```typescript
const url = 'https://api.sherpo.io/merchant/v1/stores/<store>/plan_store/preview/query';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({price: 'string', quantity: 1})
};

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>/plan_store/preview/query"

payload = {
    "price": "string",
    "quantity": 1
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

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

print(response.text)
```

## Responses

### 200

Previews what one more store on the business's plan charges now and bills from its next renewal.

#### Example

```json
{
  "quote": "string",
  "proration_date": "string",
  "expires_at": "string",
  "currency": "string",
  "exponent": 0,
  "amount_due": 0,
  "tax": 0,
  "renewal_amount": 0,
  "renewal_tax": 0,
  "renews_at": "string",
  "trial_ends_at": "string",
  "plan": {
    "name": "string",
    "tier": "string",
    "interval": "string",
    "interval_count": 0,
    "quantity": 0,
    "limits": {
      "storage_bytes": 0,
      "customers": 0,
      "marketing_emails": 0,
      "members": 1,
      "pages": 0,
      "unbranded": true,
      "domain": true,
      "learning": true,
      "self_hosted": true,
      "ai": true,
      "transcription_minutes": 0
    }
  }
}
```

- `quote` (`previewPlanStore.response.200.quote`; string, required)
- `proration_date` (`previewPlanStore.response.200.proration_date`; string, required)
- `expires_at` (`previewPlanStore.response.200.expires_at`; string, required)
- `currency` (`previewPlanStore.response.200.currency`; string, required)
- `exponent` (`previewPlanStore.response.200.exponent`; number, required)
- `amount_due` (`previewPlanStore.response.200.amount_due`; number, required)
- `tax` (`previewPlanStore.response.200.tax`; number, required)
- `renewal_amount` (`previewPlanStore.response.200.renewal_amount`; number, required)
- `renewal_tax` (`previewPlanStore.response.200.renewal_tax`; number, required)
- `renews_at` (`previewPlanStore.response.200.renews_at`; string, required)
- `trial_ends_at` (`previewPlanStore.response.200.trial_ends_at`; any of, required)
  - any of: `string`, `null`
- `plan` (`previewPlanStore.response.200.plan`; object, required)
  - `name` (`previewPlanStore.response.200.plan.name`; any of, required)
    - any of: `string`, `null`
  - `tier` (`previewPlanStore.response.200.plan.tier`; string, required)
  - `interval` (`previewPlanStore.response.200.plan.interval`; any of, required)
    - any of: `string`, `null`
  - `interval_count` (`previewPlanStore.response.200.plan.interval_count`; number, required)
  - `quantity` (`previewPlanStore.response.200.plan.quantity`; number, required)
  - `limits` (`previewPlanStore.response.200.plan.limits`; object, required)
    - `storage_bytes` (`previewPlanStore.response.200.plan.limits.storage_bytes`; number, required)
    - `customers` (`previewPlanStore.response.200.plan.limits.customers`; any of, required)
      - any of: `number`, `number`, `null`
    - `marketing_emails` (`previewPlanStore.response.200.plan.limits.marketing_emails`; any of, required)
      - any of: `number`, `number`, `number`
    - `members` (`previewPlanStore.response.200.plan.limits.members`; any of, required)
      - any of: `number`, `number`
    - `pages` (`previewPlanStore.response.200.plan.limits.pages`; any of, required)
      - any of: `number`, `number`
    - `unbranded` (`previewPlanStore.response.200.plan.limits.unbranded`; boolean, required)
    - `domain` (`previewPlanStore.response.200.plan.limits.domain`; boolean, required)
    - `learning` (`previewPlanStore.response.200.plan.limits.learning`; boolean, required)
    - `self_hosted` (`previewPlanStore.response.200.plan.limits.self_hosted`; boolean, required)
    - `ai` (`previewPlanStore.response.200.plan.limits.ai`; boolean, required)
    - `transcription_minutes` (`previewPlanStore.response.200.plan.limits.transcription_minutes`; number, required)

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


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