{
  "components": {
    "parameters": {
      "array-group-id-query-param": {
        "description": "Список ID групп, к которым привязаны планы.  ",
        "in": "query",
        "name": "group_id[]",
        "schema": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "array-plan-id-query-param": {
        "description": "Список ID подписочных планов.",
        "in": "query",
        "name": "plan_id[]",
        "schema": {
          "items": {
            "type": "integer"
          },
          "type": "array"
        }
      },
      "array-product-id-query-param": {
        "description": "Список ID продуктов, к которым привязаны планы.",
        "in": "query",
        "name": "product_id[]",
        "schema": {
          "items": {
            "type": "integer"
          },
          "type": "array"
        }
      },
      "array-project-id-query-param": {
        "description": "Список ID проектов.",
        "in": "query",
        "name": "project_id[]",
        "schema": {
          "items": {
            "type": "integer"
          },
          "type": "array"
        }
      },
      "campaign-id-path-param": {
        "description": "ID кампании.",
        "in": "path",
        "name": "campaign_id",
        "required": true,
        "schema": {
          "type": "integer"
        }
      },
      "code-path-param": {
        "description": "Код купона.",
        "in": "path",
        "name": "code",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "datetime-from-query-param": {
        "description": "Дата выборки. Позволяет найти подписки, созданные позднее даты запроса.",
        "in": "query",
        "name": "datetime_from",
        "schema": {
          "format": "datetime",
          "type": "string"
        }
      },
      "datetime-from-query-param2": {
        "description": "Начало периода.",
        "in": "query",
        "name": "datetime_from",
        "schema": {
          "format": "datetime",
          "type": "string"
        }
      },
      "datetime-to-query-param": {
        "description": "Дата выборки. Позволяет найти подписки, созданные позднее даты запроса.",
        "in": "query",
        "name": "datetime_to",
        "schema": {
          "format": "datetime",
          "type": "string"
        }
      },
      "datetime-to-query-param2": {
        "description": "Конец периода.",
        "in": "query",
        "name": "datetime_to",
        "schema": {
          "format": "datetime",
          "type": "string"
        }
      },
      "external-id-query-param": {
        "description": "Внешний идентификатор плана.",
        "in": "query",
        "name": "external_id",
        "schema": {
          "type": "string"
        }
      },
      "group-id-query-param": {
        "description": "ID группы, к которой привязаны планы.",
        "in": "query",
        "name": "group_id",
        "schema": {
          "type": "string"
        }
      },
      "limit-query-param": {
        "description": "Лимит количества элементов на странице.",
        "in": "query",
        "name": "limit",
        "required": true,
        "schema": {
          "type": "integer"
        }
      },
      "merchant-id-path-param": {
        "description": "ID продавца.",
        "in": "path",
        "name": "merchant_id",
        "required": true,
        "schema": {
          "type": "integer"
        }
      },
      "offset-query-param": {
        "description": "Номер элемента, с которого выполняется вывод на странице (нумерация ведется с 0).",
        "in": "query",
        "name": "offset",
        "schema": {
          "type": "integer"
        }
      },
      "plan-id-path-param": {
        "description": "ID рекуррентного плана.",
        "in": "path",
        "name": "plan_id",
        "required": true,
        "schema": {
          "type": "integer"
        }
      },
      "plan-id-query-param": {
        "description": "ID плана подписки.",
        "in": "query",
        "name": "plan_id",
        "schema": {
          "type": "integer"
        }
      },
      "product-id-path-param": {
        "description": "ID продукта, к которому привязаны планы.",
        "in": "path",
        "name": "product_id",
        "required": true,
        "schema": {
          "type": "integer"
        }
      },
      "product-id-query-param": {
        "description": "ID продукта, к которому привязаны планы.",
        "in": "query",
        "name": "product_id",
        "schema": {
          "type": "integer"
        }
      },
      "project-id-path-param": {
        "description": "ID проекта.",
        "in": "path",
        "name": "project_id",
        "required": true,
        "schema": {
          "type": "integer"
        }
      },
      "promotion-id-path-param": {
        "description": "ID акции.",
        "in": "path",
        "name": "promotion_id",
        "required": true,
        "schema": {
          "type": "integer"
        }
      },
      "query-query-param": {
        "description": "Поисковый запрос (поиск name.en (язык по умолчанию)).",
        "in": "query",
        "name": "query",
        "schema": {
          "type": "string"
        }
      },
      "status-id-query-param": {
        "description": "Статус транзакции.",
        "in": "query",
        "name": "status",
        "schema": {
          "enum": [
            "done",
            "fail"
          ],
          "type": "string",
          "x-enumDescriptions": {
            "done": "Платеж обработан успешно.",
            "fail": "Платеж не был обработан успешно или был выполнен возврат средств."
          }
        }
      },
      "status-query-param-array": {
        "description": "Статус.",
        "in": "query",
        "name": "status[]",
        "schema": {
          "items": {
            "enum": [
              "active",
              "canceled",
              "non_renewing"
            ],
            "type": "string"
          },
          "type": "array"
        }
      },
      "subscription-id-path-param": {
        "description": "ID подписки.",
        "in": "path",
        "name": "subscription_id",
        "required": true,
        "schema": {
          "type": "integer"
        }
      },
      "subscription-id-query-param": {
        "description": "ID подписки.",
        "in": "query",
        "name": "subscription_id",
        "schema": {
          "type": "integer"
        }
      },
      "user-id-path-param": {
        "description": "ID пользователя.",
        "in": "path",
        "name": "user_id",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "user-id-query-param": {
        "description": "ID пользователя.",
        "in": "query",
        "name": "user_id",
        "schema": {
          "type": "string"
        }
      }
    },
    "schemas": {
      "BillingAccountResponse": {
        "properties": {
          "id": {
            "example": "12345",
            "type": "integer"
          },
          "name": {
            "example": "PP_saved_account",
            "nullable": true,
            "type": "string"
          },
          "payment_system": {
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/PaymentSystemResponse"
              }
            ]
          },
          "type": {
            "example": "paypal",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "type": "object"
      },
      "BillingAccountsListResponse": {
        "properties": {
          "items": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/BillingAccountResponse"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "Campaign": {
        "properties": {
          "campaign_code": {
            "description": "Название кампании.",
            "type": "string"
          },
          "campaign_names": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LocalizedStringPairs"
              },
              {
                "description": "Объект с локализованными названиями кампании."
              }
            ]
          },
          "campaign_redeems_count_for_user": {
            "description": "Максимальное количество погашений купона для одного пользователя в рамках кампании. Если передан `null`, количество погашений не ограничено.",
            "type": "integer"
          },
          "expiration_date": {
            "description": "Дата окончания кампании в формате `YYYY-MM-DD’T’HH:MM:SS` согласно стандарту [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601).",
            "format": "datetime",
            "type": "string"
          },
          "project_id": {
            "description": "ID проекта.",
            "type": "integer"
          },
          "redeems_count": {
            "description": "Максимальное количество погашений купона. Если передан `null`, количество погашений не ограничено.",
            "type": "integer"
          },
          "redeems_count_for_user": {
            "description": "Максимальное количество погашений купона для одного пользователя. Если передан `null`, количество погашений не ограничено.",
            "type": "integer"
          },
          "subscription_coupon": {
            "description": "Объект с параметрами подписки в вознаграждении.",
            "properties": {
              "plan_id": {
                "description": "ID плана подписки.",
                "type": "integer"
              },
              "product_id": {
                "description": "ID продукта подписки.",
                "type": "integer"
              },
              "trial_period": {
                "description": "Продолжительность пробного (триального) периода в днях.",
                "type": "integer"
              }
            },
            "required": [
              "plan_id",
              "product_id",
              "trial_period"
            ],
            "type": "object"
          },
          "virtual_currency_amount": {
            "description": "Количество виртуальной валюты в вознаграждении.",
            "format": "float",
            "type": "number"
          },
          "virtual_items": {
            "description": "Массив с параметрами виртуальных товаров в вознаграждении.",
            "properties": {
              "quantity": {
                "description": "Количество виртуальных предметов.",
                "type": "integer"
              },
              "sku": {
                "description": "Артикул виртуального предмета.",
                "type": "string"
              }
            },
            "required": [
              "sku",
              "quantity"
            ],
            "type": "object"
          }
        },
        "type": "object"
      },
      "ChangePlanPaymentDetailsResponse": {
        "properties": {
          "charge": {
            "$ref": "#/components/schemas/Charge2"
          },
          "payment_details": {
            "$ref": "#/components/schemas/PaymentDetails"
          },
          "period": {
            "$ref": "#/components/schemas/Period2"
          },
          "plan_description": {
            "example": "Localized plan description",
            "type": "string"
          },
          "plan_end_date": {
            "example": "2031-04-11T13:51:02+03:00",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "plan_external_id": {
            "example": "PlanExternalId",
            "type": "string"
          },
          "plan_group_id": {
            "example": "TestGroupId",
            "nullable": true,
            "type": "string"
          },
          "plan_id": {
            "example": "54321",
            "type": "integer"
          },
          "plan_name": {
            "example": "Localized plan name",
            "type": "string"
          },
          "plan_start_date": {
            "example": "2021-04-11T13:51:02+03:00",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "plan_type": {
            "example": "all",
            "type": "string"
          },
          "promotion": {
            "$ref": "#/components/schemas/Promotion"
          },
          "trial_period": {
            "example": "7",
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "plan_id",
          "plan_external_id",
          "plan_type",
          "plan_name",
          "plan_description",
          "period",
          "charge",
          "promotion",
          "payment_details"
        ],
        "type": "object"
      },
      "Charge": {
        "properties": {
          "amount": {
            "example": "4.99",
            "format": "float",
            "type": "number"
          },
          "amount_with_promotion": {
            "default": null,
            "example": "3.99",
            "format": "float",
            "nullable": true,
            "type": "number"
          },
          "currency": {
            "example": "USD",
            "type": "string"
          }
        },
        "required": [
          "amount",
          "currency"
        ],
        "type": "object"
      },
      "Charge2": {
        "properties": {
          "amount": {
            "example": "4.99",
            "format": "float",
            "type": "number"
          },
          "currency": {
            "example": "USD",
            "type": "string"
          },
          "setup_fee": {
            "example": "0.99",
            "format": "float",
            "nullable": true,
            "type": "number"
          }
        },
        "required": [
          "amount",
          "currency"
        ],
        "type": "object"
      },
      "Charge3": {
        "properties": {
          "amount": {
            "example": "4.99",
            "format": "float",
            "type": "number"
          },
          "amount_with_promotion": {
            "default": null,
            "example": "3.99",
            "format": "float",
            "nullable": true,
            "type": "number"
          },
          "currency": {
            "example": "USD",
            "type": "string"
          }
        },
        "required": [
          "amount",
          "currency"
        ],
        "type": "object"
      },
      "Charge4": {
        "properties": {
          "amount": {
            "example": "4.99",
            "format": "float",
            "type": "number"
          },
          "currency": {
            "example": "USD",
            "type": "string"
          },
          "setup_fee": {
            "example": "0.99",
            "format": "float",
            "nullable": true,
            "type": "number"
          }
        },
        "required": [
          "amount",
          "currency"
        ],
        "type": "object"
      },
      "Coupon": {
        "properties": {
          "campaign_code": {
            "type": "string"
          },
          "coupon_code": {
            "type": "string"
          },
          "coupon_id": {
            "type": "integer"
          },
          "expiration_date": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "project_id": {
            "type": "integer"
          },
          "redeems_count_for_user": {
            "type": "integer"
          },
          "redeems_count_remain": {
            "type": "integer"
          },
          "subscription_coupon": {
            "nullable": true,
            "type": "string"
          },
          "virtual_currency_amount": {
            "type": "integer"
          },
          "virtual_items": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "CouponAttribute": {
        "properties": {
          "key": {
            "description": "Ключ атрибута пользователя.",
            "type": "string"
          },
          "list_of_values": {
            "description": "Массив возможных значений атрибута типа enum.",
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "name": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LocalizedStringPairs"
              },
              {
                "description": "Массив локализованных названий атрибутов пользователя."
              }
            ]
          },
          "skip_condition_on_nonexistent_key": {
            "description": "Должно ли условие пропускаться, если ключа не существует.",
            "type": "boolean"
          },
          "type": {
            "description": "Тип ключа.",
            "enum": [
              "int",
              "string",
              "enum",
              "date"
            ],
            "type": "string"
          },
          "visible": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "CreatePromotion": {
        "properties": {
          "description": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LocalizedStringPairs"
              },
              {
                "description": "Массив локализованных описаний акции."
              }
            ]
          },
          "label": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LocalizedStringPairs"
              },
              {
                "description": "Массив локализованных лейблов, будут показаны в платежном интерфейсе."
              }
            ]
          },
          "name": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LocalizedStringPairs"
              },
              {
                "description": "Массив локализованных названий акции."
              }
            ]
          },
          "project_id": {
            "description": "ID проекта.",
            "type": "integer"
          },
          "technical_name": {
            "description": "Техническое название акции.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "GetPromotion": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CreatePromotion"
          },
          {
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "id": {
                "type": "integer"
              },
              "read_only": {
                "type": "boolean"
              },
              "show_banner": {
                "type": "boolean"
              }
            },
            "type": "object"
          }
        ]
      },
      "LastSuccessfulCharge": {
        "properties": {
          "amount": {
            "example": "3.99",
            "format": "float",
            "nullable": true,
            "type": "number"
          },
          "currency": {
            "example": "USD",
            "nullable": true,
            "type": "string"
          },
          "date": {
            "example": "2031-04-11T13:51:02+03:00",
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "date"
        ],
        "type": "object"
      },
      "ListManagementSubscriptionsResponse": {
        "properties": {
          "has_more": {
            "example": "false",
            "type": "boolean"
          },
          "items": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/ManagementSubscriptionResponse2"
            },
            "type": "array"
          }
        },
        "required": [
          "has_more"
        ],
        "type": "object"
      },
      "ListPlansResponse": {
        "properties": {
          "has_more": {
            "example": "false",
            "type": "boolean"
          },
          "items": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/PlanResponse"
            },
            "type": "array"
          }
        },
        "required": [
          "has_more"
        ],
        "type": "object"
      },
      "LocalizedStringPairs": {
        "properties": {
          "ar": {
            "description": "Арабский.",
            "type": "string"
          },
          "bg": {
            "description": "Болгарский.",
            "type": "string"
          },
          "cn": {
            "description": "Китайский упрощенный.",
            "type": "string"
          },
          "cs": {
            "description": "Чешский.",
            "type": "string"
          },
          "de": {
            "description": "Немецкий.",
            "type": "string"
          },
          "en": {
            "description": "Английский.",
            "type": "string"
          },
          "es": {
            "description": "Испанский.",
            "type": "string"
          },
          "fr": {
            "description": "Французский.",
            "type": "string"
          },
          "he": {
            "description": "Иврит.",
            "type": "string"
          },
          "it": {
            "description": "Итальянский.",
            "type": "string"
          },
          "ja": {
            "description": "Японский.",
            "type": "string"
          },
          "ko": {
            "description": "Корейский.",
            "type": "string"
          },
          "pl": {
            "description": "Польский.",
            "type": "string"
          },
          "pt": {
            "description": "Португальский.",
            "type": "string"
          },
          "ro": {
            "description": "Румынский.",
            "type": "string"
          },
          "ru": {
            "description": "Русский.",
            "type": "string"
          },
          "th": {
            "description": "Тайский.",
            "type": "string"
          },
          "tr": {
            "description": "Турецкий.",
            "type": "string"
          },
          "tw": {
            "description": "Китайский традиционный.",
            "type": "string"
          },
          "vi": {
            "description": "Вьетнамский.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ManagementSubscriptionResponse": {
        "properties": {
          "charge": {
            "$ref": "#/components/schemas/Charge"
          },
          "date_create": {
            "example": "2031-04-11T13:51:02+03:00",
            "format": "date-time",
            "type": "string"
          },
          "date_end": {
            "example": "2031-04-11T13:51:02+03:00",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "date_last_charge": {
            "example": "2031-04-11T13:51:02+03:00",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "date_next_charge": {
            "example": "2031-04-11T13:51:02+03:00",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "example": "12345",
            "type": "integer"
          },
          "is_change_plan_allowed": {
            "example": "false",
            "type": "boolean"
          },
          "is_change_to_non_renew_possible": {
            "example": "true",
            "type": "boolean"
          },
          "is_in_trial": {
            "example": "false",
            "type": "boolean"
          },
          "is_renew_possible": {
            "example": "true",
            "type": "boolean"
          },
          "last_successful_charge": {
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/LastSuccessfulCharge"
              }
            ]
          },
          "payment_account": {
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/PaymentRecurrentAccountResponse2"
              }
            ]
          },
          "period": {
            "$ref": "#/components/schemas/Period"
          },
          "plan_description": {
            "example": "Localized plan description",
            "type": "string"
          },
          "plan_name": {
            "example": "Localized plan name",
            "type": "string"
          },
          "product_description": {
            "example": "Localized product description",
            "nullable": true,
            "type": "string"
          },
          "product_name": {
            "example": "Product name",
            "nullable": true,
            "type": "string"
          },
          "status": {
            "example": "active",
            "type": "string"
          },
          "trial_period": {
            "example": "0",
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "id",
          "plan_name",
          "plan_description",
          "status",
          "is_in_trial",
          "date_create",
          "charge",
          "period",
          "is_renew_possible",
          "is_change_to_non_renew_possible",
          "is_change_plan_allowed"
        ],
        "type": "object"
      },
      "ManagementSubscriptionResponse2": {
        "properties": {
          "charge": {
            "$ref": "#/components/schemas/Charge3"
          },
          "date_create": {
            "example": "2031-04-11T13:51:02+03:00",
            "format": "date-time",
            "type": "string"
          },
          "date_last_charge": {
            "example": "2031-04-11T13:51:02+03:00",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "date_next_charge": {
            "example": "2031-04-11T13:51:02+03:00",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "example": "12345",
            "type": "integer"
          },
          "is_in_trial": {
            "example": "false",
            "type": "boolean"
          },
          "payment_account": {
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/PaymentRecurrentAccountResponse3"
              }
            ]
          },
          "period": {
            "$ref": "#/components/schemas/Period3"
          },
          "plan_description": {
            "example": "Localized plan description",
            "type": "string"
          },
          "plan_name": {
            "example": "Localized plan name",
            "type": "string"
          },
          "product_description": {
            "example": "Localized product description",
            "nullable": true,
            "type": "string"
          },
          "product_name": {
            "example": "Product name",
            "nullable": true,
            "type": "string"
          },
          "status": {
            "example": "active",
            "type": "string"
          },
          "trial_period": {
            "example": "0",
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "id",
          "plan_name",
          "plan_description",
          "status",
          "is_in_trial",
          "date_create",
          "charge",
          "period"
        ],
        "type": "object"
      },
      "PayStationLinkResponse": {
        "properties": {
          "link_to_ps": {
            "example": "https://secure.xsolla.com/paystation2/?access_token=<access_token>",
            "type": "string"
          }
        },
        "required": [
          "link_to_ps"
        ],
        "type": "object"
      },
      "PaymentDetails": {
        "properties": {
          "surcharge": {
            "default": null,
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/Surcharge"
              }
            ]
          },
          "unused": {
            "default": null,
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/Unused"
              }
            ]
          }
        },
        "type": "object"
      },
      "PaymentRecurrentAccountResponse": {
        "properties": {
          "card_expiry_date": {
            "nullable": true,
            "properties": {
              "month": {
                "example": "09",
                "type": "string"
              },
              "year": {
                "example": "2023",
                "type": "string"
              }
            },
            "type": "object"
          },
          "id": {
            "example": "123",
            "type": "integer"
          },
          "name": {
            "example": "** 7398",
            "nullable": true,
            "type": "string"
          },
          "ps_name": {
            "example": "Mastercard",
            "nullable": true,
            "type": "string"
          },
          "switch_icon_name": {
            "example": "mastercard.svg",
            "nullable": true,
            "type": "string"
          },
          "type": {
            "example": "card",
            "type": "string"
          }
        },
        "required": [
          "id",
          "type"
        ],
        "type": "object"
      },
      "PaymentRecurrentAccountResponse2": {
        "properties": {
          "card_expiry_date": {
            "nullable": true,
            "properties": {
              "month": {
                "example": "09",
                "type": "string"
              },
              "year": {
                "example": "2023",
                "type": "string"
              }
            },
            "type": "object"
          },
          "id": {
            "example": "123",
            "type": "integer"
          },
          "name": {
            "example": "** 7398",
            "nullable": true,
            "type": "string"
          },
          "ps_name": {
            "example": "Mastercard",
            "nullable": true,
            "type": "string"
          },
          "switch_icon_name": {
            "example": "mastercard.svg",
            "nullable": true,
            "type": "string"
          },
          "type": {
            "example": "card",
            "type": "string"
          }
        },
        "required": [
          "id",
          "type"
        ],
        "type": "object"
      },
      "PaymentRecurrentAccountResponse3": {
        "properties": {
          "card_expiry_date": {
            "nullable": true,
            "properties": {
              "month": {
                "example": "09",
                "type": "string"
              },
              "year": {
                "example": "2023",
                "type": "string"
              }
            },
            "type": "object"
          },
          "id": {
            "example": "123",
            "type": "integer"
          },
          "name": {
            "example": "** 7398",
            "nullable": true,
            "type": "string"
          },
          "ps_name": {
            "example": "Mastercard",
            "nullable": true,
            "type": "string"
          },
          "switch_icon_name": {
            "example": "mastercard.svg",
            "nullable": true,
            "type": "string"
          },
          "type": {
            "example": "card",
            "type": "string"
          }
        },
        "required": [
          "id",
          "type"
        ],
        "type": "object"
      },
      "PaymentSystemResponse": {
        "properties": {
          "id": {
            "example": "12345",
            "type": "integer"
          },
          "name": {
            "example": "PayPal",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "type": "object"
      },
      "Period": {
        "properties": {
          "unit": {
            "default": null,
            "example": "month",
            "nullable": true,
            "type": "string"
          },
          "value": {
            "default": null,
            "example": "1",
            "nullable": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "Period2": {
        "properties": {
          "unit": {
            "default": null,
            "example": "month",
            "nullable": true,
            "type": "string"
          },
          "value": {
            "default": null,
            "example": "1",
            "nullable": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "Period3": {
        "properties": {
          "unit": {
            "default": null,
            "example": "month",
            "nullable": true,
            "type": "string"
          },
          "value": {
            "default": null,
            "example": "1",
            "nullable": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "Period4": {
        "properties": {
          "unit": {
            "default": null,
            "example": "month",
            "nullable": true,
            "type": "string"
          },
          "value": {
            "default": null,
            "example": "1",
            "nullable": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "PlanResponse": {
        "properties": {
          "charge": {
            "$ref": "#/components/schemas/Charge4"
          },
          "period": {
            "$ref": "#/components/schemas/Period4"
          },
          "plan_description": {
            "example": "Localized plan description",
            "type": "string"
          },
          "plan_end_date": {
            "example": "2031-04-11T13:51:02+03:00",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "plan_external_id": {
            "example": "PlanExternalId",
            "type": "string"
          },
          "plan_group_id": {
            "example": "TestGroupId",
            "nullable": true,
            "type": "string"
          },
          "plan_id": {
            "example": "54321",
            "type": "integer"
          },
          "plan_name": {
            "example": "Localized plan name",
            "type": "string"
          },
          "plan_start_date": {
            "example": "2021-04-11T13:51:02+03:00",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "plan_type": {
            "example": "all",
            "type": "string"
          },
          "promotion": {
            "$ref": "#/components/schemas/Promotion2"
          },
          "trial_period": {
            "example": "7",
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "plan_id",
          "plan_external_id",
          "plan_type",
          "plan_name",
          "plan_description",
          "period",
          "charge",
          "promotion"
        ],
        "type": "object"
      },
      "ProjectManageSubscriptionSettingsResponse": {
        "properties": {
          "allow_change_package": {
            "example": "true",
            "type": "boolean"
          },
          "recurrent_cancel_possible": {
            "example": "true",
            "type": "boolean"
          }
        },
        "required": [
          "recurrent_cancel_possible",
          "allow_change_package"
        ],
        "type": "object"
      },
      "Promotion": {
        "properties": {
          "promotion_charge_amount": {
            "default": null,
            "example": "3.99",
            "format": "float",
            "nullable": true,
            "type": "number"
          },
          "promotion_remaining_charges": {
            "default": null,
            "example": "3",
            "nullable": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "Promotion2": {
        "properties": {
          "promotion_charge_amount": {
            "default": null,
            "example": "3.99",
            "format": "float",
            "nullable": true,
            "type": "number"
          },
          "promotion_remaining_charges": {
            "default": null,
            "example": "3",
            "nullable": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "PromotionPaymentSystem": {
        "properties": {
          "payment_systems": {
            "description": "Платежные системы.",
            "items": {
              "properties": {
                "id": {
                  "description": "Уникальный ID платежной системы.",
                  "type": "integer"
                },
                "name": {
                  "description": "Название платежной системы.",
                  "type": "string"
                }
              },
              "type": "object"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "PromotionPeriod": {
        "properties": {
          "periods": {
            "description": "Диапазоны дат/времени.",
            "items": {
              "properties": {
                "from": {
                  "description": "Начало периода.",
                  "format": "datetime",
                  "type": "string"
                },
                "offset": {
                  "description": "Номер элемента, с которого выполняется вывод на странице (нумерация ведется с 0).",
                  "type": "string"
                },
                "to": {
                  "description": "Конец периода.",
                  "format": "datetime",
                  "type": "string"
                }
              },
              "type": "object"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "PromotionReward": {
        "properties": {
          "item": {
            "description": "Настройка вознаграждения при покупке предмета.",
            "properties": {
              "bonus": {
                "description": "Вознаграждение в виде бесплатного предмета.",
                "items": {
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "localized_name": {
                      "description": "Название плана языке по-умолчанию. Повторяет значение name.en.",
                      "type": "string"
                    },
                    "quantity": {
                      "description": "Количество предметов.",
                      "type": "integer"
                    },
                    "sku": {
                      "description": "Артикул предмета.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "type": "array"
              },
              "discount": {
                "description": "Настройка скидки при покупке предмета.",
                "items": {
                  "properties": {
                    "discount_percent": {
                      "description": "Скидка на покупку, %.",
                      "format": "float",
                      "type": "number"
                    },
                    "localized_name": {
                      "description": "Название плана языке по-умолчанию. Повторяет значение name.en.",
                      "type": "string"
                    },
                    "max_amount": {
                      "description": "Максимальное количество предметов, на которое будет распространяться акция.",
                      "format": "integer",
                      "type": "number"
                    },
                    "sku": {
                      "description": "Артикул предмета.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "type": "array"
              }
            },
            "type": "object"
          },
          "package": {
            "description": "Настройка вознаграждения при покупке пакета виртуальной валюты.",
            "properties": {
              "bonus_amount": {
                "description": "Вознаграждение, указанное в виде абсолютного значения количества виртуальной валюты.",
                "format": "float",
                "type": "number"
              },
              "bonus_percent": {
                "description": "Вознаграждение, указанное в виде процента от количества виртуальной валюты.",
                "format": "float",
                "type": "number"
              }
            },
            "type": "object"
          },
          "purchase": {
            "description": "Настройка вознаграждения на весь заказ.",
            "properties": {
              "discount_percent": {
                "description": "Скидка на покупку, %.",
                "format": "float",
                "type": "number"
              }
            },
            "type": "object"
          },
          "subscription": {
            "description": "Настройка вознаграждения на подписку.",
            "properties": {
              "trial_days": {
                "description": "Количество дней триального периода.",
                "type": "integer"
              }
            },
            "type": "object"
          }
        },
        "type": "object"
      },
      "PromotionSubject": {
        "properties": {
          "digital_contents": {
            "nullable": true,
            "type": "object"
          },
          "items": {
            "description": "Акция действует на указанные предметы.",
            "items": {
              "properties": {
                "id": {
                  "type": "integer"
                },
                "localized_name": {
                  "description": "Название плана языке по-умолчанию. Повторяет значение name.en.",
                  "type": "string"
                },
                "sku": {
                  "description": "Артикул предмета.",
                  "type": "string"
                }
              },
              "type": "object"
            },
            "type": "array"
          },
          "packages": {
            "description": "Акция действует на указанные пакеты виртуальной валюты.",
            "items": {
              "type": "object"
            },
            "nullable": true,
            "type": "array"
          },
          "purchase": {
            "description": "Действует ли акция на весь заказ.",
            "type": "boolean"
          },
          "subscriptions": {
            "description": "Объект с информцией о рекуррентных планах или продуктах, на которые будет действовать акция.",
            "nullable": true,
            "properties": {
              "max_charges_count": {
                "description": "Масимальное количество списаний, в течение которых будет действовать акция.",
                "type": "integer"
              },
              "plans": {
                "items": {
                  "description": "Массив рекуррентных планов, на которые будет действовать акция.",
                  "type": "string"
                },
                "type": "array"
              },
              "products": {
                "items": {
                  "description": "Массив рекуррентных продуктов, на которые будет действовать акция.",
                  "type": "string"
                },
                "type": "array"
              }
            },
            "type": "object"
          }
        },
        "type": "object"
      },
      "Subscription": {
        "properties": {
          "cancel_subscription_payment": {
            "description": "Если передано значение `true`, то происходит отмена последнего платежа, сделанного по подписке. **Данный параметр работает, только если статус платежа изменен на `canceled`**.",
            "type": "boolean"
          },
          "status": {
            "description": "Статус.",
            "enum": [
              "active",
              "canceled",
              "non_renewing"
            ],
            "type": "string"
          },
          "timeshift": {
            "description": "Объект с информацией об отложенном сроке следующего списания.",
            "properties": {
              "type": {
                "description": "Период платежного цикла, принимает значения `day` или `month`.",
                "enum": [
                  "day",
                  "month"
                ],
                "type": "string"
              },
              "value": {
                "description": "Время, на которое нужно перенести выставление счета. Значение зависит от типа параметра и может быть: <br>- от 1 до 366, если параметр `type` принимает значение `day`<br>- от 1 до 12, если параметр `type` принимает значение `month`",
                "type": "string"
              }
            },
            "type": "object"
          },
          "xsolla_network": {
            "properties": {
              "collaborator_id": {
                "description": "ID партнера — идентификатор [инфлюенсера](https://developers.xsolla.com/ru/doc/partner-network/#guides_network_glossary_influencer) или [аффилированной сети](https://developers.xsolla.com/ru/doc/partner-network/#guides_network_glossary_affiliate_network). Можно найти в Личном кабинете в разделе **Partner Network > Инфлюенсеры**.",
                "type": "string"
              }
            },
            "type": "object"
          }
        },
        "type": "object"
      },
      "SubscriptionResponse": {
        "properties": {
          "charge_amount": {
            "description": "Сумма рекуррентного списания.",
            "format": "float",
            "type": "number"
          },
          "comment": {
            "description": "Причина изменения статуса подписки",
            "type": "string"
          },
          "currency": {
            "description": "Валюта заказа. Используется трехбуквенное обозначение валюты согласно стандарту ISO 4217.",
            "type": "string"
          },
          "date_create": {
            "description": "Дата создания подписки в формате `YYYY-MM-DD’T’HH:MM:SS` согласно стандарту [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601).",
            "format": "datetime",
            "type": "string"
          },
          "date_end": {
            "description": "Дата окончания подписки в формате `YYYY-MM-DD’T’HH:MM:SS` согласно стандарту [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601).",
            "format": "datetime",
            "type": "string"
          },
          "date_last_charge": {
            "description": "Последняя дата списания платы за подписку в формате `YYYY-MM-DD’T’HH:MM:SS` согласно стандарту [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601).",
            "format": "datetime",
            "nullable": true,
            "type": "string"
          },
          "date_next_charge": {
            "description": "Следующая дата списания платы за подписку в формате `YYYY-MM-DD’T’HH:MM:SS` согласно стандарту [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601).",
            "format": "datetime",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "description": "ID подписки",
            "type": "integer"
          },
          "plan": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SubscriptionsPlan"
              }
            ]
          },
          "product": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SubscriptionsProductWithId"
              }
            ]
          },
          "status": {
            "description": "Статус",
            "enum": [
              "new",
              "active",
              "canceled",
              "non_renewing",
              "freeze"
            ],
            "type": "string"
          },
          "user": {
            "allOf": [
              {
                "$ref": "#/components/schemas/User"
              }
            ]
          }
        },
        "type": "object"
      },
      "SubscriptionsPlan": {
        "properties": {
          "billing_retry": {
            "description": "Данные о попытках списания средств.",
            "properties": {
              "value": {
                "description": "Количество попыток списания.",
                "type": "integer"
              }
            },
            "required": [
              "value"
            ],
            "type": "object"
          },
          "charge": {
            "description": "Объект с данными о рекуррентном списании.",
            "properties": {
              "amount": {
                "description": "Сумма рекуррентного списания.",
                "format": "float",
                "type": "number"
              },
              "currency": {
                "description": "Валюта заказа. Используется трехбуквенное обозначение валюты согласно стандарту [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).",
                "type": "string"
              },
              "period": {
                "description": "Расчетный период.",
                "properties": {
                  "type": {
                    "description": "Единица времени. Может принимать значения `day`, `month` или `lifetime`.",
                    "enum": [
                      "day",
                      "month",
                      "lifetime"
                    ],
                    "type": "string"
                  },
                  "value": {
                    "description": "Количество временных единиц. Значение зависит от типа параметра и может быть: <br>- от 1 до 366, если параметр `type` принимает значение `day`;<br>- от 1 до 12, если параметр `type` принимает значение `month`;<br>- 0 если параметр `type` принимает значение `lifetime`.",
                    "type": "integer"
                  }
                },
                "required": [
                  "value",
                  "type"
                ],
                "type": "object"
              },
              "prices": {
                "description": "Список цен в различных валютах.",
                "items": {
                  "properties": {
                    "amount": {
                      "description": "Сумма рекуррентного списания.",
                      "format": "float",
                      "type": "number"
                    },
                    "currency": {
                      "description": "Валюта заказа. Используется трехбуквенное обозначение валюты согласно стандарту [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).",
                      "type": "string"
                    },
                    "setup_fee": {
                      "description": "Дополнительная плата взимаемая единовременно в первом платеже.",
                      "format": "float",
                      "type": "number"
                    }
                  },
                  "required": [
                    "amount",
                    "currency"
                  ],
                  "type": "object"
                },
                "type": "array"
              }
            },
            "required": [
              "period"
            ],
            "type": "object"
          },
          "description": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LocalizedStringPairs"
              },
              {
                "description": "Описание плана. Значение состоит из пар \"localization\":\"plan description\"."
              }
            ]
          },
          "expiration": {
            "description": "Информация об истечении срока подписки.",
            "properties": {
              "type": {
                "description": "Единица времени. Может принимать значения `day`или `month`.",
                "enum": [
                  "day",
                  "month"
                ],
                "type": "string"
              },
              "value": {
                "description": "Время до окончания срока подписки.",
                "nullable": true,
                "type": "integer"
              }
            },
            "required": [
              "value",
              "type"
            ],
            "type": "object"
          },
          "external_id": {
            "description": "Внешний идентификатор плана.",
            "type": "string"
          },
          "grace_period": {
            "description": "Время периода отсрочки.",
            "properties": {
              "type": {
                "description": "Единица времени. Может принимать значение `day`.",
                "enum": [
                  "day"
                ],
                "type": "string"
              },
              "value": {
                "description": "Платежный цикл.",
                "type": "integer"
              }
            },
            "required": [
              "value",
              "type"
            ],
            "type": "object"
          },
          "group_id": {
            "description": "ID группы, к которой привязан план.",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "description": "ID плана подписки.",
            "type": "integer"
          },
          "name": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LocalizedStringPairs"
              },
              {
                "description": "Название плана. Значение состоит из пар \"localization\":\"plan name\"."
              }
            ]
          },
          "project_id": {
            "description": "ID проекта.",
            "type": "integer"
          },
          "refund_period": {
            "description": "Период, в течение которого пользователь может вернуть средства, потраченные на план подписки (в днях).",
            "nullable": true,
            "type": "integer"
          },
          "status": {
            "properties": {
              "value": {
                "description": "Статус плана подписки.",
                "enum": [
                  "active",
                  "disabled"
                ],
                "type": "string"
              }
            },
            "type": "object"
          },
          "tags": {
            "description": "Теги плана.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "trial": {
            "description": "Информация о пробном (триальном) периоде.",
            "properties": {
              "type": {
                "description": "Единица времени. Может принимать значение `day`.",
                "enum": [
                  "day"
                ],
                "type": "string"
              },
              "value": {
                "description": "Платежный цикл.",
                "type": "integer"
              }
            },
            "required": [
              "value",
              "type"
            ],
            "type": "object"
          }
        },
        "type": "object"
      },
      "SubscriptionsPlanRequest": {
        "properties": {
          "billing_retry": {
            "description": "Данные о попытках списания средств.",
            "properties": {
              "value": {
                "description": "Количество попыток списания.",
                "type": "integer"
              }
            },
            "required": [
              "value"
            ],
            "type": "object"
          },
          "charge": {
            "description": "Объект с данными о рекуррентном списании.",
            "properties": {
              "amount": {
                "description": "Сумма рекуррентного списания.",
                "format": "float",
                "type": "number"
              },
              "currency": {
                "description": "Валюта заказа. Используется трехбуквенное обозначение валюты согласно стандарту [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).",
                "type": "string"
              },
              "period": {
                "description": "Расчетный период.",
                "properties": {
                  "type": {
                    "description": "Единица времени. Может принимать значения `day`, `month` или `lifetime`.",
                    "enum": [
                      "day",
                      "month",
                      "lifetime"
                    ],
                    "type": "string"
                  },
                  "value": {
                    "description": "Количество временных единиц. Значение зависит от типа параметра и может быть: <br>- от 1 до 366, если параметр `type` принимает значение `day`;<br>- от 1 до 12, если параметр `type` принимает значение `month`;<br>- 0 если параметр `type` принимает значение `lifetime`.",
                    "type": "integer"
                  }
                },
                "required": [
                  "value",
                  "type"
                ],
                "type": "object"
              },
              "prices": {
                "description": "Список цен в различных валютах.",
                "items": {
                  "properties": {
                    "amount": {
                      "description": "Сумма рекуррентного списания.",
                      "format": "float",
                      "type": "number"
                    },
                    "currency": {
                      "description": "Валюта заказа. Используется трехбуквенное обозначение валюты согласно стандарту [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).",
                      "type": "string"
                    },
                    "setup_fee": {
                      "description": "Дополнительная плата взимаемая единовременно в первом платеже.",
                      "format": "float",
                      "type": "number"
                    }
                  },
                  "required": [
                    "amount",
                    "currency"
                  ],
                  "type": "object"
                },
                "type": "array"
              }
            },
            "required": [
              "period"
            ],
            "type": "object"
          },
          "description": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LocalizedStringPairs"
              },
              {
                "description": "Описание плана. Значение состоит из пар \"localization\":\"plan description\"."
              }
            ]
          },
          "expiration": {
            "description": "Информация об истечении срока подписки.",
            "properties": {
              "type": {
                "description": "Единица времени. Может принимать значения `day`или `month`.",
                "enum": [
                  "day",
                  "month"
                ],
                "type": "string"
              },
              "value": {
                "description": "Время до окончания срока подписки.",
                "nullable": true,
                "type": "integer"
              }
            },
            "required": [
              "value",
              "type"
            ],
            "type": "object"
          },
          "external_id": {
            "description": "Внешний идентификатор плана.",
            "type": "string"
          },
          "grace_period": {
            "description": "Время периода отсрочки.",
            "properties": {
              "type": {
                "description": "Единица времени. Может принимать значение `day`.",
                "enum": [
                  "day"
                ],
                "type": "string"
              },
              "value": {
                "description": "Платежный цикл.",
                "type": "integer"
              }
            },
            "required": [
              "value",
              "type"
            ],
            "type": "object"
          },
          "group_id": {
            "description": "ID группы, к которой привязан план.",
            "type": "string"
          },
          "name": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LocalizedStringPairs"
              },
              {
                "description": "Название плана. Значение состоит из пар \"localization\":\"plan name\"."
              }
            ]
          },
          "refund_period": {
            "description": "Период, в течение которого пользователь может вернуть средства, потраченные на план подписки (в днях).",
            "nullable": true,
            "type": "integer"
          },
          "status": {
            "properties": {
              "value": {
                "description": "Статус плана подписки.",
                "enum": [
                  "active",
                  "disabled"
                ],
                "type": "string"
              }
            },
            "type": "object"
          },
          "tags": {
            "description": "Теги плана.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "trial": {
            "description": "Информация о пробном (триальном) периоде. Если параметр не передан, используются значения по умолчанию (0 дней).",
            "properties": {
              "type": {
                "description": "Единица времени. Может принимать значение `day`.",
                "enum": [
                  "day"
                ],
                "type": "string"
              },
              "value": {
                "description": "Платежный цикл.",
                "type": "integer"
              }
            },
            "required": [
              "value",
              "type"
            ],
            "type": "object"
          }
        },
        "type": "object"
      },
      "SubscriptionsProduct": {
        "nullable": true,
        "properties": {
          "description": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LocalizedStringPairs"
              },
              {
                "description": "Локализованные описания предметов."
              }
            ]
          },
          "group_id": {
            "description": "ID группы, к которой привязан план.",
            "type": "string"
          },
          "name": {
            "description": "Название продукта.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "SubscriptionsProductWithId": {
        "allOf": [
          {
            "properties": {
              "id": {
                "description": "ID продукта, к которому привязаны планы.",
                "nullable": true,
                "type": "integer"
              }
            },
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/SubscriptionsProduct"
          }
        ]
      },
      "Surcharge": {
        "properties": {
          "surcharge_amount": {
            "default": null,
            "example": "1.99",
            "format": "float",
            "nullable": true,
            "type": "number"
          },
          "surcharge_currency": {
            "default": null,
            "example": "USD",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "Unused": {
        "properties": {
          "unused_amount": {
            "default": null,
            "example": "1.99",
            "format": "float",
            "nullable": true,
            "type": "number"
          },
          "unused_currency": {
            "default": null,
            "example": "USD",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "User": {
        "properties": {
          "id": {
            "description": "ID пользователя",
            "type": "string"
          },
          "name": {
            "description": "Имя пользователя",
            "type": "string"
          }
        },
        "type": "object"
      },
      "token": {
        "example": {
          "purchase": {
            "checkout": {
              "amount": 10,
              "currency": "USD"
            },
            "subscription": {
              "gift": {
                "email": "recipient_email@email.com",
                "recipient": "test_recipient_v1"
              }
            }
          },
          "settings": {
            "currency": "USD",
            "language": "en",
            "project_id": 16184,
            "ui": {
              "components": {
                "virtual_currency": {
                  "custom_amount": true
                }
              },
              "desktop": {
                "virtual_item_list": {
                  "button_with_price": true,
                  "layout": "list"
                }
              },
              "size": "medium"
            }
          },
          "user": {
            "age": 19,
            "country": {
              "allow_modify": true,
              "value": "US"
            },
            "email": {
              "value": "john.smith@mail.com"
            },
            "id": {
              "value": "user_2"
            },
            "name": {
              "value": "John Smith"
            }
          }
        },
        "properties": {
          "custom_parameters": {
            "description": "Вы можете передавать в токене в объекте `custom_parameters` дополнительные параметры, которые могут использоваться для настройки антифрод-фильтров. Рекомендуемые параметры приведены в раскрывающемся списке. [Подробнее в документации по продукту Pay Station](https://developers.xsolla.com/ru/doc/pay-station/features/antifraud/).",
            "properties": {
              "active_date": {
                "description": "Дата последнего посещения согласно стандарту [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601).",
                "type": "string"
              },
              "additional_verification": {
                "description": "Использует ли игрок дополнительные способы защиты аккаунта.",
                "type": "boolean"
              },
              "character_customized": {
                "description": "Настраивал ли игрок персонажа.",
                "type": "boolean"
              },
              "chat_activity": {
                "description": "Пишет ли игрок в чате.",
                "type": "boolean"
              },
              "completed_tasks": {
                "description": "Количество выполненных заданий.",
                "type": "integer"
              },
              "forum_activity": {
                "description": "Пишет ли игрок в форуме.",
                "type": "boolean"
              },
              "items_used": {
                "description": "Использует ли игрок купленные в игре предметы.",
                "type": "boolean"
              },
              "karma_points": {
                "description": "Карма игрока.",
                "type": "integer"
              },
              "last_change_password_date": {
                "description": "Дата последней смены пароля согласно стандарту [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601).",
                "type": "string"
              },
              "non_premium_currency": {
                "description": "Сумма непремиальной валюты игрока.",
                "format": "float",
                "type": "integer"
              },
              "notifications_enabled": {
                "description": "Подписался ли игрок на рассылку уведомлений.",
                "type": "boolean"
              },
              "profile_completed": {
                "description": "Добавил ли игрок дополнительную информацию в профиль.",
                "type": "boolean"
              },
              "profile_image_added": {
                "description": "Загрузил ли игрок изображение профиля.",
                "type": "boolean"
              },
              "pvp_activity": {
                "description": "Участвует ли игрок в PvP.",
                "type": "boolean"
              },
              "registration_date": {
                "description": "Дата регистрации аккаунта согласно стандарту [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601).",
                "type": "string"
              },
              "session_time": {
                "description": "Период времени, который пользователь проводит в игре, согласно стандарту [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601).",
                "type": "string"
              },
              "social_networks_added": {
                "description": "Подключил ли игрок профили в социальных сетях.",
                "type": "boolean"
              },
              "total_bans": {
                "description": "Количество банов игрока в чате/на форуме.",
                "type": "integer"
              },
              "total_characters": {
                "description": "Количество персонажей игрока.",
                "type": "integer"
              },
              "total_clans": {
                "description": "Количество кланов, в которых состоит игрок.",
                "type": "integer"
              },
              "total_friends": {
                "description": "Количество друзей игрока.",
                "type": "integer"
              },
              "total_game_events": {
                "description": "Количество внутриигровых событий, в которых участвовал игрок.",
                "type": "integer"
              },
              "total_gifts": {
                "description": "Количество подарков, отправленных или полученных игроком.",
                "type": "integer"
              },
              "total_hours": {
                "description": "Общее количество часов, проведенных в игре.",
                "type": "integer"
              },
              "total_inventory_value": {
                "description": "Суммарная стоимость инвентаря во внутриигровой валюте.",
                "format": "float",
                "type": "integer"
              },
              "total_sum": {
                "description": "Общая сумма платежей.",
                "format": "float",
                "type": "integer"
              },
              "tutorial_completed": {
                "description": "Завершил ли игрок обучение в игре.",
                "type": "boolean"
              },
              "unlocked_achievements": {
                "description": "Количество разблокированных умений.",
                "type": "integer"
              },
              "user_level": {
                "description": "Уровень игрока, репутация или ранг.",
                "type": "integer"
              },
              "win_rate": {
                "description": "Рейтинг побед игрока.",
                "type": "integer"
              }
            },
            "type": "object"
          },
          "purchase": {
            "description": "Объект с информацией о заказе.",
            "properties": {
              "checkout": {
                "description": "Объект с информацией о заказе.",
                "properties": {
                  "amount": {
                    "description": "Сумма заказа.",
                    "format": "float",
                    "type": "integer"
                  },
                  "currency": {
                    "description": "Валюта заказа. Используется трехбуквенное обозначение валюты согласно стандарту [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).",
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "subscription": {
                "description": "Объект с данными о подписке.",
                "properties": {
                  "available_plans": {
                    "description": "Массив с данными о планах подписок. Только планы из этого списка будут показаны в платежном интерфейсе.",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "currency": {
                    "description": "Валюта рекуррентного плана в заказе, на основе которой будут сделаны все расчеты.",
                    "type": "string"
                  },
                  "gift": {
                    "description": "Информация о подаренной подписке.",
                    "properties": {
                      "anonymous": {
                        "description": "Отправлен ли подарок анонимно. Если значение `true`, имя отправителя будет скрыто в email-уведомлении. По умолчанию `false`.",
                        "type": "boolean"
                      },
                      "email": {
                        "description": "Email-адрес получателя.",
                        "type": "string"
                      },
                      "message": {
                        "description": "Сообщение для получателя.",
                        "type": "string"
                      },
                      "recipient": {
                        "description": "ID получателя.",
                        "type": "string"
                      },
                      "redirect_url": {
                        "description": "Ссылка на страницу с дополнительной информацией о подаренной подписке или страницу создания учетной записи. Получатель подарка сможет перейти на эту страницу из email-уведомления о подаренной подписке.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "recipient",
                      "email"
                    ],
                    "type": "object"
                  },
                  "operation": {
                    "description": "Тип операции, применяемой к плану подписки пользователя. Чтобы изменить план подписки, передайте в параметре значение `change_plan`. В параметре `purchase.subscription.plan_id` необходимо передать ID нового плана подписки.",
                    "type": "string"
                  },
                  "plan_id": {
                    "description": "Внешний ID плана подписки. Вы можете найти этот параметр в Личном кабинете в разделе **Subscriptions > Планы подписки**.",
                    "type": "string"
                  },
                  "product_id": {
                    "description": "ID рекуррентного продукта.",
                    "type": "string"
                  },
                  "trial_days": {
                    "description": "Количество дней триального периода.",
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            },
            "type": "object"
          },
          "settings": {
            "description": "Объект, содержащий настройки проекта.",
            "properties": {
              "currency": {
                "description": "Предпочтительная валюта платежа. Используется трехбуквенное обозначение валюты согласно стандарту [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).",
                "type": "string"
              },
              "external_id": {
                "description": "Идентификатор транзакции в игре. Должен быть уникальным для каждого платежа пользователя.",
                "type": "string"
              },
              "language": {
                "description": "Язык интерфейса. Используется [двухбуквенное обозначение](https://developers.xsolla.com/ru/doc/pay-station/features/localization/) (в нижнем регистре).",
                "type": "string"
              },
              "mode": {
                "description": "Передайте значение `sandbox`, чтобы провести тестовые платежи. Обратите внимание, что URL для страницы оплаты будет *https://sandbox-secure.xsolla.com*.",
                "type": "string"
              },
              "payment_method": {
                "description": "ID способа оплаты.",
                "type": "integer"
              },
              "payment_widget": {
                "description": "Виджет оплаты. Принимает значения `paybycash` или `giftcard`. При передаче этого параметра пользователь перенаправляется на виджет Pay with Cash или Gift Cards.",
                "enum": [
                  "paybycash",
                  "giftcard"
                ],
                "type": "string"
              },
              "project_id": {
                "description": "Game’s Xsolla ID. Can be found in Publisher Account.",
                "type": "integer"
              },
              "redirect_policy": {
                "description": "Настройки политики редиректа.",
                "properties": {
                  "autoredirect_from_status_page": {
                    "description": "Перенаправлять ли пользователя автоматически со страницы статуса платежа.",
                    "type": "boolean"
                  },
                  "delay": {
                    "description": "Задержка (в секундах), после которой пользователь автоматически перенаправляется на return URL.",
                    "type": "integer"
                  },
                  "manual_redirection_action": {
                    "description": "Действие, которое совершает платежный интерфейс, когда пользователь закрывает окно платежного интерфейса или нажимает кнопку **Back to the Game**. Может принимать значения `redirect` (по умолчанию) и `postmessage`. Если указано значение `redirect`, пользователь перенаправляется на URL-адрес, указанный в токене или в Личном кабинете. Если указано значение `postmessage`, при закрытии окна платежного интерфейса отправляется событие `close`, при нажатии **Back to the Game** — событие `return`.",
                    "enum": [
                      "redirect",
                      "postmessage"
                    ],
                    "type": "string"
                  },
                  "redirect_button_caption": {
                    "description": "Текст кнопки для ручного перенаправления.",
                    "type": "string"
                  },
                  "redirect_conditions": {
                    "description": "Статус платежа, при котором пользователь перенаправляется на return URL. Принимает значение `none`, `successful`, `successful_or_canсeled` или `any`.",
                    "enum": [
                      "none",
                      "successful",
                      "successful_or_canceled",
                      "any"
                    ],
                    "type": "string"
                  },
                  "status_for_manual_redirection": {
                    "description": "Статус платежа, при котором появляется кнопка для возврата на return URL. Принимает значение `none`, `successful`, `successful_or_canсeled` или `any`.",
                    "enum": [
                      "none",
                      "successful",
                      "successful_or_canceled",
                      "any"
                    ],
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "return_url": {
                "description": "Пользователь будет перенаправлен на данную страницу после совершения платежа. Параметры `user_id`, `foreigninvoice`, `invoice_id` и `status` будут автоматически добавлены к ссылке.",
                "type": "string"
              },
              "ui": {
                "description": "Объект с настройками интерфейса.",
                "properties": {
                  "components": {
                    "description": "Объект с данными настройки пунктов меню.",
                    "properties": {
                      "subscriptions": {
                        "description": "Объект с данными настройки меню подписок.",
                        "properties": {
                          "hidden": {
                            "description": "Должна ли вкладка отображаться в меню.",
                            "type": "boolean"
                          },
                          "order": {
                            "description": "Место вкладки в меню.",
                            "type": "integer"
                          }
                        },
                        "type": "object"
                      },
                      "virtual_currency": {
                        "description": "Объект с данными настройки меню виртуальной валюты.",
                        "properties": {
                          "custom_amount": {
                            "description": "Возможность ввода произвольного количества виртуальной валюты в интерфейсе оплаты.",
                            "type": "boolean"
                          },
                          "hidden": {
                            "description": "Должна ли вкладка отображаться в меню.",
                            "type": "boolean"
                          },
                          "order": {
                            "description": "Место вкладки в меню.",
                            "type": "integer"
                          }
                        },
                        "type": "object"
                      },
                      "virtual_items": {
                        "description": "Объект с данными настройки меню предметов.",
                        "properties": {
                          "hidden": {
                            "description": "Должна ли вкладка отображаться в меню.",
                            "type": "boolean"
                          },
                          "order": {
                            "description": "Место вкладки в меню.",
                            "type": "integer"
                          },
                          "selected_group": {
                            "description": "Группа, которая будет выбрана при открытии вкладки.",
                            "type": "string"
                          },
                          "selected_item": {
                            "description": "Предмет, который будет выбран при открытии вкладки. Должен быть передан артикул предмета.",
                            "type": "string"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "type": "object"
                  },
                  "desktop": {
                    "description": "Объект с данными настроек для desktop-версии.",
                    "properties": {
                      "header": {
                        "description": "Объект с настройками хедера.",
                        "properties": {
                          "close_button": {
                            "description": "Показывать ли кнопку Закрыть в настольной версии платежного интерфейса. Нажатие на кнопку закрывает платежный интерфейс и перенаправляет пользователя на адрес, указанный в параметре `settings.return_url`. `false` по умолчанию.",
                            "type": "boolean"
                          },
                          "is_visible": {
                            "description": "Whether to show the header in the payment UI.",
                            "type": "boolean"
                          },
                          "type": {
                            "description": "Внешний вид хедера. Может принимать значения `compact` (название игры и ID пользователя не будут показываться в хедере) или `normal`.",
                            "enum": [
                              "compact",
                              "normal"
                            ],
                            "type": "string"
                          },
                          "visible_logo": {
                            "description": "Если значение `true`, то логотип будет отображаться в хедере (необходимо сначала прислать файл с логотипом персональному менеджеру проекта).",
                            "type": "boolean"
                          },
                          "visible_name": {
                            "description": "Whether to show the project name in the header.",
                            "type": "boolean"
                          },
                          "visible_purchase": {
                            "description": "Должно ли описание покупки (`purchase.description.value`) отображаться в хедере, по умолчанию `true`.",
                            "type": "boolean"
                          }
                        },
                        "type": "object"
                      },
                      "subscription_list": {
                        "description": "Объект с данными настройки списка подписок.",
                        "properties": {
                          "description": {
                            "description": "Здесь вы можете передать текст про подписки. Текст появится перед списком рекуррентных планов в интерфейсе оплаты.",
                            "type": "string"
                          },
                          "display_local_price": {
                            "description": "Если значение `true` и если локальная валюта пользователя отличается от базовой валюты плана, пользователь будет видеть две цены: цену в локальной валюте и цену в базовой валюте плана.",
                            "type": "boolean"
                          },
                          "layout": {
                            "description": "Шаблон списка. Принимает значения `list` (по умолчанию) или `grid`.",
                            "enum": [
                              "list",
                              "grid"
                            ],
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "virtual_currency_list": {
                        "description": "Объект с данными настройки списка пакетов виртуальной валюты.",
                        "properties": {
                          "button_with_price": {
                            "description": "Если значение `true`, то цена за предмет будет показана внутри кнопки. Если `false`, то цена будет слева от кнопки. `false` по умолчанию.",
                            "type": "boolean"
                          },
                          "description": {
                            "description": "Здесь вы можете передать текст про виртуальную валюту. Текст появится перед списком пакетов виртуальной валюты в интерфейсе оплаты.",
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "virtual_item_list": {
                        "description": "Объект с данными настройки списка предметов.",
                        "properties": {
                          "button_with_price": {
                            "description": "Если значение `true`, то цена за предмет будет показана внутри кнопки. Если `false`, то цена будет слева от кнопки. `false` по умолчанию.",
                            "type": "boolean"
                          },
                          "layout": {
                            "description": "Шаблон списка. Принимает значения `list` (по умолчанию) или `grid`.",
                            "enum": [
                              "list",
                              "grid"
                            ],
                            "type": "string"
                          },
                          "view": {
                            "description": "Вывод списка групп виртуальных предметов либо в виде вертикального меню, либо над окном в виде горизонтального меню. Принимает значения `horizontal_navigation` или `vertical_navigation` (по умолчанию).",
                            "enum": [
                              "horizontal_navigation",
                              "vertical_navigation"
                            ],
                            "type": "string"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "type": "object"
                  },
                  "header": {
                    "properties": {
                      "visible_virtual_currency_balance": {
                        "description": "Должен ли этот элемент быть видимым в интерфейсе оплаты. `true` по умолчанию.",
                        "type": "boolean"
                      }
                    },
                    "type": "object"
                  },
                  "is_prevent_external_link_open": {
                    "description": "Отключение перехода по внешним ссылкам, по умолчанию `true`. При нажатии на внешнюю ссылку отправляется событие `external-link-open` с помощью механизма `postMessage`. В параметре `url` передается адрес, по которому выполняется переход.",
                    "type": "boolean"
                  },
                  "license_url": {
                    "description": "Ссылка на лицензионное соглашение.",
                    "type": "string"
                  },
                  "mobile": {
                    "properties": {
                      "footer": {
                        "properties": {
                          "is_visible": {
                            "description": "Скрывать или нет footer в мобильной версии платежного интерфейса.",
                            "type": "boolean"
                          }
                        },
                        "type": "object"
                      },
                      "header": {
                        "properties": {
                          "close_button": {
                            "description": "Показывать ли кнопку Закрыть в мобильной версии платежного интерфейса. Нажатие на кнопку закрывает платежный интерфейс и перенаправляет пользователя на адрес, указанный в параметре `settings.return_url`. `false` по умолчанию.",
                            "type": "boolean"
                          }
                        },
                        "type": "object"
                      },
                      "mode": {
                        "description": "Пользователь может совершить платеж только через сохраненные способы оплаты. Принимает значение `saved_accounts`.",
                        "enum": [
                          "saved_accounts"
                        ],
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "mode": {
                    "description": "Платежный интерфейс в режиме Личного кабинета. Принимает значение `user_account`. Хедер содержит только навигационное меню Личного кабинета; исключается возможность выбора предмета и оплата покупки; режим Личного кабинета доступен только в desktop-режиме.",
                    "type": "string"
                  },
                  "size": {
                    "description": "Размер платежного интерфейса. В зависимости от требуемых размеров платежного интерфейса, параметр может принимать следующие значения:\n  - [small](https://livedemo.xsolla.com/developers/small/): Наименьший размер платежного интерфейса. Используется в случаях, когда размеры окна строго ограничены (размер: 620 x 630)\n  - [medium](https://livedemo.xsolla.com/developers/medium/): Рекомендуемый размер платежного интерфейса. Оптимален при открытии в lightbox (размер: 740 x 760)\n  - [large](https://livedemo.xsolla.com/developers/large/): желательно открывать в новом окне/вкладке (размер: 820 x 840)",
                    "enum": [
                      "small",
                      "medium",
                      "large"
                    ],
                    "type": "string"
                  },
                  "theme": {
                    "description": "Внешний вид интерфейса оплаты. Может принимать значения `default` (по умолчанию) или `default_dark`.",
                    "enum": [
                      "default",
                      "default_dark"
                    ],
                    "type": "string"
                  },
                  "user_account": {
                    "description": "Объект с данными об аккаунте пользователя.",
                    "properties": {
                      "history": {
                        "allOf": [
                          {
                            "description": "Страница **История** пользователя."
                          },
                          {
                            "properties": {
                              "enable": {
                                "description": "Должна ли вкладка отображаться в меню. `false` по умолчанию.",
                                "type": "boolean"
                              },
                              "order": {
                                "description": "Место вкладки в меню.",
                                "type": "integer"
                              }
                            },
                            "type": "object"
                          }
                        ]
                      },
                      "info": {
                        "allOf": [
                          {
                            "description": "Страница **Мой аккаунт**."
                          },
                          {
                            "properties": {
                              "enable": {
                                "description": "Должна ли вкладка отображаться в меню. `false` по умолчанию.",
                                "type": "boolean"
                              },
                              "order": {
                                "description": "Место вкладки в меню.",
                                "type": "integer"
                              }
                            },
                            "type": "object"
                          }
                        ]
                      },
                      "payment_accounts": {
                        "allOf": [
                          {
                            "description": "Страница **Сохраненные платежные аккаунты**."
                          },
                          {
                            "properties": {
                              "enable": {
                                "description": "Должна ли вкладка отображаться в меню. `false` по умолчанию.",
                                "type": "boolean"
                              },
                              "order": {
                                "description": "Место вкладки в меню.",
                                "type": "integer"
                              }
                            },
                            "type": "object"
                          }
                        ]
                      },
                      "subscriptions": {
                        "allOf": [
                          {
                            "description": "Страница **Управление подписками**."
                          },
                          {
                            "properties": {
                              "enable": {
                                "description": "Должна ли вкладка отображаться в меню. `false` по умолчанию.",
                                "type": "boolean"
                              },
                              "order": {
                                "description": "Место вкладки в меню.",
                                "type": "integer"
                              }
                            },
                            "type": "object"
                          }
                        ]
                      }
                    },
                    "type": "object"
                  },
                  "version": {
                    "description": "Тип устройства. Может принимать значения `desktop` (по умолчанию) или `mobile`.",
                    "enum": [
                      "desktop",
                      "mobile"
                    ],
                    "type": "string"
                  }
                },
                "type": "object"
              }
            },
            "required": [
              "project_id"
            ],
            "type": "object"
          },
          "user": {
            "description": "Объект с информацией о пользователе.",
            "properties": {
              "age": {
                "description": "Возраст пользователя.",
                "type": "integer"
              },
              "attributes": {
                "description": "Объект с данными об атрибутах пользователя, необходимых для фильтрации списка предметов. Параметры передаются в json хэше парами ключ-значение.",
                "type": "object"
              },
              "country": {
                "properties": {
                  "allow_modify": {
                    "description": "Может ли пользователь изменить страну на странице оплаты. Если в токене передан параметр `country.value`, значение по умолчанию — `false`.",
                    "type": "boolean"
                  },
                  "value": {
                    "description": "Используется двухбуквенное обозначение страны согласно стандарту [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).",
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "email": {
                "description": "Параметр `user.email` используется при построении моделей антифрода и положительно влияет на конверсию платежей. Передача параметра является обязательным требованием Xsolla и платежных систем. Если параметр не передан в запросе, на платежной форме появляется обязательное поле для ввода email-адреса. Пользователь получает чек о покупке на email-адрес, который был передан в параметре или указан в платежной форме.",
                "properties": {
                  "value": {
                    "description": "Email пользователя. Должен быть валидным в соответствии с протоколом [RFC 822](https://www.w3.org/Protocols/rfc822/#z8).",
                    "type": "string"
                  }
                },
                "required": [
                  "value"
                ],
                "type": "object"
              },
              "id": {
                "properties": {
                  "value": {
                    "description": "ID пользователя.",
                    "type": "string"
                  }
                },
                "required": [
                  "value"
                ],
                "type": "object"
              },
              "is_legal": {
                "description": "Является ли пользователь юридическим лицом.",
                "type": "boolean"
              },
              "legal": {
                "allOf": [
                  {
                    "description": "Объект с реквизитами юридического лица. Объект и все его параметры являются обязательными, если в `user.is_legal` передано значение `true`."
                  },
                  {
                    "description": "Объект с реквизитами юридического лица.",
                    "properties": {
                      "address": {
                        "description": "Полный юридический адрес.",
                        "type": "string"
                      },
                      "country": {
                        "description": "Страна регистрации. Используется двухбуквенное обозначение страны согласно стандарту [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).",
                        "type": "string"
                      },
                      "name": {
                        "description": "Полное юридическое наименование.",
                        "type": "string"
                      },
                      "vat_id": {
                        "description": "Индивидуальный идентификатор налогоплательщика.",
                        "type": "string"
                      }
                    },
                    "type": "object"
                  }
                ]
              },
              "name": {
                "properties": {
                  "value": {
                    "description": "Ник пользователя.",
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "phone": {
                "properties": {
                  "value": {
                    "description": "Номер телефона пользователя.",
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "public_id": {
                "properties": {
                  "value": {
                    "description": "Параметр позволяет однозначно идентифицировать пользователя, а также, в отличие от user ID, известен пользователю (адрес электронной почты, никнейм, и т. д.). Параметр может использоваться при оплате покупки вне игрового магазина (например, кнопка игры в терминалах оплаты).",
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "steam_id": {
                "properties": {
                  "value": {
                    "description": "Steam ID пользователя.",
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "tracking_id": {
                "properties": {
                  "value": {
                    "description": "Уникальный Tracking ID (используется для проведения рекламных кампаний).",
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "utm": {
                "description": "Объект с данными о характеристиках трафика.",
                "properties": {
                  "utm_campaign": {
                    "description": "Название кампании. В данный параметр следует указывать транслитерированное или переведенное на английский язык название кампании.",
                    "type": "string"
                  },
                  "utm_content": {
                    "description": "Содержание кампании.",
                    "type": "string"
                  },
                  "utm_medium": {
                    "description": "Канал трафика (контекстная реклама, медийная реклама, email-рассылка).",
                    "type": "string"
                  },
                  "utm_source": {
                    "description": "Источник трафика",
                    "type": "string"
                  },
                  "utm_term": {
                    "description": "Ключевое слово кампании. При использовании этого параметра в статистике будут собираться данные по тем ключевым словам, которые используются для таргетинга вашей рекламной кампании (а не по поисковым запросам). В Google Analytics содержимое метки `utm_term` попадает в единый отчет с поисковыми запросами.",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            },
            "required": [
              "id"
            ],
            "type": "object"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "description": "Xsolla API использует базовую HTTP-аутентификацию. Все запросы к API должны содержать заголовок `Authorization: Basic <your_authorization_basic_key>`, где `<your_authorization_basic_key>` — пара `merchant_id:api_key`, закодированная по стандарту Base64.\n\n Значения параметров вы можете найти в [Личном кабинете](https://publisher.xsolla.com/):<ul><li>`merchant_id` указан:<ul><li>В разделе <b>Настройки компании > Компания</b></li><li>Aдресной строке браузера на любой странице Личного кабинета. URL-адрес имеет вид: `https://publisher.xsolla.com/<merchant_id>`.</li></ul></li><li>`api_key` отображается в Личном кабинете только при создании и должен храниться на вашей стороне. Создать ключ можно в разделах:<ul><li><b>Настройки компании > Ключи API</b>;</li><li><b>Настройки проекта > Ключи API</b>.</li></ul></li></ul><br>\nПодробная информация о работе с ключами API приведена в [справочнике API](https://developers.xsolla.com/ru/api/getting-started/#api_keys_overview).",
        "scheme": "basic",
        "type": "http"
      },
      "subscriptionsManagementJwtAuth": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "# Введение\n\n* **Версия:** 2.0\n* **Серверы**: `https://api.xsolla.com/merchant/v2/`\n\nЭтот справочник API описывает методы для управления подписками, купонами и акциями.\nПодробная информация о продукте Subscriptions приведена в [руководстве по продукту](https://developers.xsolla.com/ru/doc/subscriptions) и [глоссарии](https://developers.xsolla.com/ru/doc/subscriptions/integration-guide/get-started/#general_glossary).",
    "title": "Subscriptions API",
    "version": "2.0"
  },
  "openapi": "3.0.0",
  "paths": {
    "/api/user/v1/management/projects/{project_id}/subscriptions": {
      "get": {
        "operationId": "list-subscriptions",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "locale",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "pattern": "\\d+",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListManagementSubscriptionsResponse"
                }
              }
            },
            "description": "Get subscriptions info"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "subscriptions.bad_request",
                    "description": "Incorrect limit value, maximum allowed is 100"
                  },
                  "request_id": "e54d2081-33cc-4682-b65c-b22d98686d0a"
                }
              }
            },
            "description": "Bad request"
          }
        },
        "security": [
          {
            "subscriptionsManagementJwtAuth": []
          }
        ],
        "summary": "List subscriptions",
        "tags": [
          "subscription-management"
        ]
      },
      "servers": [
        {
          "url": "https://subscriptions.xsolla.com"
        }
      ]
    },
    "/api/user/v1/management/projects/{project_id}/subscriptions/settings": {
      "get": {
        "operationId": "get-management-settings",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "pattern": "\\d+",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectManageSubscriptionSettingsResponse"
                }
              }
            },
            "description": "Returns project settings for managing subscription"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "subscriptions.access_denied",
                    "description": "You don't have access to requested project or resource."
                  },
                  "request_id": "e54d2081-33cc-4682-b65c-b22d98686d0a"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "subscriptions.not_found",
                    "description": "Project not found"
                  },
                  "request_id": "e54d2081-33cc-4682-b65c-b22d98686d0a"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "subscriptions.exception",
                    "description": "Retrieving data from cache has failed."
                  },
                  "request_id": "e54d2081-33cc-4682-b65c-b22d98686d0a"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "subscriptionsManagementJwtAuth": []
          }
        ],
        "summary": "Get management settings",
        "tags": [
          "subscription-management"
        ]
      },
      "servers": [
        {
          "url": "https://subscriptions.xsolla.com"
        }
      ]
    },
    "/api/user/v1/management/projects/{project_id}/subscriptions/{subscription_id}": {
      "get": {
        "operationId": "get-management-subscription",
        "parameters": [
          {
            "in": "path",
            "name": "subscription_id",
            "required": true,
            "schema": {
              "pattern": "\\d+",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "locale",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "pattern": "\\d+",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementSubscriptionResponse"
                }
              }
            },
            "description": "Get subscription info"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "subscriptions.exception",
                    "description": "Project with id = 123 was not found"
                  },
                  "request_id": "e54d2081-33cc-4682-b65c-b22d98686d0a"
                }
              }
            },
            "description": "Bad request"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "subscriptions.not_found",
                    "description": "Subscription not found"
                  },
                  "request_id": "e54d2081-33cc-4682-b65c-b22d98686d0a"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "subscriptionsManagementJwtAuth": []
          }
        ],
        "summary": "Get subscription",
        "tags": [
          "subscription-management"
        ]
      },
      "servers": [
        {
          "url": "https://subscriptions.xsolla.com"
        }
      ]
    },
    "/api/user/v1/management/projects/{project_id}/subscriptions/{subscription_id}/activate": {
      "put": {
        "operationId": "activate-subscription",
        "parameters": [
          {
            "in": "path",
            "name": "subscription_id",
            "required": true,
            "schema": {
              "pattern": "\\d+",
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "pattern": "\\d+",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "status": "successful"
                }
              }
            },
            "description": "Move subscription from non-renew to active"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "subscriptions.bad_request",
                    "description": "Subscription is not allowed to change to active"
                  },
                  "request_id": "e54d2081-33cc-4682-b65c-b22d98686d0a"
                }
              }
            },
            "description": "Bad request"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "subscriptions.not_found",
                    "description": "Subscription not found"
                  },
                  "request_id": "e54d2081-33cc-4682-b65c-b22d98686d0a"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "subscriptionsManagementJwtAuth": []
          }
        ],
        "summary": "Activate subscription",
        "tags": [
          "subscription-management"
        ]
      },
      "servers": [
        {
          "url": "https://subscriptions.xsolla.com"
        }
      ]
    },
    "/api/user/v1/management/projects/{project_id}/subscriptions/{subscription_id}/cancel": {
      "put": {
        "operationId": "cancel-subscription",
        "parameters": [
          {
            "in": "path",
            "name": "subscription_id",
            "required": true,
            "schema": {
              "pattern": "\\d+",
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "pattern": "\\d+",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {}
            },
            "description": "Make subscription non-renewable"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "subscriptions.not_active",
                    "description": "Subscription is not active"
                  },
                  "request_id": "e54d2081-33cc-4682-b65c-b22d98686d0a"
                }
              }
            },
            "description": "Bad request"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "subscriptions.not_found",
                    "description": "Subscription not found"
                  },
                  "request_id": "e54d2081-33cc-4682-b65c-b22d98686d0a"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "subscriptionsManagementJwtAuth": []
          }
        ],
        "summary": "Cancel subscription",
        "tags": [
          "subscription-management"
        ]
      },
      "servers": [
        {
          "url": "https://subscriptions.xsolla.com"
        }
      ]
    },
    "/api/user/v1/management/projects/{project_id}/subscriptions/{subscription_id}/change_plan": {
      "post": {
        "operationId": "get-change-plan-link",
        "parameters": [
          {
            "in": "path",
            "name": "subscription_id",
            "required": true,
            "schema": {
              "pattern": "\\d+",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "plan_external_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "sandbox",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "pattern": "\\d+",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PayStationLinkResponse"
                }
              }
            },
            "description": "Returns link to change subscription plan"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "subscriptions.exception",
                    "description": "Change plan is not possible"
                  },
                  "request_id": "e54d2081-33cc-4682-b65c-b22d98686d0a"
                }
              }
            },
            "description": "Bad request"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "subscriptions.not_found",
                    "description": "ubscription with id = 123 not found or not belongs to user"
                  },
                  "request_id": "e54d2081-33cc-4682-b65c-b22d98686d0a"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "subscriptions.exception",
                    "description": "Publisher API request failed"
                  },
                  "request_id": "e54d2081-33cc-4682-b65c-b22d98686d0a"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "subscriptionsManagementJwtAuth": []
          }
        ],
        "summary": "Get change plan link",
        "tags": [
          "subscription-management"
        ]
      },
      "servers": [
        {
          "url": "https://subscriptions.xsolla.com"
        }
      ]
    },
    "/api/user/v1/management/projects/{project_id}/subscriptions/{subscription_id}/payment_account": {
      "get": {
        "operationId": "get-payment-account",
        "parameters": [
          {
            "in": "path",
            "name": "subscription_id",
            "required": true,
            "schema": {
              "pattern": "\\d+",
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "pattern": "\\d+",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRecurrentAccountResponse"
                }
              }
            },
            "description": "Get payment account info"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "data.not_found",
                    "description": "Data not found"
                  },
                  "request_id": "e54d2081-33cc-4682-b65c-b22d98686d0a"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "subscriptionsManagementJwtAuth": []
          }
        ],
        "summary": "Get payment account",
        "tags": [
          "subscription-management"
        ]
      },
      "servers": [
        {
          "url": "https://subscriptions.xsolla.com"
        }
      ]
    },
    "/api/user/v1/management/projects/{project_id}/subscriptions/{subscription_id}/payment_account/manage": {
      "post": {
        "operationId": "manage-payment-account",
        "parameters": [
          {
            "in": "path",
            "name": "subscription_id",
            "required": true,
            "schema": {
              "pattern": "\\d+",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "sandbox",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "pattern": "\\d+",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PayStationLinkResponse"
                }
              }
            },
            "description": "Returns link for managing payment accounts"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "subscriptions.exception",
                    "description": "Token retrieve error"
                  },
                  "request_id": "e54d2081-33cc-4682-b65c-b22d98686d0a"
                }
              }
            },
            "description": "Bad request"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "subscriptions.not_found",
                    "description": "Subscription with id = 123 not found or not belongs to user"
                  },
                  "request_id": "e54d2081-33cc-4682-b65c-b22d98686d0a"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "subscriptions.exception",
                    "description": "Publisher API request failed"
                  },
                  "request_id": "e54d2081-33cc-4682-b65c-b22d98686d0a"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "subscriptionsManagementJwtAuth": []
          }
        ],
        "summary": "Manage payment account",
        "tags": [
          "subscription-management"
        ]
      },
      "servers": [
        {
          "url": "https://subscriptions.xsolla.com"
        }
      ]
    },
    "/api/user/v1/management/projects/{project_id}/subscriptions/{subscription_id}/payment_accounts": {
      "get": {
        "operationId": "list-payment-accounts",
        "parameters": [
          {
            "in": "path",
            "name": "subscription_id",
            "required": true,
            "schema": {
              "pattern": "\\d+",
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "pattern": "\\d+",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingAccountsListResponse"
                }
              }
            },
            "description": "Returns the user's billing accounts"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "subscriptions.access_denied",
                    "description": "You don't have access to requested project or resource."
                  },
                  "request_id": "e54d2081-33cc-4682-b65c-b22d98686d0a"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "subscriptions.not_found",
                    "description": "Subscription with id = 123 not found or not belongs to user"
                  },
                  "request_id": "e54d2081-33cc-4682-b65c-b22d98686d0a"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "subscriptions.exception",
                    "description": "Publisher API request failed."
                  },
                  "request_id": "e54d2081-33cc-4682-b65c-b22d98686d0a"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "subscriptionsManagementJwtAuth": []
          }
        ],
        "summary": "List payment accounts",
        "tags": [
          "subscription-management"
        ]
      },
      "post": {
        "operationId": "link-payment-account",
        "parameters": [
          {
            "in": "path",
            "name": "subscription_id",
            "required": true,
            "schema": {
              "pattern": "\\d+",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "payment_account_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "pattern": "\\d+",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "status": "successful"
                }
              }
            },
            "description": "Links a payment account to a subscription"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "subscriptions.exception",
                    "description": "This account is already linked"
                  },
                  "request_id": "e54d2081-33cc-4682-b65c-b22d98686d0a"
                }
              }
            },
            "description": "Bad request"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "subscriptions.not_found",
                    "description": "Subscription with id = 123 not found or not belongs to user"
                  },
                  "request_id": "e54d2081-33cc-4682-b65c-b22d98686d0a"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "subscriptions.exception",
                    "description": "Publisher API request failed"
                  },
                  "request_id": "e54d2081-33cc-4682-b65c-b22d98686d0a"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "subscriptionsManagementJwtAuth": []
          }
        ],
        "summary": "Link payment account",
        "tags": [
          "subscription-management"
        ]
      },
      "servers": [
        {
          "url": "https://subscriptions.xsolla.com"
        }
      ]
    },
    "/api/user/v1/management/projects/{project_id}/subscriptions/{subscription_id}/payment_accounts/{payment_account_id}": {
      "delete": {
        "operationId": "unlink-payment-account",
        "parameters": [
          {
            "in": "path",
            "name": "subscription_id",
            "required": true,
            "schema": {
              "pattern": "\\d+",
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "payment_account_id",
            "required": true,
            "schema": {
              "pattern": "\\d+",
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "pattern": "\\d+",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "status": "successful"
                }
              }
            },
            "description": "Unlink payment accounts"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "subscriptions.not_found",
                    "description": "Subscription with id = 123 not found or not belongs to user"
                  },
                  "request_id": "e54d2081-33cc-4682-b65c-b22d98686d0a"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "subscriptions.exception",
                    "description": "Error saving data"
                  },
                  "request_id": "e54d2081-33cc-4682-b65c-b22d98686d0a"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "subscriptionsManagementJwtAuth": []
          }
        ],
        "summary": "Unlink payment account",
        "tags": [
          "subscription-management"
        ]
      },
      "servers": [
        {
          "url": "https://subscriptions.xsolla.com"
        }
      ]
    },
    "/api/user/v1/management/projects/{project_id}/subscriptions/{subscription_id}/plans_for_change": {
      "get": {
        "operationId": "list-plans-for-change",
        "parameters": [
          {
            "in": "path",
            "name": "subscription_id",
            "required": true,
            "schema": {
              "pattern": "\\d+",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "locale",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "pattern": "\\d+",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPlansResponse"
                }
              }
            },
            "description": "List of available plans for change"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "subscriptions.exception",
                    "description": "Incorrect limit value, maximum allowed is 100"
                  },
                  "request_id": "e54d2081-33cc-4682-b65c-b22d98686d0a"
                }
              }
            },
            "description": "Bad request"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "subscriptions.not_found",
                    "description": "Subscription with id = 123 not found or not belongs to user"
                  },
                  "request_id": "e54d2081-33cc-4682-b65c-b22d98686d0a"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "subscriptionsManagementJwtAuth": []
          }
        ],
        "summary": "List plans for change",
        "tags": [
          "subscription-management"
        ]
      },
      "servers": [
        {
          "url": "https://subscriptions.xsolla.com"
        }
      ]
    },
    "/api/user/v1/management/projects/{project_id}/subscriptions/{subscription_id}/plans_for_change/{plan_id}": {
      "get": {
        "operationId": "get-plan-for-change",
        "parameters": [
          {
            "in": "path",
            "name": "subscription_id",
            "required": true,
            "schema": {
              "pattern": "\\d+",
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "plan_id",
            "required": true,
            "schema": {
              "pattern": "\\d+",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "locale",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "pattern": "\\d+",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChangePlanPaymentDetailsResponse"
                }
              }
            },
            "description": "Available plans for change with payment details"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "subscriptions.exception",
                    "description": "Change plan is not possible"
                  },
                  "request_id": "e54d2081-33cc-4682-b65c-b22d98686d0a"
                }
              }
            },
            "description": "Bad request"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "subscriptions.not_found",
                    "description": "Subscription with id = 123 not found or not belongs to user"
                  },
                  "request_id": "e54d2081-33cc-4682-b65c-b22d98686d0a"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "subscriptionsManagementJwtAuth": []
          }
        ],
        "summary": "Get plan for change",
        "tags": [
          "subscription-management"
        ]
      },
      "servers": [
        {
          "url": "https://subscriptions.xsolla.com"
        }
      ]
    },
    "/merchants/{merchant_id}/coupon_promotions": {
      "post": {
        "description": "Создайте новую купонную кампанию.\n<div class=\"notice\">\n  <p><strong>Внимание</strong></p><p> Этот метод API не включает в себя path-параметр <code>project_id</code>, поэтому для авторизации вам необходимо использовать ключ API, который действует во всех проектах. </p>\n</div>",
        "operationId": "create-campaign",
        "parameters": [
          {
            "$ref": "#/components/parameters/merchant-id-path-param"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "campaign_code": "sample_campaign",
                "campaign_names": {
                  "en": "Campaign Name",
                  "ru": "Название кампании"
                },
                "campaign_redeems_count_for_user": 1,
                "expiration_date": "2019-12-31",
                "project_id": 12345,
                "redeems_count": 10,
                "redeems_count_for_user": 1,
                "subscription_coupon": {
                  "plan_id": 123,
                  "product_id": 456,
                  "trial_period": 30
                },
                "virtual_currency_amount": 200
              },
              "schema": {
                "allOf": [
                  {
                    "required": [
                      "campaign_code",
                      "project_id",
                      "campaign_names"
                    ]
                  },
                  {
                    "$ref": "#/components/schemas/Campaign"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "id": {
                      "example": 9134,
                      "type": "integer"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Created."
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "summary": "Создание кампании",
        "tags": [
          "coupons"
        ],
        "x-admin": true,
        "x-server": true
      },
      "servers": [
        {
          "url": "https://api.xsolla.com/merchant/v2"
        }
      ]
    },
    "/merchants/{merchant_id}/coupon_promotions/{campaign_id}/coupons": {
      "post": {
        "description": "Добавьте код купона в купонную кампанию. \n<div class=\"notice\">\n  <p><strong>Внимание</strong></p><p> Этот метод API не включает в себя path-параметр <code>project_id</code>, поэтому для авторизации вам необходимо использовать ключ API, который действует во всех проектах. </p>\n</div>",
        "operationId": "add-coupon-to-campaign",
        "parameters": [
          {
            "$ref": "#/components/parameters/merchant-id-path-param"
          },
          {
            "$ref": "#/components/parameters/campaign-id-path-param"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "coupon_code": {
                    "description": "Код купона.",
                    "example": "34bryrb3",
                    "type": "string"
                  }
                },
                "required": [
                  "coupon_code"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No content."
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "summary": "Добавление купона в кампанию",
        "tags": [
          "coupons"
        ],
        "x-admin": true,
        "x-server": true
      },
      "servers": [
        {
          "url": "https://api.xsolla.com/merchant/v2"
        }
      ]
    },
    "/merchants/{merchant_id}/promotions": {
      "get": {
        "description": "Список всех рекламных акций. \n<div class=\"notice\">\n  <p><strong>Внимание</strong></p><p> Этот метод API не включает в себя path-параметр <code>project_id</code>, поэтому для авторизации вам необходимо использовать ключ API, который действует во всех проектах. </p>\n</div>",
        "operationId": "get-promotions-list",
        "parameters": [
          {
            "$ref": "#/components/parameters/merchant-id-path-param"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": [
                  {
                    "datetime": {
                      "from": "2020-02-01T00:00:00+04:00",
                      "to": "2020-11-30T01:28:42+04:00"
                    },
                    "enabled": true,
                    "id": 17840,
                    "is_active": true,
                    "is_infinite": false,
                    "project": {
                      "id": 12345,
                      "localized_name": "Christmas sale"
                    },
                    "read_only": false,
                    "technical_name": "christmas"
                  },
                  {
                    "datetime": null,
                    "enabled": false,
                    "id": 17891,
                    "is_active": false,
                    "is_infinite": true,
                    "project": {
                      "id": 12345,
                      "localized_name": "30% discount"
                    },
                    "read_only": false,
                    "technical_name": "Sale promotion"
                  }
                ]
              }
            },
            "description": "OK."
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "summary": "Список акций",
        "tags": [
          "promotions"
        ],
        "x-admin": true,
        "x-server": true
      },
      "post": {
        "description": "Создаёт новую акцию.\n<div class=\"notice\">\n  <p><strong>Внимание</strong></p><p> Этот метод API не включает в себя path-параметр <code>project_id</code>, поэтому для авторизации вам необходимо использовать ключ API, который действует во всех проектах. </p>\n</div>",
        "operationId": "create-promotion",
        "parameters": [
          {
            "$ref": "#/components/parameters/merchant-id-path-param"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "description": {
                  "en": "Promotion with 30% discount",
                  "ru": "Акция со скидкой 30%"
                },
                "label": {
                  "en": "30%",
                  "ru": "30%"
                },
                "name": {
                  "en": "30% discount",
                  "ru": "скидка 30%"
                },
                "project_id": 12345,
                "technical_name": "Sale promotion"
              },
              "schema": {
                "allOf": [
                  {
                    "required": [
                      "project_id",
                      "technical_name"
                    ]
                  },
                  {
                    "$ref": "#/components/schemas/GetPromotion"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "id": 17890
                },
                "schema": {
                  "properties": {
                    "id": {
                      "description": "ID акции.",
                      "type": "integer"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Created."
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "summary": "Создание акции",
        "tags": [
          "promotions"
        ],
        "x-admin": true,
        "x-server": true
      },
      "servers": [
        {
          "url": "https://api.xsolla.com/merchant/v2"
        }
      ]
    },
    "/merchants/{merchant_id}/promotions/{promotion_id}": {
      "delete": {
        "description": "Удаляет акцию. Вы можете удалять акции только с параметром `enabled` = `false`. \n<div class=\"notice\">\n  <p><strong>Внимание</strong></p><p> Этот метод API не включает в себя path-параметр <code>project_id</code>, поэтому для авторизации вам необходимо использовать ключ API, который действует во всех проектах. </p>\n</div>",
        "operationId": "delete-promotion",
        "parameters": [
          {
            "$ref": "#/components/parameters/merchant-id-path-param"
          },
          {
            "$ref": "#/components/parameters/promotion-id-path-param"
          }
        ],
        "responses": {
          "204": {
            "description": "No content."
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "summary": "Удаление акции",
        "tags": [
          "promotions"
        ],
        "x-admin": true,
        "x-server": true
      },
      "get": {
        "description": "Извлекает акцию. \n<div class=\"notice\">\n  <p><strong>Внимание</strong></p><p> Этот метод API не включает в себя path-параметр <code>project_id</code>, поэтому для авторизации вам необходимо использовать ключ API, который действует во всех проектах. </p>\n</div>",
        "operationId": "get-promotion",
        "parameters": [
          {
            "$ref": "#/components/parameters/merchant-id-path-param"
          },
          {
            "$ref": "#/components/parameters/promotion-id-path-param"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "description": {
                    "en": "Promotion with 30% discount",
                    "ru": "Акция со скидкой 30%"
                  },
                  "enabled": false,
                  "id": 17890,
                  "label": {
                    "en": "30%",
                    "ru": "30%"
                  },
                  "name": {
                    "en": "30% discount",
                    "ru": "Скидка 30%"
                  },
                  "project_id": 40544,
                  "read_only": false,
                  "show_banner": true,
                  "technical_name": "Sale promotion"
                },
                "schema": {
                  "$ref": "#/components/schemas/GetPromotion"
                }
              }
            },
            "description": "OK."
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "summary": "Информация об акции",
        "tags": [
          "promotions"
        ],
        "x-admin": true,
        "x-server": true
      },
      "put": {
        "description": "Обновляет акцию. Если акция доступна только для чтения (`read_only` = `true`), вам не разрешается изменять параметр `project_id`.  \n<div class=\"notice\">\n  <p><strong>Внимание</strong></p><p> Этот метод API не включает в себя path-параметр <code>project_id</code>, поэтому для авторизации вам необходимо использовать ключ API, который действует во всех проектах. </p>\n</div>",
        "operationId": "update-promotion",
        "parameters": [
          {
            "$ref": "#/components/parameters/merchant-id-path-param"
          },
          {
            "$ref": "#/components/parameters/promotion-id-path-param"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "description": {
                  "en": "Promotion with 5% discount",
                  "ru": "Акция со скидкой 5%"
                },
                "label": {
                  "en": "5%",
                  "ru": "5%"
                },
                "name": {
                  "en": "5% discount",
                  "ru": "скидка 5%"
                },
                "project_id": 40544,
                "technical_name": "Sale promotion"
              },
              "schema": {
                "allOf": [
                  {
                    "required": [
                      "project_id",
                      "technical_name"
                    ]
                  },
                  {
                    "$ref": "#/components/schemas/GetPromotion"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No content."
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "summary": "Изменение акции",
        "tags": [
          "promotions"
        ],
        "x-admin": true,
        "x-server": true
      },
      "servers": [
        {
          "url": "https://api.xsolla.com/merchant/v2"
        }
      ]
    },
    "/merchants/{merchant_id}/promotions/{promotion_id}/coupons": {
      "put": {
        "description": "Прикрепите купонную кампанию к определенной акции.\n<div class=\"notice\">\n  <p><strong>Внимание</strong></p><p> Этот метод API не включает в себя path-параметр <code>project_id</code>, поэтому для авторизации вам необходимо использовать ключ API, который действует во всех проектах. </p>\n</div>",
        "operationId": "attach-campaign-to-promotion",
        "parameters": [
          {
            "$ref": "#/components/parameters/merchant-id-path-param"
          },
          {
            "$ref": "#/components/parameters/promotion-id-path-param"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "campaigns": {
                    "description": "Массив с ID кампаний.",
                    "example": [
                      9135
                    ],
                    "items": {
                      "type": "integer"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "campaigns"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No content."
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "summary": "Привязка кампании к акции",
        "tags": [
          "coupons"
        ],
        "x-admin": true,
        "x-server": true
      },
      "servers": [
        {
          "url": "https://api.xsolla.com/merchant/v2"
        }
      ]
    },
    "/merchants/{merchant_id}/promotions/{promotion_id}/payment_systems": {
      "get": {
        "description": "Получает доступ к платежным системам, поддерживаемым в рамках акции. Если список пуст, акция будет распространяться на все платежные системы. \n<div class=\"notice\">\n  <p><strong>Внимание</strong></p><p> Этот метод API не включает в себя path-параметр <code>project_id</code>, поэтому для авторизации вам необходимо использовать ключ API, который действует во всех проектах. </p>\n</div>",
        "operationId": "get-payment-systems",
        "parameters": [
          {
            "$ref": "#/components/parameters/merchant-id-path-param"
          },
          {
            "$ref": "#/components/parameters/promotion-id-path-param"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "id": 17840,
                  "payment_systems": [
                    {
                      "id": 27,
                      "name": "Yandex.Money"
                    }
                  ]
                },
                "schema": {
                  "allOf": [
                    {
                      "properties": {
                        "id": {
                          "type": "integer"
                        }
                      },
                      "type": "object"
                    },
                    {
                      "$ref": "#/components/schemas/PromotionPaymentSystem"
                    }
                  ]
                }
              }
            },
            "description": "OK."
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "summary": "Список платежных систем",
        "tags": [
          "promotions"
        ],
        "x-admin": true,
        "x-server": true
      },
      "put": {
        "description": "Определяет платежные системы, поддерживаемые для акции. Если список пуст, акция будет применяться ко всем платежным системам. Если акция доступна только для чтения (`read_only` = `true`), вы не сможете использовать этот метод. \n<div class=\"notice\">\n  <p><strong>Внимание</strong></p><p> Этот метод API не включает в себя path-параметр <code>project_id</code>, поэтому для авторизации вам необходимо использовать ключ API, который действует во всех проектах. </p>\n</div>",
        "operationId": "set-payment-systems",
        "parameters": [
          {
            "$ref": "#/components/parameters/merchant-id-path-param"
          },
          {
            "$ref": "#/components/parameters/promotion-id-path-param"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "payment_systems": [
                  {
                    "id": 24,
                    "name": "PayPal"
                  }
                ]
              },
              "schema": {
                "$ref": "#/components/schemas/PromotionPaymentSystem"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No content."
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "summary": "Настройка способов оплаты",
        "tags": [
          "promotions"
        ],
        "x-admin": true,
        "x-server": true
      },
      "servers": [
        {
          "url": "https://api.xsolla.com/merchant/v2"
        }
      ]
    },
    "/merchants/{merchant_id}/promotions/{promotion_id}/periods": {
      "get": {
        "description": "Получает диапазоны дат и времени, в течение которых действует акция.\n<div class=\"notice\">\n  <p><strong>Внимание</strong></p><p> Этот метод API не включает в себя path-параметр <code>project_id</code>, поэтому для авторизации вам необходимо использовать ключ API, который действует во всех проектах. </p>\n</div>",
        "operationId": "get-validity-periods",
        "parameters": [
          {
            "$ref": "#/components/parameters/merchant-id-path-param"
          },
          {
            "$ref": "#/components/parameters/promotion-id-path-param"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "id": 17840,
                  "periods": [
                    {
                      "from": "2020-02-01T00:00:00+04:00",
                      "offset": "+04:00",
                      "to": "2020-11-30T01:28:42+04:00"
                    }
                  ]
                },
                "schema": {
                  "allOf": [
                    {
                      "properties": {
                        "id": {
                          "type": "integer"
                        }
                      },
                      "type": "object"
                    },
                    {
                      "$ref": "#/components/schemas/PromotionPeriod"
                    }
                  ]
                }
              }
            },
            "description": "OK."
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "summary": "Информация о периодах",
        "tags": [
          "promotions"
        ],
        "x-admin": true,
        "x-server": true
      },
      "put": {
        "description": "Устанавливает диапазоны дат и времени, в течение которых действует акция. Если акция доступна только для чтения (`read_only` = `true`), вы не сможете редактировать существующие периоды, но сможете добавлять новые. \n<div class=\"notice\">\n  <p><strong>Внимание</strong></p><p> Этот метод API не включает в себя path-параметр <code>project_id</code>, поэтому для авторизации вам необходимо использовать ключ API, который действует во всех проектах. </p>\n</div>",
        "operationId": "set-validity-periods",
        "parameters": [
          {
            "$ref": "#/components/parameters/merchant-id-path-param"
          },
          {
            "$ref": "#/components/parameters/promotion-id-path-param"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "periods": [
                  {
                    "from": "2019-03-02T00:00:00+04:00",
                    "to": "2019-04-02T00:00:00+04:00"
                  }
                ]
              },
              "schema": {
                "$ref": "#/components/schemas/PromotionPeriod"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No content."
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "summary": "Настройка периодов",
        "tags": [
          "promotions"
        ],
        "x-admin": true,
        "x-server": true
      },
      "servers": [
        {
          "url": "https://api.xsolla.com/merchant/v2"
        }
      ]
    },
    "/merchants/{merchant_id}/promotions/{promotion_id}/review": {
      "get": {
        "description": "Вам необходимо просмотреть акцию, прежде чем активировать ее. Этот метод возвращает список ошибок, если таковые имеются. \n<div class=\"notice\">\n  <p><strong>Внимание</strong></p><p> Этот метод API не включает в себя path-параметр <code>project_id</code>, поэтому для авторизации вам необходимо использовать ключ API, который действует во всех проектах. </p>\n</div>",
        "operationId": "review-promotion",
        "parameters": [
          {
            "$ref": "#/components/parameters/merchant-id-path-param"
          },
          {
            "$ref": "#/components/parameters/promotion-id-path-param"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": [
                  {
                    "component": "rewards",
                    "message": "Please select a reward"
                  }
                ],
                "schema": {
                  "items": {
                    "properties": {
                      "component": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK."
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "summary": "Проверка акции",
        "tags": [
          "promotions"
        ],
        "x-admin": true,
        "x-server": true
      },
      "servers": [
        {
          "url": "https://api.xsolla.com/merchant/v2"
        }
      ]
    },
    "/merchants/{merchant_id}/promotions/{promotion_id}/rewards": {
      "get": {
        "description": "Получает список вознаграждений, связанных с акцией. \n<div class=\"notice\">\n  <p><strong>Внимание</strong></p><p> Этот метод API не включает в себя path-параметр <code>project_id</code>, поэтому для авторизации вам необходимо использовать ключ API, который действует во всех проектах. </p>\n</div>",
        "operationId": "get-rewards",
        "parameters": [
          {
            "$ref": "#/components/parameters/merchant-id-path-param"
          },
          {
            "$ref": "#/components/parameters/promotion-id-path-param"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "id": 17840,
                  "item": {
                    "bonus": [
                      {
                        "id": 123456,
                        "localized_name": "T-34-3",
                        "quantity": 2,
                        "sku": "1234"
                      }
                    ],
                    "discount": [
                      {
                        "discount_percent": 5,
                        "localized_name": "T-34-3",
                        "max_amount": 10,
                        "sku": "1234"
                      }
                    ]
                  },
                  "package": {
                    "bonus_amount": 5,
                    "bonus_percent": 5
                  },
                  "purchase": {
                    "discount_percent": 10
                  },
                  "subscription": {
                    "trial_days": 30
                  }
                },
                "schema": {
                  "allOf": [
                    {
                      "properties": {
                        "id": {
                          "type": "integer"
                        }
                      },
                      "type": "object"
                    },
                    {
                      "$ref": "#/components/schemas/PromotionReward"
                    }
                  ]
                }
              }
            },
            "description": "OK."
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "summary": "Список вознаграждений",
        "tags": [
          "promotions"
        ],
        "x-admin": true,
        "x-server": true
      },
      "put": {
        "description": "Устанавливает вознаграждения за участие в акции. Если акция доступна только для чтения (`read_only` = `true`), вы не сможете обновить вознаграждения. \n<div class=\"notice\">\n  <p><strong>Внимание</strong></p><p> Этот метод API не включает в себя path-параметр <code>project_id</code>, поэтому для авторизации вам необходимо использовать ключ API, который действует во всех проектах. </p>\n</div>",
        "operationId": "set-rewards",
        "parameters": [
          {
            "$ref": "#/components/parameters/merchant-id-path-param"
          },
          {
            "$ref": "#/components/parameters/promotion-id-path-param"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "item": {
                  "bonus": [
                    {
                      "quantity": 2,
                      "sku": "1234"
                    }
                  ],
                  "discount": [
                    {
                      "discount_percent": 5,
                      "max_amount": 10,
                      "sku": "1234"
                    }
                  ]
                },
                "package": {
                  "bonus_amount": 5,
                  "bonus_percent": 5
                },
                "purchase": {
                  "discount_percent": 10
                },
                "subscription": {
                  "trial_days": 30
                }
              },
              "schema": {
                "$ref": "#/components/schemas/PromotionReward"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No content."
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "summary": "Настройка вознаграждений",
        "tags": [
          "promotions"
        ],
        "x-admin": true,
        "x-server": true
      },
      "servers": [
        {
          "url": "https://api.xsolla.com/merchant/v2"
        }
      ]
    },
    "/merchants/{merchant_id}/promotions/{promotion_id}/subject": {
      "get": {
        "description": "Получает информацию по теме акции. \n<div class=\"notice\">\n  <p><strong>Внимание</strong></p><p> Этот метод API не включает в себя path-параметр <code>project_id</code>, поэтому для авторизации вам необходимо использовать ключ API, который действует во всех проектах. </p>\n</div>",
        "operationId": "get-subject",
        "parameters": [
          {
            "$ref": "#/components/parameters/merchant-id-path-param"
          },
          {
            "$ref": "#/components/parameters/promotion-id-path-param"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "digital_contents": null,
                  "id": 178,
                  "items": [
                    {
                      "id": 1234,
                      "localized_name": "T-34-3",
                      "sku": "1234"
                    }
                  ],
                  "packages": null,
                  "purchase": false,
                  "subscriptions": null
                },
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PromotionSubject"
                    },
                    {
                      "properties": {
                        "id": {
                          "type": "integer"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "OK."
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "summary": "Информация о предмете акции",
        "tags": [
          "promotions"
        ],
        "x-admin": true,
        "x-server": true
      },
      "put": {
        "description": "Определяет тему рекламной акции. Если рекламная акция доступна только для чтения (`read_only` = `true`), вы не сможете обновить тему. Тема может принимать следующие значения: `purchase`, `items` или `packages`. \n<div class=\"notice\">\n  <p><strong>Внимание</strong></p><p> Этот метод API не включает в себя path-параметр <code>project_id</code>, поэтому для авторизации вам необходимо использовать ключ API, который действует во всех проектах. </p>\n</div>",
        "operationId": "set-subject",
        "parameters": [
          {
            "$ref": "#/components/parameters/merchant-id-path-param"
          },
          {
            "$ref": "#/components/parameters/promotion-id-path-param"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "digital_contents": null,
                "items": [
                  {
                    "sku": "1234"
                  }
                ],
                "packages": null,
                "purchase": false,
                "subscriptions": null
              },
              "schema": {
                "$ref": "#/components/schemas/PromotionSubject"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No content."
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "summary": "Настройка предмета акции",
        "tags": [
          "promotions"
        ],
        "x-admin": true,
        "x-server": true
      },
      "servers": [
        {
          "url": "https://api.xsolla.com/merchant/v2"
        }
      ]
    },
    "/merchants/{merchant_id}/promotions/{promotion_id}/toggle": {
      "put": {
        "description": "Переключает статус акции с `enabled` на `disabled` и наоборот. \n<div class=\"notice\">\n  <p><strong>Внимание</strong></p><p> Этот метод API не включает в себя path-параметр <code>project_id</code>, поэтому для авторизации вам необходимо использовать ключ API, который действует во всех проектах. </p>\n</div>",
        "operationId": "toggle-promotion",
        "parameters": [
          {
            "$ref": "#/components/parameters/merchant-id-path-param"
          },
          {
            "$ref": "#/components/parameters/promotion-id-path-param"
          }
        ],
        "responses": {
          "204": {
            "description": "No content."
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "summary": "Переключатель акции",
        "tags": [
          "promotions"
        ],
        "x-admin": true,
        "x-server": true
      },
      "servers": [
        {
          "url": "https://api.xsolla.com/merchant/v2"
        }
      ]
    },
    "/merchants/{merchant_id}/subscriptions": {
      "get": {
        "description": "Выводит список всех повторяющихся подписок.<div class=\"notice\"><strong>Внимание</strong><br><br>Этот метод API нельзя использовать при высокой нагрузке. Максимальная нагрузка составляет 20 запросов в минуту.</div> \n<div class=\"notice\">\n  <p><strong>Внимание</strong></p><p> Этот метод API не включает в себя path-параметр <code>project_id</code>, поэтому для авторизации вам необходимо использовать ключ API, который действует во всех проектах. </p>\n</div>",
        "operationId": "get-subscriptions",
        "parameters": [
          {
            "$ref": "#/components/parameters/merchant-id-path-param"
          },
          {
            "$ref": "#/components/parameters/offset-query-param"
          },
          {
            "$ref": "#/components/parameters/limit-query-param"
          },
          {
            "$ref": "#/components/parameters/user-id-query-param"
          },
          {
            "$ref": "#/components/parameters/array-project-id-query-param"
          },
          {
            "$ref": "#/components/parameters/array-plan-id-query-param"
          },
          {
            "$ref": "#/components/parameters/array-product-id-query-param"
          },
          {
            "$ref": "#/components/parameters/array-group-id-query-param"
          },
          {
            "$ref": "#/components/parameters/status-query-param-array"
          },
          {
            "$ref": "#/components/parameters/datetime-from-query-param"
          },
          {
            "$ref": "#/components/parameters/datetime-to-query-param"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": [
                  {
                    "charge_amount": 0.03,
                    "currency": "USD",
                    "date_create": "2013-09-05T15:27:47+04:00",
                    "date_end": "2014-02-06T11:32:48+04:00",
                    "date_last_charge": null,
                    "date_next_charge": null,
                    "id": 45,
                    "plan": {
                      "id": 12345,
                      "project_id": 12345
                    },
                    "product": {
                      "id": null
                    },
                    "status": "canceled",
                    "user": {
                      "id": "User1",
                      "name": "John Smith"
                    }
                  }
                ],
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/SubscriptionResponse"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK."
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "summary": "Список подписок",
        "tags": [
          "subscriptions"
        ],
        "x-admin": true,
        "x-server": true
      },
      "servers": [
        {
          "url": "https://api.xsolla.com/merchant/v2"
        }
      ]
    },
    "/merchants/{merchant_id}/token": {
      "post": {
        "description": "Вы можете создать токен с произвольными пользовательскими параметрами. Вы отправляете эти параметры при получении токена и получаете их обратно после успешной оплаты. Токен может содержать только параметры, описанные в этом документе или предварительно определенные вами. \n\nЕсли какой-либо параметр отправлен в неправильном формате или имеет неправильный тип, токен выдан не будет. Вы получите HTTP-код 422 с описанием ошибки в JSON-формате. В `extended_message` вы получите информацию о том, какие именно параметры были отправлены неправильно. \n<div class=\"notice\">\n  <p><strong>Внимание</strong></p><p> Этот метод API не включает в себя path-параметр <code>project_id</code>, поэтому для авторизации вам необходимо использовать ключ API, который действует во всех проектах. </p>\n</div>",
        "operationId": "create-token",
        "parameters": [
          {
            "$ref": "#/components/parameters/merchant-id-path-param"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/token"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "token": "eop57k1boA7nnYPtewZ6KEXJyJADEwRT"
                },
                "schema": {
                  "properties": {
                    "token": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Created."
          },
          "422": {
            "content": {
              "application/json": {
                "example": {
                  "extended_message": {
                    "global_errors": [],
                    "property_errors": {
                      "purchase.checkout.amount": [
                        "String value found, but a number is required"
                      ]
                    }
                  },
                  "http_status_code": 422,
                  "message": "JSON is not valid against json schema, please check documentation https://developers.xsolla.com/ru/api/v2/getting-started/#api_token_ui",
                  "request_id": "cd72633"
                },
                "schema": {
                  "properties": {
                    "extended_message": {
                      "properties": {
                        "global_errors": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "property_errors": {
                          "description": "Объект содержит названия параметров с описанием ошибки.",
                          "type": "object"
                        }
                      },
                      "type": "object"
                    },
                    "http_status_code": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Entity."
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "summary": "Создание токена",
        "tags": [
          "token"
        ],
        "x-server": true
      },
      "servers": [
        {
          "url": "https://api.xsolla.com/merchant/v2"
        }
      ]
    },
    "/projects/{project_id}/coupons/{code}/details": {
      "get": {
        "description": "Информация о купоне по его коду.",
        "operationId": "get-coupon",
        "parameters": [
          {
            "$ref": "#/components/parameters/project-id-path-param"
          },
          {
            "$ref": "#/components/parameters/code-path-param"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "key": "12",
                  "list_of_values": [],
                  "name": {
                    "en": "Level",
                    "ru": "Уровень"
                  },
                  "skip_condition_on_nonexistent_key": true,
                  "type": "int",
                  "visible": false
                },
                "schema": {
                  "$ref": "#/components/schemas/CouponAttribute"
                }
              }
            },
            "description": "OK."
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "summary": "Информация о купоне",
        "tags": [
          "coupons"
        ],
        "x-admin": true,
        "x-server": true
      },
      "servers": [
        {
          "url": "https://api.xsolla.com/merchant/v2"
        }
      ]
    },
    "/projects/{project_id}/coupons/{code}/redeem": {
      "post": {
        "description": "Активация купона.",
        "operationId": "redeem-coupon",
        "parameters": [
          {
            "$ref": "#/components/parameters/project-id-path-param"
          },
          {
            "$ref": "#/components/parameters/code-path-param"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "user_id": {
                    "description": "ID пользователя.",
                    "example": "1234",
                    "type": "string"
                  }
                },
                "required": [
                  "user_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "campaign_code": "new_campaign",
                  "coupon_code": "ddgf5bn4",
                  "coupon_id": 89613996,
                  "expiration_date": "2019-12-31T00:00:00+00:00",
                  "is_active": true,
                  "project_id": 12345,
                  "redeems_count_for_user": 10,
                  "redeems_count_remain": 20,
                  "subscription_coupon": null,
                  "virtual_currency_amount": 200,
                  "virtual_items": []
                },
                "schema": {
                  "$ref": "#/components/schemas/Coupon"
                }
              }
            },
            "description": "OK."
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "summary": "Активация купона",
        "tags": [
          "coupons"
        ],
        "x-admin": true,
        "x-server": true
      },
      "servers": [
        {
          "url": "https://api.xsolla.com/merchant/v2"
        }
      ]
    },
    "/projects/{project_id}/subscriptions/currencies": {
      "get": {
        "description": "Список валют.",
        "operationId": "get-currencies",
        "parameters": [
          {
            "$ref": "#/components/parameters/project-id-path-param"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": [
                  "AED",
                  "ALL",
                  "AMD",
                  "ARS",
                  "AUD",
                  "AZN",
                  "BAM",
                  "BBD",
                  "BGN",
                  "BHD",
                  "BND",
                  "BRL",
                  "BYN",
                  "BZD",
                  "CAD",
                  "CHF",
                  "CLP",
                  "CNY",
                  "COP",
                  "CRC",
                  "CZK",
                  "DKK",
                  "DZD",
                  "EGP",
                  "EUR",
                  "GBP",
                  "GEL",
                  "GHS",
                  "GIP",
                  "GTQ",
                  "HKD",
                  "HRK",
                  "HUF",
                  "IDR",
                  "ILS",
                  "INR",
                  "IQD",
                  "IRR",
                  "ISK",
                  "JMD",
                  "JOD",
                  "JPY",
                  "KES",
                  "KGS",
                  "KRW",
                  "KWD",
                  "KZT",
                  "LAK",
                  "LBP",
                  "LKR",
                  "MAD",
                  "MDL",
                  "MKD",
                  "MMK",
                  "MNT",
                  "MUR",
                  "MXN",
                  "MYR",
                  "NGN",
                  "NIO",
                  "NOK",
                  "NPR",
                  "NZD",
                  "OMR",
                  "PAB",
                  "PEN",
                  "PHP",
                  "PKR",
                  "PLN",
                  "PYG",
                  "QAR",
                  "RON",
                  "RSD",
                  "RUB",
                  "SAR",
                  "SEK",
                  "SGD",
                  "SVC",
                  "THB",
                  "TND",
                  "TRY",
                  "TWD",
                  "UAH",
                  "USD",
                  "UYU",
                  "UZS",
                  "VEF",
                  "VND",
                  "XOF",
                  "YER",
                  "ZAR"
                ]
              }
            },
            "description": "OK."
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "summary": "Список валют",
        "tags": [
          "payments"
        ],
        "x-admin": true,
        "x-server": true
      },
      "servers": [
        {
          "url": "https://api.xsolla.com/merchant/v2"
        }
      ]
    },
    "/projects/{project_id}/subscriptions/payments": {
      "get": {
        "description": "Список рекуррентных платежей.",
        "operationId": "get-payments",
        "parameters": [
          {
            "$ref": "#/components/parameters/project-id-path-param"
          },
          {
            "$ref": "#/components/parameters/offset-query-param"
          },
          {
            "$ref": "#/components/parameters/limit-query-param"
          },
          {
            "$ref": "#/components/parameters/user-id-query-param"
          },
          {
            "$ref": "#/components/parameters/status-id-query-param"
          },
          {
            "$ref": "#/components/parameters/datetime-from-query-param2"
          },
          {
            "$ref": "#/components/parameters/datetime-to-query-param2"
          },
          {
            "$ref": "#/components/parameters/subscription-id-query-param"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": [
                  {
                    "date_payment": "2016-04-05T10:02:01+03:00",
                    "id": 67683,
                    "id_payment": 203960,
                    "status": "fail",
                    "subscription": {
                      "charge_amount": 1,
                      "comment": null,
                      "currency": "RUB",
                      "date_create": "2015-05-28T14:33:54+03:00",
                      "date_end": "2016-04-05T10:02:07+03:00",
                      "date_last_charge": "2015-06-03T16:07:29+03:00",
                      "date_next_charge": "2015-06-04T00:00:00+03:00",
                      "id": 3646,
                      "plan": {
                        "billing_retry": {
                          "value": 1
                        },
                        "charge": {
                          "amount": 1,
                          "currency": "RUB",
                          "period": {
                            "type": "day",
                            "value": 1
                          }
                        },
                        "description": null,
                        "expiration": {
                          "type": "day",
                          "value": 0
                        },
                        "external_id": "E8nJ79",
                        "grace_period": {
                          "type": "day",
                          "value": 0
                        },
                        "group_id": "charge",
                        "id": 24,
                        "localized_name": null,
                        "name": null,
                        "project_id": 12345,
                        "refund_period": null,
                        "status": {
                          "value": "deleted"
                        },
                        "tags": null,
                        "trial": {
                          "type": "day",
                          "value": 0
                        },
                        "type": "charge"
                      },
                      "product": {
                        "description": null,
                        "group_id": "charge",
                        "id": 1,
                        "name": "charge"
                      },
                      "status": "freeze",
                      "user": {
                        "id": "10",
                        "name": "user2"
                      }
                    }
                  },
                  {
                    "date_payment": "2015-09-21T17:06:47+03:00",
                    "id": 1531,
                    "id_payment": 168866,
                    "status": "done",
                    "subscription": {
                      "charge_amount": 1,
                      "comment": "  \r\n",
                      "currency": "RUB",
                      "date_create": "2015-09-21T17:06:47+03:00",
                      "date_end": null,
                      "date_last_charge": "2015-09-21T18:10:09+03:00",
                      "date_next_charge": "2015-09-22T18:10:09+03:00",
                      "id": 2004846,
                      "plan": {
                        "billing_retry": {
                          "value": 1
                        },
                        "charge": {
                          "amount": 1,
                          "currency": "RUB",
                          "period": {
                            "type": "day",
                            "value": 1
                          }
                        },
                        "description": null,
                        "expiration": {
                          "type": "day",
                          "value": 0
                        },
                        "external_id": "E8nX9",
                        "grace_period": {
                          "type": "day",
                          "value": 0
                        },
                        "group_id": "charge",
                        "id": 200,
                        "localized_name": null,
                        "name": null,
                        "project_id": 70,
                        "refund_period": null,
                        "status": {
                          "value": "deleted"
                        },
                        "tags": null,
                        "trial": {
                          "type": "day",
                          "value": 0
                        },
                        "type": "charge"
                      },
                      "product": null,
                      "status": "new",
                      "user": {
                        "id": "12",
                        "name": "user1"
                      }
                    }
                  }
                ]
              }
            },
            "description": "OK."
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "summary": "Список платежей",
        "tags": [
          "payments"
        ],
        "x-admin": true,
        "x-server": true
      },
      "servers": [
        {
          "url": "https://api.xsolla.com/merchant/v2"
        }
      ]
    },
    "/projects/{project_id}/subscriptions/plans": {
      "get": {
        "description": "Список рекуррентных планов.",
        "operationId": "get-plans",
        "parameters": [
          {
            "$ref": "#/components/parameters/project-id-path-param"
          },
          {
            "$ref": "#/components/parameters/plan-id-query-param"
          },
          {
            "$ref": "#/components/parameters/limit-query-param"
          },
          {
            "$ref": "#/components/parameters/offset-query-param"
          },
          {
            "$ref": "#/components/parameters/external-id-query-param"
          },
          {
            "$ref": "#/components/parameters/group-id-query-param"
          },
          {
            "$ref": "#/components/parameters/product-id-query-param"
          },
          {
            "$ref": "#/components/parameters/query-query-param"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": [
                  {
                    "billing_retry": {
                      "value": 1
                    },
                    "charge": {
                      "amount": 19.99,
                      "currency": "USD",
                      "period": {
                        "type": "month",
                        "value": 1
                      },
                      "prices": [
                        {
                          "amount": 17.99,
                          "currency": "EUR",
                          "setup_fee": 1.5
                        },
                        {
                          "amount": 2000,
                          "currency": "JPY",
                          "setup_fee": 2.5
                        }
                      ]
                    },
                    "description": {
                      "en": "10x more experience!"
                    },
                    "expiration": {
                      "type": "day",
                      "value": 0
                    },
                    "external_id": "3b355320",
                    "grace_period": {
                      "type": "day",
                      "value": 0
                    },
                    "group_id": null,
                    "id": 241037,
                    "localized_name": "Platinum VIP",
                    "name": {
                      "en": "Platinum VIP",
                      "fr": "Le VIP-statut platinum"
                    },
                    "project_id": 40797,
                    "refund_period": null,
                    "status": {
                      "value": "active"
                    },
                    "tags": [],
                    "trial": {
                      "type": "day",
                      "value": 0
                    }
                  },
                  {
                    "billing_retry": {
                      "value": 1
                    },
                    "charge": {
                      "amount": 9.99,
                      "currency": "USD",
                      "period": {
                        "type": "month",
                        "value": 1
                      },
                      "prices": [
                        {
                          "amount": 8,
                          "currency": "EUR",
                          "setup_fee": 1.5
                        },
                        {
                          "amount": 1000,
                          "currency": "JPY",
                          "setup_fee": 2.5
                        }
                      ]
                    },
                    "description": {
                      "en": "3x more experience!"
                    },
                    "expiration": {
                      "type": "day",
                      "value": 0
                    },
                    "external_id": "0fe1b6fc",
                    "grace_period": {
                      "type": "day",
                      "value": 0
                    },
                    "group_id": null,
                    "id": 241038,
                    "localized_name": "Gold Status",
                    "name": {
                      "en": "Gold Status",
                      "fr": "Le statut d’or"
                    },
                    "project_id": 40797,
                    "refund_period": null,
                    "status": {
                      "value": "active"
                    },
                    "tags": [],
                    "trial": {
                      "type": "day",
                      "value": 0
                    }
                  }
                ],
                "schema": {
                  "items": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/SubscriptionsPlan"
                      },
                      {
                        "properties": {
                          "localized_name": {
                            "description": "Название плана языке по-умолчанию. Повторяет значение name.en.",
                            "type": "string"
                          }
                        },
                        "type": "object"
                      }
                    ]
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK."
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "summary": "Список планов",
        "tags": [
          "plans"
        ],
        "x-admin": true,
        "x-server": true
      },
      "post": {
        "description": "Создание рекуррентного плана.",
        "operationId": "create-plan",
        "parameters": [
          {
            "$ref": "#/components/parameters/project-id-path-param"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "billing_retry": {
                  "value": 1
                },
                "charge": {
                  "amount": 10,
                  "currency": "USD",
                  "period": {
                    "type": "month",
                    "value": 1
                  },
                  "prices": [
                    {
                      "amount": 8,
                      "currency": "EUR",
                      "setup_fee": 1.5
                    },
                    {
                      "amount": 1000,
                      "currency": "JPY",
                      "setup_fee": 2.5
                    }
                  ]
                },
                "description": {
                  "en": "2x more experience!"
                },
                "expiration": {
                  "type": "day",
                  "value": null
                },
                "external_id": "exp",
                "grace_period": {
                  "type": "day",
                  "value": 2
                },
                "name": {
                  "en": "Experience boost"
                },
                "refund_period": null,
                "status": {
                  "value": "active"
                },
                "trial": {
                  "type": "day",
                  "value": 7
                }
              },
              "schema": {
                "allOf": [
                  {
                    "required": [
                      "name",
                      "charge"
                    ]
                  },
                  {
                    "$ref": "#/components/schemas/SubscriptionsPlan"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "external_id": "exp",
                  "plan_id": 241082
                },
                "schema": {
                  "properties": {
                    "external_id": {
                      "type": "string"
                    },
                    "plan_id": {
                      "type": "integer"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Сreated."
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "summary": "Создание плана",
        "tags": [
          "plans"
        ],
        "x-admin": true,
        "x-server": true
      },
      "servers": [
        {
          "url": "https://api.xsolla.com/merchant/v2"
        }
      ]
    },
    "/projects/{project_id}/subscriptions/plans/{plan_id}": {
      "delete": {
        "description": "Отключение рекуррентного плана.",
        "operationId": "disable-plan",
        "parameters": [
          {
            "$ref": "#/components/parameters/project-id-path-param"
          },
          {
            "$ref": "#/components/parameters/plan-id-path-param"
          }
        ],
        "responses": {
          "204": {
            "description": "No content."
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "summary": "Отключение плана",
        "tags": [
          "plans"
        ],
        "x-admin": true,
        "x-server": true
      },
      "patch": {
        "description": "Включить рекуррентный план.",
        "operationId": "enable-plan",
        "parameters": [
          {
            "$ref": "#/components/parameters/project-id-path-param"
          },
          {
            "$ref": "#/components/parameters/plan-id-path-param"
          }
        ],
        "responses": {
          "204": {
            "description": "No content."
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "summary": "Включение плана",
        "tags": [
          "plans"
        ],
        "x-admin": true,
        "x-server": true
      },
      "put": {
        "description": "Изменение параметров рекуррентного плана.",
        "operationId": "update-plan-parameters",
        "parameters": [
          {
            "$ref": "#/components/parameters/project-id-path-param"
          },
          {
            "$ref": "#/components/parameters/plan-id-path-param"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "billing_retry": {
                  "value": 1
                },
                "charge": {
                  "amount": 20,
                  "currency": "USD",
                  "period": {
                    "type": "month",
                    "value": 1
                  },
                  "prices": [
                    {
                      "amount": 17,
                      "currency": "EUR",
                      "setup_fee": 1.5
                    },
                    {
                      "amount": 2000,
                      "currency": "JPY",
                      "setup_fee": 2.5
                    }
                  ]
                },
                "description": {
                  "en": "3x more experience!"
                },
                "expiration": {
                  "type": "day",
                  "value": null
                },
                "external_id": "exp",
                "grace_period": {
                  "type": "day",
                  "value": 2
                },
                "name": {
                  "en": "Experience boost"
                },
                "refund_period": null,
                "tags": [],
                "trial": {
                  "type": "day",
                  "value": 7
                }
              },
              "schema": {
                "$ref": "#/components/schemas/SubscriptionsPlanRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "billing_retry": {
                    "value": 1
                  },
                  "charge": {
                    "amount": 20,
                    "currency": "USD",
                    "period": {
                      "type": "month",
                      "value": 1
                    },
                    "prices": [
                      {
                        "amount": 17,
                        "currency": "EUR",
                        "setup_fee": 1.5
                      },
                      {
                        "amount": 2000,
                        "currency": "JPY",
                        "setup_fee": 2.5
                      }
                    ]
                  },
                  "description": {
                    "en": "3x more experience!"
                  },
                  "expiration": {
                    "type": "day",
                    "value": 0
                  },
                  "external_id": "exp",
                  "grace_period": {
                    "type": "day",
                    "value": 2
                  },
                  "group_id": null,
                  "id": 241082,
                  "localized_name": "Experience boost",
                  "name": {
                    "en": "Experience boost"
                  },
                  "project_id": 40797,
                  "refund_period": null,
                  "status": {
                    "value": "active"
                  },
                  "tags": [],
                  "trial": {
                    "type": "day",
                    "value": 7
                  },
                  "type": "all"
                }
              }
            },
            "description": "OK."
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "summary": "Обновление плана",
        "tags": [
          "plans"
        ],
        "x-admin": true,
        "x-server": true
      },
      "servers": [
        {
          "url": "https://api.xsolla.com/merchant/v2"
        }
      ]
    },
    "/projects/{project_id}/subscriptions/plans/{plan_id}/delete": {
      "delete": {
        "description": "Удаление рекуррентного плана.",
        "operationId": "delete-plan",
        "parameters": [
          {
            "$ref": "#/components/parameters/project-id-path-param"
          },
          {
            "$ref": "#/components/parameters/plan-id-path-param"
          }
        ],
        "responses": {
          "204": {
            "description": "No content."
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "summary": "Удаление плана",
        "tags": [
          "plans"
        ],
        "x-admin": true,
        "x-server": true
      },
      "servers": [
        {
          "url": "https://api.xsolla.com/merchant/v2"
        }
      ]
    },
    "/projects/{project_id}/subscriptions/products": {
      "get": {
        "description": "Lists all subscription-based products.",
        "operationId": "get-products",
        "parameters": [
          {
            "$ref": "#/components/parameters/project-id-path-param"
          },
          {
            "$ref": "#/components/parameters/offset-query-param"
          },
          {
            "$ref": "#/components/parameters/limit-query-param"
          },
          {
            "$ref": "#/components/parameters/group-id-query-param"
          },
          {
            "$ref": "#/components/parameters/product-id-query-param"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": [
                  {
                    "description": {
                      "en": "Description in English."
                    },
                    "group_id": "charge",
                    "id": 714,
                    "name": "Channel"
                  },
                  {
                    "description": {
                      "en": "Description in English."
                    },
                    "group_id": "notify",
                    "id": 715,
                    "name": "notify"
                  },
                  {
                    "description": {
                      "en": "Description in English."
                    },
                    "group_id": "charge",
                    "id": 716,
                    "name": "charge2"
                  },
                  {
                    "description": {
                      "en": "Description in English."
                    },
                    "group_id": "charge",
                    "id": 486,
                    "name": "Channel2"
                  }
                ],
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/SubscriptionsProductWithId"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK."
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "summary": "Список продуктов",
        "tags": [
          "products"
        ],
        "x-admin": true,
        "x-server": true
      },
      "post": {
        "description": "Creates a subscription-based product.",
        "operationId": "create-product",
        "parameters": [
          {
            "$ref": "#/components/parameters/project-id-path-param"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "description": {
                  "en": "Kids TV"
                },
                "group_id": "charge",
                "name": "Channel2"
              },
              "schema": {
                "allOf": [
                  {
                    "required": [
                      "name",
                      "group_id"
                    ]
                  },
                  {
                    "$ref": "#/components/schemas/SubscriptionsProduct"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "product_id": 172003
                },
                "schema": {
                  "properties": {
                    "product_id": {
                      "type": "integer"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Created."
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "summary": "Создание продукта",
        "tags": [
          "products"
        ],
        "x-admin": true,
        "x-server": true
      },
      "servers": [
        {
          "url": "https://api.xsolla.com/merchant/v2"
        }
      ]
    },
    "/projects/{project_id}/subscriptions/products/{product_id}": {
      "delete": {
        "description": "Deletes a subscription-based product.",
        "operationId": "delete-product",
        "parameters": [
          {
            "$ref": "#/components/parameters/project-id-path-param"
          },
          {
            "$ref": "#/components/parameters/product-id-path-param"
          }
        ],
        "responses": {
          "204": {
            "description": "No content."
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "summary": "Удаление продукта",
        "tags": [
          "products"
        ],
        "x-admin": true,
        "x-server": true
      },
      "put": {
        "description": "Updates a subscription-based product.",
        "operationId": "update-product",
        "parameters": [
          {
            "$ref": "#/components/parameters/project-id-path-param"
          },
          {
            "$ref": "#/components/parameters/product-id-path-param"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "description": {
                  "en": "Description in English."
                },
                "group_id": "charge13",
                "name": "Channel23"
              },
              "schema": {
                "allOf": [
                  {
                    "required": [
                      "name",
                      "group_id"
                    ]
                  },
                  {
                    "$ref": "#/components/schemas/SubscriptionsProduct"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "description": {
                    "en": "Description in English."
                  },
                  "group_id": "charge13",
                  "id": 1713603,
                  "name": "Channel23"
                },
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionsProductWithId"
                }
              }
            },
            "description": "OK."
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "summary": "Изменение продукта",
        "tags": [
          "products"
        ],
        "x-admin": true,
        "x-server": true
      },
      "servers": [
        {
          "url": "https://api.xsolla.com/merchant/v2"
        }
      ]
    },
    "/projects/{project_id}/subscriptions/{subscription_id}": {
      "get": {
        "description": "Информация о конкретной подписке по ID.",
        "operationId": "get-subscription",
        "parameters": [
          {
            "$ref": "#/components/parameters/project-id-path-param"
          },
          {
            "$ref": "#/components/parameters/subscription-id-path-param"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "charge_amount": 0.03,
                  "comment": "The subscription was not extended in due time",
                  "currency": "USD",
                  "date_create": "2018-09-21T16:54:59+03:00",
                  "date_end": "2019-02-06T12:43:04+03:00",
                  "date_last_charge": "2018-09-21T16:55:05+03:00",
                  "date_next_charge": "2018-09-21T16:55:05+03:00",
                  "id": 249579,
                  "plan": {
                    "external_id": "lowcost",
                    "id": 601
                  },
                  "product": {
                    "id": 123456
                  },
                  "status": "canceled",
                  "user": {
                    "id": "user1",
                    "name": "John Smith"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionResponse"
                }
              }
            },
            "description": "OK."
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "summary": "Информация о подписке",
        "tags": [
          "subscriptions"
        ],
        "x-admin": true,
        "x-server": true
      },
      "servers": [
        {
          "url": "https://api.xsolla.com/merchant/v2"
        }
      ]
    },
    "/projects/{project_id}/users/{user_id}/subscriptions/payments": {
      "get": {
        "description": "Список рекуррентных платежей пользователя.",
        "operationId": "get-user-payments",
        "parameters": [
          {
            "$ref": "#/components/parameters/project-id-path-param"
          },
          {
            "$ref": "#/components/parameters/user-id-path-param"
          },
          {
            "$ref": "#/components/parameters/status-id-query-param"
          },
          {
            "$ref": "#/components/parameters/offset-query-param"
          },
          {
            "$ref": "#/components/parameters/limit-query-param"
          },
          {
            "$ref": "#/components/parameters/datetime-from-query-param"
          },
          {
            "$ref": "#/components/parameters/datetime-to-query-param"
          },
          {
            "$ref": "#/components/parameters/subscription-id-query-param"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": [
                  {
                    "date_payment": "2016-04-05T10:02:01+03:00",
                    "id": 6746083,
                    "id_payment": 202789960,
                    "status": "fail",
                    "subscription": {
                      "charge_amount": 200,
                      "comment": null,
                      "currency": "RUB",
                      "date_create": "2015-05-28T14:33:54+03:00",
                      "date_end": "2016-04-05T10:02:07+03:00",
                      "date_last_charge": "2015-06-03T16:07:29+03:00",
                      "date_next_charge": "2015-06-04T00:00:00+03:00",
                      "id": 36946,
                      "plan": {
                        "charge": {
                          "amount": 200,
                          "currency": "RUB",
                          "period": {
                            "type": "day",
                            "value": 1
                          }
                        },
                        "description": null,
                        "expiration": {
                          "type": "day",
                          "value": 0
                        },
                        "external_id": "E8n34J79",
                        "grace_period": {
                          "type": "day",
                          "value": 0
                        },
                        "group_id": "charge",
                        "id": 24,
                        "localized_name": null,
                        "name": null,
                        "project_id": 1234,
                        "refund_period": null,
                        "status": {
                          "value": "deleted"
                        },
                        "tags": null,
                        "trial": {
                          "type": "day",
                          "value": 0
                        },
                        "type": "charge"
                      },
                      "product": {
                        "description": null,
                        "group_id": "charge",
                        "id": 1,
                        "name": "charge"
                      },
                      "status": "freeze",
                      "user": {
                        "id": "12",
                        "name": "John"
                      }
                    }
                  }
                ]
              }
            },
            "description": "OK."
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "summary": "Список платежей пользователя",
        "tags": [
          "payments"
        ],
        "x-admin": true,
        "x-server": true
      },
      "servers": [
        {
          "url": "https://api.xsolla.com/merchant/v2"
        }
      ]
    },
    "/projects/{project_id}/users/{user_id}/subscriptions/{subscription_id}": {
      "put": {
        "description": "Изменение рекуррентной подписки. Можно изменить статус подписки (`active`, `canceled` или `non_renewing`) и отложить дату следующего списания для данной подписки.",
        "operationId": "update-subscription",
        "parameters": [
          {
            "$ref": "#/components/parameters/project-id-path-param"
          },
          {
            "$ref": "#/components/parameters/user-id-path-param"
          },
          {
            "$ref": "#/components/parameters/subscription-id-path-param"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "status": "active"
              },
              "schema": {
                "$ref": "#/components/schemas/Subscription"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "charge_amount": 0.03,
                  "currency": "USD",
                  "date_create": "2018-09-21T16:54:59+03:00",
                  "date_end": null,
                  "date_last_charge": "2018-09-21T16:55:05+03:00",
                  "date_next_charge": "2018-09-21T16:55:05+03:00",
                  "id": 24953579,
                  "plan": {
                    "billing_retry": {
                      "value": 1
                    },
                    "charge": {
                      "amount": 0.03,
                      "currency": "USD",
                      "period": {
                        "type": "day",
                        "value": 1
                      }
                    },
                    "description": null,
                    "expiration": {
                      "type": "day",
                      "value": 0
                    },
                    "external_id": "lowcost",
                    "grace_period": {
                      "type": "day",
                      "value": 2
                    },
                    "group_id": "newPlans",
                    "id": 66001,
                    "localized_name": null,
                    "name": null,
                    "project_id": 18404,
                    "refund_period": null,
                    "status": {
                      "value": "active"
                    },
                    "tags": null,
                    "trial": {
                      "type": "day",
                      "value": 0
                    },
                    "type": "all"
                  },
                  "product": null,
                  "status": "active",
                  "user": {
                    "id": "jb1",
                    "name": "J.Black"
                  }
                }
              }
            },
            "description": "OK."
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "summary": "Изменение подписки",
        "tags": [
          "subscriptions"
        ],
        "x-admin": true,
        "x-server": true
      },
      "servers": [
        {
          "url": "https://api.xsolla.com/merchant/v2"
        }
      ]
    }
  },
  "tags": [
    {
      "name": "token",
      "x-displayName": "Токен"
    },
    {
      "name": "plans",
      "x-displayName": "Планы"
    },
    {
      "name": "products",
      "x-displayName": "Продукты"
    },
    {
      "name": "subscriptions",
      "x-displayName": "Subscription management"
    },
    {
      "name": "payments",
      "x-displayName": "Платежи"
    },
    {
      "name": "promotions",
      "x-displayName": "Акции"
    },
    {
      "name": "coupons",
      "x-displayName": "Купоны"
    },
    {
      "name": "subscription-management",
      "x-displayName": "Subscription management"
    }
  ],
  "x-tagGroups": [
    {
      "name": "Admin subscription management",
      "tags": [
        "token",
        "plans",
        "products",
        "subscriptions",
        "payments",
        "promotions",
        "coupons"
      ]
    },
    {
      "name": "User subscription management",
      "tags": [
        "subscription-management"
      ]
    }
  ]
}