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

# Тарифы

> Тарифы и доп. устройства с ценами для клиента: цена платформы плюс наценка партнёра, та же формула во всех каналах продаж. `plan_id` отсюда передаётся в `POST /payments`.



## OpenAPI

````yaml GET /api/partner/v1/plans
openapi: 3.1.0
info:
  title: VARGO Partner API
  version: '1.0'
  description: >-
    REST API для продажи VPN в своём боте, мини-аппе или на сайте: тарифы,
    счета, клиенты и их устройства. Клиент платит платформе, наценка партнёра
    начисляется на его баланс.


    Ключ партнёра — в заголовке `Authorization: Bearer vgo_live_…`, его выдаёт
    платформа. Ключ живёт только на сервере партнёра: в коде мини-аппа или сайта
    его быть не должно. Деньги — строки в рублях (`"150.00"`), даты — ISO-8601
    UTC. Ошибки — `{error: {code, message, fields}}`: ветвиться по `code`,
    `message` клиенту не показывать.
servers:
  - url: https://api.vargopartners.com
security:
  - PartnerKey: []
paths:
  /api/partner/v1/plans:
    get:
      tags:
        - Partner API
      summary: Тарифы
      description: >-
        Тарифы и доп. устройства с ценами для клиента: цена платформы плюс
        наценка партнёра, та же формула во всех каналах продаж. `plan_id` отсюда
        передаётся в `POST /payments`.
      operationId: get_plans_api_partner_v1_plans_get
      responses:
        '200':
          description: Тарифы с ценами
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiPlans'
        '401':
          description: >-
            Ключ не принят: `UNAUTHORIZED`. Неверный и отозванный ключ,
            выключенный доступ к API — один ответ
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '422':
          description: >-
            Запрос не прошёл проверку: `code` — `VALIDATION_ERROR`, в `fields` —
            поле и причина
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '429':
          description: >-
            Превышен лимит: `RATE_LIMITED` — повторить после паузы из
            `Retry-After`. У суточных лимитов (`NEW_CLIENTS_DAILY_LIMIT`,
            `TRIAL_DAILY_LIMIT`) заголовка нет — повторять на следующие сутки
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          headers:
            Retry-After:
              description: >-
                Пауза в секундах до повтора; есть у `RATE_LIMITED` и
                `LINK_ROTATE_TOO_SOON`
              schema:
                type: integer
                minimum: 1
        default:
          description: >-
            Ошибка — тот же конверт; ветвиться по `code`, список кодов — в
            документации
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
components:
  schemas:
    ApiPlans:
      properties:
        currency:
          type: string
          title: Currency
          description: Валюта цен
          examples:
            - RUB
        plans:
          items:
            $ref: '#/components/schemas/ApiPlan'
          type: array
          title: Plans
          description: Тарифы, которые сейчас продаются
        devices:
          anyOf:
            - $ref: '#/components/schemas/ApiDevicesOffer'
            - type: 'null'
          description: >-
            Условия докупки устройств; `null` — доп. устройства сейчас не
            продаются
      type: object
      required:
        - currency
        - plans
        - devices
      title: ApiPlans
    ApiError:
      description: 'Конверт любой ошибки: статус HTTP плюс `error.code`.'
      properties:
        error:
          $ref: '#/components/schemas/ApiErrorBody'
          description: Код, текст и поля ошибки
      required:
        - error
      title: ApiError
      type: object
    ApiPlan:
      properties:
        plan_id:
          type: integer
          title: Plan Id
          description: Id тарифа — передаётся в `POST /payments`
          examples:
            - 3
        months:
          type: integer
          title: Months
          description: Срок тарифа в месяцах; у бессрочного смотрите `lifetime`
          examples:
            - 1
        lifetime:
          type: boolean
          title: Lifetime
          description: Бессрочный тариф
        price:
          type: string
          title: Price
          description: Цена для клиента — сумма счёта
          examples:
            - '150.00'
        platform_price:
          type: string
          title: Platform Price
          description: Часть платформы
          examples:
            - '100.00'
        partner_share:
          type: string
          title: Partner Share
          description: 'Наценка партнёра: после оплаты ложится на его баланс'
          examples:
            - '50.00'
      type: object
      required:
        - plan_id
        - months
        - lifetime
        - price
        - platform_price
        - partner_share
      title: ApiPlan
    ApiDevicesOffer:
      properties:
        included:
          type: integer
          title: Included
          description: Устройств входит в подписку
        max:
          type: integer
          title: Max
          description: Больше этого числа устройств у клиента быть не может
        price:
          type: string
          title: Price
          description: Цена одного доп. устройства для клиента
          examples:
            - '75.00'
        platform_price:
          type: string
          title: Platform Price
          description: Часть платформы за одно устройство
          examples:
            - '50.00'
        partner_share:
          type: string
          title: Partner Share
          description: Наценка партнёра за одно устройство
          examples:
            - '25.00'
      type: object
      required:
        - included
        - max
        - price
        - platform_price
        - partner_share
      title: ApiDevicesOffer
    ApiErrorBody:
      properties:
        code:
          description: Машиночитаемый код ошибки — ветвиться по нему
          examples:
            - VALIDATION_ERROR
          title: Code
          type: string
        message:
          description: >-
            Текст для логов на языке из `Accept-Language` (`ru` или `en`);
            клиенту не показывать
          title: Message
          type: string
        fields:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          description: Поле → причина у `VALIDATION_ERROR`; у остальных ошибок `null`
          title: Fields
      required:
        - code
        - message
        - fields
      title: ApiErrorBody
      type: object
  securitySchemes:
    PartnerKey:
      type: http
      scheme: bearer
      description: >-
        Ключ партнёра `vgo_live_…`, его выдаёт платформа. Хранится только на
        сервере партнёра.

````