# GET Get the Store credit pricing

Returns the rules the merchant admin prices a custom AI credit purchase with, and whether the Store's next purchase earns the referral bonus. Requires `billing:read`. The API cannot buy credits: the merchant buys them in the merchant admin, which quotes the total again on purchase. A purchase is a number of credits from `min_credits` to `max_credits`, in steps of `credit_step`. Each credit costs `base_unit_amount` in `currency`. A purchase of `volume_threshold_credits` or more gets `volume_discount_percent` off. This endpoint accepts no query parameters.

- Source URL: https://www.signcustomiser.com/help/api/v3-get-get-the-store-credit-pricing/
- Markdown URL: https://www.signcustomiser.com/help/api/v3-get-get-the-store-credit-pricing.md
- Group: Billing
- OpenAPI for this group: https://www.signcustomiser.com/help/openapi/billing.json
- Method: GET
- Path: /api/v3/stores/me/credit-pricing
- Auth: Bearer token
- Required scopes: `billing:read`

## cURL example

```bash
curl https://web.signcustomiser.com/api/v3/stores/me/credit-pricing \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_API_TOKEN'
```

## Response examples

### 200 GET 200 example 1

```json
{
  "data": {
    "object": "credit_pricing",
    "min_credits": 20,
    "max_credits": 1000,
    "credit_step": 10,
    "base_unit_amount": 25,
    "currency": "USD",
    "volume_threshold_credits": 120,
    "volume_discount_percent": 10,
    "referral_bonus_percent": 50,
    "referral_bonus": {
      "applies": false,
      "can_add_code": true,
      "from_saved_code": false
    }
  },
  "links": {
    "self": "https://web.signcustomiser.com/api/v3/stores/me/credit-pricing",
    "documentation": "https://www.signcustomiser.com/help/api/"
  },
  "meta": {
    "api_version": "v3",
    "request_id": "req_01jz9x2k7c8f3m5n6p7q8r9s0t"
  }
}
```

### 401 Missing API key

```json
{
  "type": "https://www.signcustomiser.com/help/api/problems/missing_api_key",
  "title": "Missing API key",
  "status": 401,
  "code": "missing_api_key",
  "detail": "Provide a store API key as a bearer token.",
  "request_id": "req_01jz9x2k7c8f3m5n6p7q8r9s0t"
}
```

### 403 Insufficient scope

```json
{
  "type": "https://www.signcustomiser.com/help/api/problems/insufficient_scope",
  "title": "Insufficient scope",
  "status": 403,
  "code": "insufficient_scope",
  "detail": "This operation requires the billing:read scope.",
  "required_scopes": [
    "billing:read"
  ],
  "granted_scopes": [
    "store:read"
  ],
  "request_id": "req_01jz9x2k7c8f3m5n6p7q8r9s0t"
}
```

### 422 Unknown query parameter

```json
{
  "type": "https://www.signcustomiser.com/help/api/problems/unknown_parameter",
  "title": "Unknown query parameter",
  "status": 422,
  "code": "unknown_parameter",
  "detail": "This endpoint accepts no query parameters.",
  "request_id": "req_01jz9x2k7c8f3m5n6p7q8r9s0t"
}
```

### 429 Rate limited

```json
{
  "type": "https://www.signcustomiser.com/help/api/problems/rate_limited",
  "title": "Too many requests",
  "status": 429,
  "code": "rate_limited",
  "detail": "You have exceeded the request limit for this API key.",
  "retry_after": 60,
  "request_id": "req_01jz9x2k7c8f3m5n6p7q8r9s0t"
}
```
