> ## Documentation Index
> Fetch the complete documentation index at: https://api-docs.streamskill.pro/llms.txt
> Use this file to discover all available pages before exploring further.

# Get all

## Pricing

Use [POST /purchases/quote](https://api-docs.streamskill.pro/api-reference/endpoints/purchases/quote.md) to get the final order total. To calculate it yourself, use the tariff's `pricing` object and the rules below.

Prices are in `pricing.currency`, before discounts, for one hour (`hourly: true`) or one tariff period (`hourly: false`).

| Type | Subtotal calculation |
| - | - |
| `standard` | Unit prices with separate quantity discounts for each range |
| `fixed` | Price of a fixed-quantity package |
| `graduated` | One price for the entire selected quantity, determined by its tier |

`discount` is the effective percentage for your account and this tariff, including promotions. Use the returned value as-is. Quantity discounts are separate. Do not apply `/me.discount` again.

For all three types, calculate the subtotal as described below, then:

```text theme={null}
total = round(subtotal × duration × (1 - discount / 100), 2)
```

**Use `duration = 1` when `hourly: false`.** In the request, omit `duration` or send `1`. For hourly tariffs, use the requested number of hours; omitting `duration` also defaults to `1`.

Round only the final total. Paid orders have a minimum total of `0.01`.

### Standard

`price_per_unit` is the base price of one unit. `quantity_discounts` maps each range's first unit to a discount percentage. A range ends just before the next threshold; earlier units keep their discount. The returned schedule reflects your account's terms. An empty object `{}` means no quantity discount.

```json theme={null}
{
  "type": "standard",
  "currency": "usd",
  "price_per_unit": 1,
  "quantity_discounts": {"1": 0, "100": 10},
  "discount": 10
}
```

```text theme={null}
subtotal = sum(units_in_range × price_per_unit × (1 - range_discount / 100))
```

The first 99 units cost **1 USD each**; from the 100th unit onward, each costs **0.90 USD**. The discount does not reprice earlier units.

For 150 units, the subtotal is: `99 × 1 + 51 × 1 × 0.90 = 144.90 USD`. With no quantity discounts, the subtotal is simply `quantity × price_per_unit`.

### Fixed

`price` covers the whole package. The tariff's `count` is fixed, so do not multiply by quantity. Quantity discounts do not apply.

```json theme={null}
{
  "type": "fixed",
  "currency": "usd",
  "price": 100,
  "discount": 10
}
```

```text theme={null}
subtotal = price
```

With `duration = 1`, the total is **90 USD**. For an hourly package, multiply by the requested hours before applying the discount.

### Graduated

`graduated_prices` maps quantity thresholds to prices for the entire selected quantity. Choose the highest threshold that does not exceed `quantity`. If the quantity is below every threshold, use the first tier. Do not add tier prices or multiply by quantity. Quantity discounts do not apply.

```json theme={null}
{
  "type": "graduated",
  "currency": "usd",
  "graduated_prices": {"0": 100, "101": 150, "201": 200},
  "discount": 10
}
```

```text theme={null}
subtotal = selected_tier_price
```

For 150 units, the subtotal is `150`. With `duration = 2` and `discount = 10`, the total is **270 USD**.

### Legacy fields

Top-level `price`, `pricing_type`, `graduated_prices` and `discounts` remain for compatibility. Use `pricing` for new integrations.

Unlike the prices inside `pricing`, top-level `price` and `graduated_prices` already include discounts and rounding. `price` covers the default quantity with `duration = 1`. The old `pricing_type` reports `standard` for both standard and fixed tariffs.


## OpenAPI

````yaml GET /tarifs
openapi: 3.0.0
info:
  title: StreamSkill - OpenApi 3.0
  description: ''
  termsOfService: https://streamskill.pro/en/privacy_policy
  version: 1.0.0
  contact:
    email: streamskillpro@gmail.com
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://api.streamskill.pro/v1
    description: Production server - v1
security:
  - bearerAuth: []
paths:
  /tarifs:
    parameters:
      - $ref: '#/components/parameters/Accept-Language'
      - $ref: '#/components/parameters/expandTarif'
    get:
      summary: Get all
      responses:
        '200':
          $ref: '#/components/responses/TarifsList'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  parameters:
    Accept-Language:
      name: Accept-Language
      in: header
      required: false
      description: The language of the response
      schema:
        $ref: '#/components/schemas/LanguageObject'
    expandTarif:
      name: expand
      in: query
      required: false
      description: Additional data to include in the response
      schema:
        type: string
        enum:
          - panel
        example: panel
  responses:
    TarifsList:
      description: OK
      headers:
        Date:
          $ref: '#/components/headers/Date'
        Server:
          $ref: '#/components/headers/Server'
        Content-Length:
          $ref: '#/components/headers/Content-Length'
        Keep-Alive:
          $ref: '#/components/headers/Keep-Alive'
        Connection:
          $ref: '#/components/headers/Connection'
        Content-Type:
          $ref: '#/components/headers/Content-Type'
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/TarifResponseObject'
    Unauthorized:
      description: A valid API key is required.
      headers:
        Date:
          $ref: '#/components/headers/Date'
        Server:
          $ref: '#/components/headers/Server'
        Content-Length:
          $ref: '#/components/headers/Content-Length'
        Keep-Alive:
          $ref: '#/components/headers/Keep-Alive'
        Connection:
          $ref: '#/components/headers/Connection'
        Content-Type:
          $ref: '#/components/headers/Content-Type'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorObject'
          example:
            error_code: unauthorized
            name: Your request was made with invalid credentials.
            message: Your request was made with invalid credentials.
            code: 0
            status: 401
            type: unauthorized_http_exception
  schemas:
    LanguageObject:
      type: string
      enum:
        - en
        - ru
      default: en
    TarifResponseObject:
      type: object
      properties:
        id:
          type: integer
          description: The ID of the tarif
          example: 1
        title:
          type: string
          description: The title of the tarif (localized)
          example: Viewers
        text:
          type: array
          description: Description lines (localized)
          items:
            type: string
          example:
            - Up to 1000 viewers
        count:
          description: >-
            Quantity info. For custom_count tariffs returns {min, max},
            otherwise a single integer.
          example:
            min: 100
            max: 1000
          oneOf:
            - type: integer
              example: 100
            - type: object
              properties:
                min:
                  type: integer
                  example: 100
                max:
                  type: integer
                  example: 1000
        price:
          type: number
          deprecated: true
          description: >-
            Legacy price for the default quantity and duration = 1, with
            discounts and rounding applied. Use pricing for base prices or POST
            /purchases/quote for an order total.
          example: 89.91
        type:
          type: string
          description: The group_id of the tarif
          example: viewers
        hourly:
          type: boolean
          description: Whether the tarif supports hourly duration selection
          example: true
        pricing_type:
          type: string
          enum:
            - standard
            - graduated
          deprecated: true
          description: >-
            Legacy pricing type. Both standard and fixed packages report
            standard. Use pricing.type for the three pricing types.
          example: standard
        graduated_prices:
          deprecated: true
          description: >-
            Legacy tier prices with discounts and rounding applied; null for
            other pricing types. Use pricing.graduated_prices for prices before
            discounts.
          nullable: true
          example: null
          oneOf:
            - $ref: '#/components/schemas/GraduatedPricesObject'
        discounts:
          type: object
          deprecated: true
          description: >-
            Legacy quantity discount schedule. For standard tariffs, use
            pricing.quantity_discounts. Each threshold starts a range ending
            just before the next threshold; earlier units keep their discounts.
          additionalProperties:
            type: integer
          example:
            '1': 0
            '100': 10
        link:
          type: object
          properties:
            prefix:
              type: string
              description: Channel URL prefix
              example: https://www.twitch.tv/
            placeholder:
              type: string
              description: Channel input placeholder
              example: twitch
        panel:
          type: boolean
          description: Whether the tarif supports panel
          example: true
        pricing:
          $ref: '#/components/schemas/TariffPricingObject'
      example:
        id: 1
        title: Viewers
        text:
          - Up to 1000 viewers
        count:
          min: 100
          max: 1000
        price: 89.91
        type: viewers
        hourly: true
        pricing_type: standard
        graduated_prices: null
        discounts:
          '1': 0
          '100': 10
        link:
          prefix: https://www.twitch.tv/
          placeholder: twitch
        panel: true
        pricing:
          type: standard
          currency: usd
          price_per_unit: 1
          quantity_discounts:
            '1': 0
            '100': 10
          discount: 10
    ErrorObject:
      type: object
      required:
        - error_code
        - name
        - message
        - code
        - status
        - type
      properties:
        error_code:
          type: string
          description: Error identifier for handling the response in your application.
        name:
          type: string
          description: Localized error message; equal to message.
        message:
          type: string
          description: Localized explanation of the error.
        code:
          type: integer
          description: Error code, usually 0.
        status:
          type: integer
          description: HTTP status code.
        type:
          type: string
          description: Error type.
    GraduatedPricesObject:
      type: object
      description: >-
        Graduated pricing tiers. Keys are quantity thresholds, values are prices
        (with all discounts applied). Only present when pricing_type is
        "graduated".
      additionalProperties:
        type: number
      example:
        '0': 135
        '101': 180
        '201': 270
    TariffPricingObject:
      description: >-
        Base prices and applicable discounts for your account. Prices are per
        hour when hourly is true, otherwise per tariff period. Calculate the
        subtotal for the selected type, multiply by duration and (1 - discount /
        100), then round to two decimal places. Use duration = 1 when hourly is
        false. Paid orders have a minimum total of 0.01. Use POST
        /purchases/quote for the payable total.
      oneOf:
        - $ref: '#/components/schemas/StandardPricingObject'
        - $ref: '#/components/schemas/FixedPricingObject'
        - $ref: '#/components/schemas/GraduatedPricingObject'
      discriminator:
        propertyName: type
        mapping:
          standard: '#/components/schemas/StandardPricingObject'
          fixed: '#/components/schemas/FixedPricingObject'
          graduated: '#/components/schemas/GraduatedPricingObject'
    StandardPricingObject:
      title: Standard
      type: object
      required:
        - type
        - currency
        - price_per_unit
        - quantity_discounts
        - discount
      properties:
        type:
          type: string
          enum:
            - standard
        currency:
          $ref: '#/components/schemas/CurrencyObject'
        price_per_unit:
          type: number
          description: Price of one unit before quantity and account discounts.
        quantity_discounts:
          type: object
          description: >-
            Quantity discount percentages for your account. Each threshold is
            the first unit in a range ending just before the next threshold. Sum
            each range's units × price_per_unit × (1 - range_discount / 100) to
            get the subtotal. An empty object means no quantity discount.
          additionalProperties:
            type: integer
        discount:
          type: integer
          description: >-
            Effective discount percentage for your account and this tariff,
            including promotions. Use the returned value as-is. Excludes
            quantity discounts. Apply once; do not add /me.discount.
          minimum: 0
          maximum: 90
      example:
        type: standard
        currency: usd
        price_per_unit: 1
        quantity_discounts:
          '1': 0
          '100': 10
        discount: 10
    FixedPricingObject:
      title: Fixed
      type: object
      required:
        - type
        - currency
        - price
        - discount
      properties:
        type:
          type: string
          enum:
            - fixed
        currency:
          $ref: '#/components/schemas/CurrencyObject'
        price:
          type: number
          description: >-
            Price of the whole fixed-quantity package before discount. This is
            the subtotal; do not multiply by quantity. Quantity discounts do not
            apply.
        discount:
          type: integer
          description: >-
            Effective discount percentage for your account and this tariff,
            including promotions. Use the returned value as-is. Excludes
            quantity discounts. Apply once; do not add /me.discount.
          minimum: 0
          maximum: 90
      example:
        type: fixed
        currency: usd
        price: 100
        discount: 10
    GraduatedPricingObject:
      title: Graduated
      type: object
      required:
        - type
        - currency
        - graduated_prices
        - discount
      properties:
        type:
          type: string
          enum:
            - graduated
        currency:
          $ref: '#/components/schemas/CurrencyObject'
        graduated_prices:
          type: object
          description: >-
            Base prices for selectable quantity tiers, before discount. Keys are
            quantity thresholds. The subtotal is the price at the highest
            threshold not exceeding the requested quantity, or the first tier if
            none matches. Do not sum tiers or multiply by quantity. Quantity
            discounts do not apply.
          additionalProperties:
            type: number
        discount:
          type: integer
          description: >-
            Effective discount percentage for your account and this tariff,
            including promotions. Use the returned value as-is. Excludes
            quantity discounts. Apply once; do not add /me.discount.
          minimum: 0
          maximum: 90
      example:
        type: graduated
        currency: usd
        graduated_prices:
          '0': 100
          '101': 150
          '201': 200
        discount: 10
    CurrencyObject:
      type: string
      enum:
        - usd
        - rub
      example: usd
  headers:
    Date:
      schema:
        type: string
        example: Sat, 25 May 2024 23:59:59 GMT
    Server:
      schema:
        type: string
        example: Apache/2.4.38 (Debian)
    Content-Length:
      schema:
        type: integer
        example: '100'
    Keep-Alive:
      schema:
        type: string
        example: timeout=5, max=100
    Connection:
      schema:
        type: string
        example: Keep-Alive
    Content-Type:
      schema:
        type: string
      example: application/json; charset=UTF-8
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.