{
  "openapi": "3.0.0",
  "paths": {
    "/v1/ecom/payments/cards": {
      "get": {
        "operationId": "OrdersController_getCards",
        "summary": "Получение списка сохраненных карт",
        "parameters": [
          {
            "name": "buyerId",
            "required": true,
            "in": "query",
            "description": "ID покупателя, который был передан при регистрации заказа",
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          },
          {
            "name": "bankId",
            "required": false,
            "in": "query",
            "example": 100,
            "description": "ID банка, для которого была сохранена карта. По умолчанию - все банки",
            "schema": {
              "enum": [
                100,
                700
              ],
              "type": "number"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Токен из личного кабинета ATOL PAY: раздел Настройки -> API Токены.\nФормат значения: Bearer {token}.\nОбязательно должен передаваться либо Authorization, либо x-secret-id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-secret-id",
            "in": "header",
            "description": "ID секрета из личного кабинета ATOL PAY: раздел Настройки -> Секреты аутентификации.\nАльтернатива авторизации по токену (вместо заголовка Authorization)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-signature",
            "in": "header",
            "description": "Подпись запроса на основе секрета c ID={x-secret-id}.\nОбязателен, если передан заголовок x-secret-id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetCardsEndpointResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestSwagger"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorSwagger"
                }
              }
            }
          }
        },
        "tags": [
          "Orders"
        ]
      }
    },
    "/v1/ecom/payments/cards/{cardId}": {
      "delete": {
        "operationId": "OrdersController_destroyCard",
        "summary": "Удаление карты",
        "parameters": [
          {
            "name": "cardId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Токен из личного кабинета ATOL PAY: раздел Настройки -> API Токены.\nФормат значения: Bearer {token}.\nОбязательно должен передаваться либо Authorization, либо x-secret-id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-secret-id",
            "in": "header",
            "description": "ID секрета из личного кабинета ATOL PAY: раздел Настройки -> Секреты аутентификации.\nАльтернатива авторизации по токену (вместо заголовка Authorization)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-signature",
            "in": "header",
            "description": "Подпись запроса на основе секрета c ID={x-secret-id}.\nОбязателен, если передан заголовок x-secret-id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DestroyCardEndpointResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestSwagger"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorSwagger"
                }
              }
            }
          }
        },
        "tags": [
          "Orders"
        ]
      }
    },
    "/v1/ecom/payments/{orderId}/status": {
      "get": {
        "operationId": "OrdersController_getOrderStatus",
        "summary": "Проверка статуса заказа",
        "parameters": [
          {
            "name": "orderId",
            "required": true,
            "in": "path",
            "description": "ID заказа",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Токен из личного кабинета ATOL PAY: раздел Настройки -> API Токены.\nФормат значения: Bearer {token}.\nОбязательно должен передаваться либо Authorization, либо x-secret-id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-secret-id",
            "in": "header",
            "description": "ID секрета из личного кабинета ATOL PAY: раздел Настройки -> Секреты аутентификации.\nАльтернатива авторизации по токену (вместо заголовка Authorization)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-signature",
            "in": "header",
            "description": "Подпись запроса на основе секрета c ID={x-secret-id}.\nОбязателен, если передан заголовок x-secret-id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckOrderStatusEndpointResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestSwagger"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorSwagger"
                }
              }
            }
          }
        },
        "tags": [
          "Orders"
        ]
      }
    },
    "/v1/ecom/payments/{orderId}/refund-items": {
      "get": {
        "operationId": "OrdersController_getPositionsToRefund",
        "summary": "Получение списка товаров, доступных к возврату",
        "parameters": [
          {
            "name": "orderId",
            "required": true,
            "in": "path",
            "description": "ID заказа",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Токен из личного кабинета ATOL PAY: раздел Настройки -> API Токены.\nФормат значения: Bearer {token}.\nОбязательно должен передаваться либо Authorization, либо x-secret-id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-secret-id",
            "in": "header",
            "description": "ID секрета из личного кабинета ATOL PAY: раздел Настройки -> Секреты аутентификации.\nАльтернатива авторизации по токену (вместо заголовка Authorization)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-signature",
            "in": "header",
            "description": "Подпись запроса на основе секрета c ID={x-secret-id}.\nОбязателен, если передан заголовок x-secret-id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetPositionsToRefundEndpointResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestSwagger"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorSwagger"
                }
              }
            }
          }
        },
        "tags": [
          "Orders"
        ]
      }
    },
    "/v1/ecom/payments": {
      "post": {
        "operationId": "OrdersController_registerOrder",
        "summary": "Регистрация заказа",
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "description": "Токен из личного кабинета ATOL PAY: раздел Настройки -> API Токены.\nФормат значения: Bearer {token}.\nОбязательно должен передаваться либо Authorization, либо x-secret-id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-secret-id",
            "in": "header",
            "description": "ID секрета из личного кабинета ATOL PAY: раздел Настройки -> Секреты аутентификации.\nАльтернатива авторизации по токену (вместо заголовка Authorization)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-signature",
            "in": "header",
            "description": "Подпись запроса на основе секрета c ID={x-secret-id}.\nОбязателен, если передан заголовок x-secret-id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterOrderPubRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegisterPaymentEndpointResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestSwagger"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorSwagger"
                }
              }
            }
          }
        },
        "tags": [
          "Orders"
        ]
      }
    },
    "/v1/ecom/payments/{orderId}/cancel": {
      "post": {
        "operationId": "OrdersController_cancelOrder",
        "summary": "Отмена заказа по клиентскому номеру заказа",
        "parameters": [
          {
            "name": "orderId",
            "required": true,
            "in": "path",
            "description": "ID заказа",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Токен из личного кабинета ATOL PAY: раздел Настройки -> API Токены.\nФормат значения: Bearer {token}.\nОбязательно должен передаваться либо Authorization, либо x-secret-id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-secret-id",
            "in": "header",
            "description": "ID секрета из личного кабинета ATOL PAY: раздел Настройки -> Секреты аутентификации.\nАльтернатива авторизации по токену (вместо заголовка Authorization)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-signature",
            "in": "header",
            "description": "Подпись запроса на основе секрета c ID={x-secret-id}.\nОбязателен, если передан заголовок x-secret-id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelOrderPubRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CancelPaymentEndpointResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestSwagger"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorSwagger"
                }
              }
            }
          }
        },
        "tags": [
          "Orders"
        ]
      }
    },
    "/v1/ecom/payments/{orderId}/deposit": {
      "post": {
        "operationId": "OrdersController_depositOrder",
        "summary": "Списание средств по 2-стадийному заказу",
        "parameters": [
          {
            "name": "orderId",
            "required": true,
            "in": "path",
            "description": "ID заказа",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Токен из личного кабинета ATOL PAY: раздел Настройки -> API Токены.\nФормат значения: Bearer {token}.\nОбязательно должен передаваться либо Authorization, либо x-secret-id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-secret-id",
            "in": "header",
            "description": "ID секрета из личного кабинета ATOL PAY: раздел Настройки -> Секреты аутентификации.\nАльтернатива авторизации по токену (вместо заголовка Authorization)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-signature",
            "in": "header",
            "description": "Подпись запроса на основе секрета c ID={x-secret-id}.\nОбязателен, если передан заголовок x-secret-id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DepositPaymentEndpointResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestSwagger"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorSwagger"
                }
              }
            }
          }
        },
        "tags": [
          "Orders"
        ]
      }
    },
    "/v1/ecom/payments/{orderId}/account/complete": {
      "post": {
        "operationId": "OrdersController_completeOrderByAccount",
        "summary": "Завершение заказа по оплате по счету",
        "parameters": [
          {
            "name": "orderId",
            "required": true,
            "in": "path",
            "description": "ID заказа",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Токен из личного кабинета ATOL PAY: раздел Настройки -> API Токены.\nФормат значения: Bearer {token}.\nОбязательно должен передаваться либо Authorization, либо x-secret-id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-secret-id",
            "in": "header",
            "description": "ID секрета из личного кабинета ATOL PAY: раздел Настройки -> Секреты аутентификации.\nАльтернатива авторизации по токену (вместо заголовка Authorization)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-signature",
            "in": "header",
            "description": "Подпись запроса на основе секрета c ID={x-secret-id}.\nОбязателен, если передан заголовок x-secret-id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompleteByAccountEndpointResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestSwagger"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorSwagger"
                }
              }
            }
          }
        },
        "tags": [
          "Orders"
        ]
      }
    },
    "/v1/ecom/payments/{orderId}/recurring/pay": {
      "post": {
        "operationId": "OrdersController_payOrderByRecurring",
        "summary": "Оплата через рекарринг",
        "parameters": [
          {
            "name": "orderId",
            "required": true,
            "in": "path",
            "description": "ID заказа",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Токен из личного кабинета ATOL PAY: раздел Настройки -> API Токены.\nФормат значения: Bearer {token}.\nОбязательно должен передаваться либо Authorization, либо x-secret-id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-secret-id",
            "in": "header",
            "description": "ID секрета из личного кабинета ATOL PAY: раздел Настройки -> Секреты аутентификации.\nАльтернатива авторизации по токену (вместо заголовка Authorization)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-signature",
            "in": "header",
            "description": "Подпись запроса на основе секрета c ID={x-secret-id}.\nОбязателен, если передан заголовок x-secret-id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PayOrderByRecurringRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PayOrderByRecurringEndpointResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestSwagger"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorSwagger"
                }
              }
            }
          }
        },
        "tags": [
          "Orders"
        ]
      }
    },
    "/v1/ecom/buyer-subscriptions/order": {
      "post": {
        "operationId": "BuyerSubscriptionsController_createBuyerSubscriptionOrder",
        "summary": "Создание заказа на оплату подписки",
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "description": "Токен из личного кабинета ATOL PAY: раздел Настройки -> API Токены.\nФормат значения: Bearer {token}.\nОбязательно должен передаваться либо Authorization, либо x-secret-id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-secret-id",
            "in": "header",
            "description": "ID секрета из личного кабинета ATOL PAY: раздел Настройки -> Секреты аутентификации.\nАльтернатива авторизации по токену (вместо заголовка Authorization)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-signature",
            "in": "header",
            "description": "Подпись запроса на основе секрета c ID={x-secret-id}.\nОбязателен, если передан заголовок x-secret-id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBuyerSubscriptionOrderPubRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateBuyerSubscriptionOrderEndpointResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestSwagger"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorSwagger"
                }
              }
            }
          }
        },
        "tags": [
          "Buyer subscriptions"
        ]
      }
    },
    "/v1/ecom/buyer-subscriptions/{subscriptionId}/cancel": {
      "post": {
        "operationId": "BuyerSubscriptionsController_cancelBuyerSubscription",
        "summary": "Отмена подписки",
        "parameters": [
          {
            "name": "subscriptionId",
            "required": true,
            "in": "path",
            "description": "ID подписки",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Токен из личного кабинета ATOL PAY: раздел Настройки -> API Токены.\nФормат значения: Bearer {token}.\nОбязательно должен передаваться либо Authorization, либо x-secret-id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-secret-id",
            "in": "header",
            "description": "ID секрета из личного кабинета ATOL PAY: раздел Настройки -> Секреты аутентификации.\nАльтернатива авторизации по токену (вместо заголовка Authorization)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-signature",
            "in": "header",
            "description": "Подпись запроса на основе секрета c ID={x-secret-id}.\nОбязателен, если передан заголовок x-secret-id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CancelBuyerSubscriptionEndpointResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestSwagger"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorSwagger"
                }
              }
            }
          }
        },
        "tags": [
          "Buyer subscriptions"
        ]
      }
    },
    "/v1/ecom/buyer-subscriptions": {
      "get": {
        "operationId": "BuyerSubscriptionsController_getBuyerSubscriptions",
        "summary": "Получение списка подписок",
        "parameters": [
          {
            "name": "subscriptionIds",
            "required": true,
            "in": "query",
            "description": "Список ID подписок, через запятую",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Токен из личного кабинета ATOL PAY: раздел Настройки -> API Токены.\nФормат значения: Bearer {token}.\nОбязательно должен передаваться либо Authorization, либо x-secret-id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-secret-id",
            "in": "header",
            "description": "ID секрета из личного кабинета ATOL PAY: раздел Настройки -> Секреты аутентификации.\nАльтернатива авторизации по токену (вместо заголовка Authorization)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-signature",
            "in": "header",
            "description": "Подпись запроса на основе секрета c ID={x-secret-id}.\nОбязателен, если передан заголовок x-secret-id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetBuyerSubscriptionsEndpointResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestSwagger"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorSwagger"
                }
              }
            }
          }
        },
        "tags": [
          "Buyer subscriptions"
        ]
      }
    },
    "/v1/ecom/subscription-plans": {
      "get": {
        "operationId": "SubscriptionPlansController_getSubscriptionPlans",
        "summary": "Получение списка планов подписок",
        "parameters": [
          {
            "name": "subscriptionPlanIds",
            "required": false,
            "in": "query",
            "description": "Список ID планов подписок, через запятую",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "externalPlanIds",
            "required": false,
            "in": "query",
            "description": "Список внешних ID планов подписок, через запятую",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Токен из личного кабинета ATOL PAY: раздел Настройки -> API Токены.\nФормат значения: Bearer {token}.\nОбязательно должен передаваться либо Authorization, либо x-secret-id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-secret-id",
            "in": "header",
            "description": "ID секрета из личного кабинета ATOL PAY: раздел Настройки -> Секреты аутентификации.\nАльтернатива авторизации по токену (вместо заголовка Authorization)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-signature",
            "in": "header",
            "description": "Подпись запроса на основе секрета c ID={x-secret-id}.\nОбязателен, если передан заголовок x-secret-id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetSubscriptionPlansEndpointResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestSwagger"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorSwagger"
                }
              }
            }
          }
        },
        "tags": [
          "Subscription plans"
        ]
      },
      "post": {
        "operationId": "SubscriptionPlansController_createSubscriptionPlan",
        "summary": "Создание плана подписки",
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "description": "Токен из личного кабинета ATOL PAY: раздел Настройки -> API Токены.\nФормат значения: Bearer {token}.\nОбязательно должен передаваться либо Authorization, либо x-secret-id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-secret-id",
            "in": "header",
            "description": "ID секрета из личного кабинета ATOL PAY: раздел Настройки -> Секреты аутентификации.\nАльтернатива авторизации по токену (вместо заголовка Authorization)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-signature",
            "in": "header",
            "description": "Подпись запроса на основе секрета c ID={x-secret-id}.\nОбязателен, если передан заголовок x-secret-id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSubscriptionPlanPubRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateSubscriptionPlanEndpointResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestSwagger"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorSwagger"
                }
              }
            }
          }
        },
        "tags": [
          "Subscription plans"
        ]
      },
      "patch": {
        "operationId": "SubscriptionPlansController_updateSubscriptionPlan",
        "summary": "Обновление плана подписки",
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "description": "Токен из личного кабинета ATOL PAY: раздел Настройки -> API Токены.\nФормат значения: Bearer {token}.\nОбязательно должен передаваться либо Authorization, либо x-secret-id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-secret-id",
            "in": "header",
            "description": "ID секрета из личного кабинета ATOL PAY: раздел Настройки -> Секреты аутентификации.\nАльтернатива авторизации по токену (вместо заголовка Authorization)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-signature",
            "in": "header",
            "description": "Подпись запроса на основе секрета c ID={x-secret-id}.\nОбязателен, если передан заголовок x-secret-id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSubscriptionPlanPubRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateSubscriptionPlanEndpointResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestSwagger"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorSwagger"
                }
              }
            }
          }
        },
        "tags": [
          "Subscription plans"
        ]
      }
    },
    "/readyz": {
      "get": {
        "operationId": "HealthController_readyz",
        "summary": "Service run check and additional module check if any (postgres, redis etc)",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReadyzCheckSwagger"
                }
              }
            }
          }
        },
        "tags": [
          "Health check"
        ]
      }
    },
    "/livez": {
      "get": {
        "operationId": "HealthController_livez",
        "summary": "Simple service run check",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LivezCheckSwagger"
                }
              }
            }
          }
        },
        "tags": [
          "Health check"
        ]
      }
    },
    "/metrics": {
      "get": {
        "operationId": "PrometheusController_getMetrics",
        "parameters": [],
        "responses": {
          "200": {
            "description": ""
          }
        }
      }
    }
  },
  "info": {
    "title": "ECOM",
    "description": "Processing of ECOM payments.<br><br>[Swagger of ECOM receipts](/v1/ecom/receipts/documentation/)",
    "version": "1.0",
    "contact": {}
  },
  "tags": [],
  "servers": [],
  "components": {
    "schemas": {
      "SavedCardDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID карты"
          },
          "pan": {
            "type": "string",
            "description": "Замаскированный номер карты",
            "example": "*4111"
          },
          "bindingId": {
            "type": "string",
            "description": "ID привязки сохраненной карты"
          },
          "bankId": {
            "type": "number",
            "description": "ID банка сохраненной карты",
            "enum": [
              100,
              700
            ]
          }
        },
        "required": [
          "id",
          "pan",
          "bindingId",
          "bankId"
        ]
      },
      "GetCardsResponseDto": {
        "type": "object",
        "properties": {
          "cards": {
            "description": "Список сохраненных карт",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SavedCardDto"
            }
          }
        },
        "required": [
          "cards"
        ]
      },
      "GetCardsEndpointResponseDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Статус запроса",
            "example": "success"
          },
          "data": {
            "description": "Данные результата",
            "allOf": [
              {
                "$ref": "#/components/schemas/GetCardsResponseDto"
              }
            ]
          }
        },
        "required": [
          "status",
          "data"
        ]
      },
      "BadRequestSwagger": {
        "type": "object",
        "properties": {
          "errorCode": {
            "type": "string",
            "default": "SERVER_ERROR"
          },
          "errorMessage": {
            "type": "string",
            "default": "some error message here"
          },
          "status": {
            "type": "string",
            "default": "error"
          }
        },
        "required": [
          "errorCode",
          "errorMessage",
          "status"
        ]
      },
      "InternalServerErrorSwagger": {
        "type": "object",
        "properties": {
          "errorCode": {
            "type": "string",
            "default": "SERVICE_IS_UNAVAILABLE"
          },
          "errorMessage": {
            "type": "string",
            "default": "some error message here"
          },
          "status": {
            "type": "string",
            "default": "error"
          }
        },
        "required": [
          "errorCode",
          "errorMessage",
          "status"
        ]
      },
      "DestroyCardEndpointResponseDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Статус запроса",
            "example": "success"
          },
          "message": {
            "type": "string",
            "description": "Сообщение результата",
            "example": "OK"
          }
        },
        "required": [
          "status",
          "message"
        ]
      },
      "CheckOrderStatusResponseDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "number",
            "description": "Статус платежа\n\n    0 - processing,\n    1 - success,\n    2 - notResponding,\n    3 - error,\n    4 - canceled,\n    5 - refunded,\n    6 - fraud,\n    7 - partialCancel,\n    8 - partialRefund,\n    9 - paymentIsOverdue,\n    10 - confirm3ds,\n    11 - awaitingDeposit,\n    12 - retryError,\n    255 - cardChecked\n  ",
            "enum": [
              0,
              1,
              2,
              3,
              4,
              5,
              6,
              7,
              8,
              9,
              10,
              11,
              12,
              255
            ]
          },
          "statusMessage": {
            "type": "string",
            "description": "Текстовый вариант статуса платежа"
          },
          "paymentUrl": {
            "type": "string",
            "description": "Ссылка на форму оплаты"
          },
          "bindingId": {
            "type": "string",
            "description": "ID привязки сохраненной карты",
            "nullable": true
          }
        },
        "required": [
          "status",
          "statusMessage"
        ]
      },
      "CheckOrderStatusEndpointResponseDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Статус запроса",
            "example": "success"
          },
          "data": {
            "description": "Данные результата",
            "allOf": [
              {
                "$ref": "#/components/schemas/CheckOrderStatusResponseDto"
              }
            ]
          }
        },
        "required": [
          "status",
          "data"
        ]
      },
      "PositionToRefundDto": {
        "type": "object",
        "properties": {
          "parentItemId": {
            "type": "string",
            "description": "ID родительской позиции"
          },
          "name": {
            "type": "string",
            "description": "Наименование позиции"
          },
          "price": {
            "type": "number",
            "description": "Цена за единицу, в копейках (1000 = 10.00₽)"
          },
          "quantity": {
            "type": "number",
            "description": "Количество предмета расчета, в тысячных (999000 = 999.000)"
          },
          "sum": {
            "type": "number",
            "description": "Сумма позиции, в копейках (1000 = 10.00₽)"
          },
          "measure": {
            "type": "number",
            "description": "Единица измерения. Справочное значение. См. возможные варианты в ручке GET /v1/ecom/receipts/dictionaries."
          }
        },
        "required": [
          "parentItemId",
          "name",
          "price",
          "quantity",
          "sum",
          "measure"
        ]
      },
      "GetPositionsToRefundResponseDto": {
        "type": "object",
        "properties": {
          "positions": {
            "description": "Позиции доступные к возврату",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PositionToRefundDto"
            }
          }
        },
        "required": [
          "positions"
        ]
      },
      "GetPositionsToRefundEndpointResponseDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Статус запроса",
            "example": "success"
          },
          "data": {
            "description": "Данные результата",
            "allOf": [
              {
                "$ref": "#/components/schemas/GetPositionsToRefundResponseDto"
              }
            ]
          }
        },
        "required": [
          "status",
          "data"
        ]
      },
      "RegisterOrderPubAdditionalPropsDto": {
        "type": "object",
        "properties": {
          "returnUrl": {
            "type": "string",
            "example": "https://atolpay.ru/example",
            "description": "URL для кнопок \"Вернуться в магазин\" на платежной форме",
            "maxLength": 255
          },
          "appReturnUrl": {
            "type": "string",
            "example": "app://page",
            "description": "URL для кнопок \"Вернуться в приложение\" на платежной форме. Используется только в режиме tp=app",
            "maxLength": 255
          },
          "notificationUrl": {
            "type": "string",
            "example": "https://atolpay.ru/example",
            "description": "URL, на который приходят уведомления об изменении статуса платежа. Имеет приоритет над настройками в ATOL PAY (Настройки -> Настройки заказов -> Настройки колбэков)",
            "maxLength": 255
          },
          "sourceName": {
            "type": "string",
            "example": "lk",
            "description": "Источник создания платежа. Требуется для CMS модулей",
            "enum": [
              "1c-bitrix",
              "Bitrix",
              "bitrix24_cloud",
              "Bitrix24_cloud",
              "CS-Cart",
              "RadicalMart: AtolPay payment plugin",
              "wp",
              "wordpress",
              "WordPress",
              "WP",
              "angfa",
              "opencart",
              "tilda",
              "website",
              "api",
              "lk",
              "widget",
              "pay_subscriptions_cron",
              "cscart",
              "modx",
              "drupal",
              "insales"
            ],
            "default": "Если не передано, сохраняется значение \"api\""
          },
          "sourceVersion": {
            "type": "string",
            "example": "1.0.0",
            "description": "Версия источника создания платежа. Требуется для CMS модулей",
            "maxLength": 32
          }
        },
        "required": [
          "returnUrl"
        ]
      },
      "BuyerDto": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "maximum": 64,
            "example": "test@example.ru",
            "description": "Электронная почта покупателя. Подставляется на форме оплаты"
          }
        },
        "required": [
          "email"
        ]
      },
      "ReceiptItemDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "Книги",
            "description": "Наименование позиции"
          },
          "price": {
            "type": "number",
            "minimum": 0,
            "maximum": 2000000000,
            "example": 10099,
            "description": "Цена за единицу, в копейках (1000 = 10.00₽)"
          },
          "quantity": {
            "type": "number",
            "minimum": 1,
            "maximum": 2000000000,
            "example": 10999,
            "description": "Количество предмета расчета, в тысячных (10000 = 10.000)"
          },
          "measure": {
            "type": "number",
            "example": 3,
            "description": "Единица измерения. Справочное значение. См. возможные варианты в ручке GET /v1/ecom/receipts/dictionaries."
          },
          "paymentMethod": {
            "type": "number",
            "example": 0,
            "description": "Признак способа расчета. Справочное значение. См. возможные варианты в ручке GET /v1/ecom/receipts/dictionaries."
          },
          "paymentSubject": {
            "type": "number",
            "example": 0,
            "description": "Признак предмета расчета. Справочное значение. См. возможные варианты в ручке GET /v1/ecom/receipts/dictionaries."
          },
          "tax": {
            "type": "number",
            "example": 0,
            "description": "Ставка НДС. Справочное значение. См. возможные варианты в ручке GET /v1/ecom/receipts/dictionaries."
          },
          "isAgent": {
            "type": "boolean",
            "example": true,
            "description": "Признак агента (если передано значение true, необходимо также передать agentId и supplierId)"
          },
          "agentId": {
            "type": "string",
            "example": "b0d84710-71f0-49ee-8219-f1b31a8d6770",
            "description": "ID платежного агента"
          },
          "supplierId": {
            "type": "string",
            "example": "b0d84710-71f0-49ee-8219-f1b31a8d6770",
            "description": "ID поставщика"
          }
        },
        "required": [
          "name",
          "price",
          "quantity",
          "measure",
          "paymentMethod",
          "paymentSubject",
          "tax"
        ]
      },
      "RegisterOrderPubReceiptDto": {
        "type": "object",
        "properties": {
          "buyer": {
            "$ref": "#/components/schemas/BuyerDto"
          },
          "positions": {
            "description": "Cписок позиций",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReceiptItemDto"
            }
          },
          "providerId": {
            "type": "number",
            "example": 100,
            "description": "ID провайдера фискализации:\n\n    100 - АТОЛ Онлайн"
          },
          "sno": {
            "type": "number",
            "example": 1,
            "description": "Система налогообложения. Справочное значение. См. возможные варианты в ручке GET /v1/ecom/receipts/dictionaries.",
            "minimum": 0,
            "maximum": 5
          }
        },
        "required": [
          "positions",
          "providerId",
          "sno"
        ]
      },
      "PaymentMethodForCreateDto": {
        "type": "object",
        "properties": {
          "paymentType": {
            "type": "string",
            "enum": [
              "card",
              "bank_app",
              "sbp",
              "bnpl",
              "account"
            ],
            "description": "Тип метода оплаты:\n\n    card - оплата по карте\n    bank_app - оплата через мобильное приложение банка\n    sbp - оплата через систему быстрых платежей (СБП)\n    bnpl - оплата через сервис ТБанк Долями\n    account - оплата по счету\n",
            "example": "card"
          },
          "bankId": {
            "type": "number",
            "enum": [
              0,
              100,
              300,
              400,
              401,
              500,
              600,
              700,
              701,
              900
            ],
            "example": 100,
            "description": "ID банка оплаты:\n\n    Для paymentType=card:\n      100 - Альфа-Банк\n      700 - Т-Банк\n      900 - ГПБ\n    Для paymentType=bank_app:\n      700 - Т-Pay\n    Для paymentType=sbp:\n      100 - Альфа-Банк\n      300 - Райффайзен банк\n      400 - Сбербанк\n      500 - Другой банк НСПК\n      600 - ЮКасса\n    Для paymentType=bnpl:\n      701 - Т-Банк Долями\n    Для paymentType=account:\n      0 - значение по умолчанию\n"
          },
          "accountUrl": {
            "type": "string",
            "description": "URL для оплаты по счету"
          }
        },
        "required": [
          "paymentType",
          "bankId"
        ]
      },
      "CostDto": {
        "type": "object",
        "properties": {
          "min": {
            "type": "number",
            "minimum": 1,
            "maximum": 2000000000,
            "example": 10099,
            "description": "Минимальная разрешенная сумма заказа в копейках"
          },
          "max": {
            "type": "number",
            "minimum": 1,
            "maximum": 2000000000,
            "example": 10099,
            "description": "Максимальная разрешенная сумма заказа в копейках"
          }
        }
      },
      "UserDefinedFieldDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "Адрес доставки",
            "description": "Название поля ввода",
            "maxLength": 255
          }
        },
        "required": [
          "name"
        ]
      },
      "UserDefinedPropsDto": {
        "type": "object",
        "properties": {
          "cost": {
            "description": "Параметры суммы заказа",
            "allOf": [
              {
                "$ref": "#/components/schemas/CostDto"
              }
            ]
          },
          "fields": {
            "description": "Параметры дополнительных полей",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserDefinedFieldDto"
            }
          }
        }
      },
      "MerchantForCreateDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "ООО АТОЛ",
            "description": "Название магазина",
            "maxLength": 255
          }
        }
      },
      "RegisterOrderPubRequestDto": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number",
            "minimum": 1,
            "maximum": 2000000000,
            "example": 10099,
            "description": "Сумма платежа в копейках. Обязательна, если нет признака свободной суммы userDefinedProps.cost"
          },
          "orderId": {
            "type": "string",
            "example": "b0d84710-71f0-49ee-8219-f1b31a8d6770",
            "description": "Внешний ID заказа (допустимы только цифры, символы латинского алфавита и символы :, +, -, _, .)",
            "maxLength": 255
          },
          "bankId": {
            "type": "number",
            "enum": [
              0,
              100,
              300,
              400,
              401,
              500,
              600,
              700,
              701,
              900
            ],
            "example": 100,
            "description": "Идентификатор банка для проведения платежа по карте. Поле устарело, используйте paymentMethods",
            "deprecated": true
          },
          "sessionType": {
            "type": "string",
            "example": "oneStep",
            "description": "Одностадийная / двустадийная оплата",
            "enum": [
              "oneStep",
              "twoStep"
            ],
            "default": "Если не передано, значение берется из личного кабинета ATOL PAY: раздел Настройки -> Настройки заказов -> Платежи в 2 стадии по умолчанию"
          },
          "additionalProps": {
            "$ref": "#/components/schemas/RegisterOrderPubAdditionalPropsDto"
          },
          "buyerId": {
            "type": "string",
            "example": "68770cca-3c95-4b81-9f6a-b3a6d1c0b38c",
            "description": "ID конечного покупателя в системе мерчанта. К нему будут привязываться сохраненные карты",
            "maxLength": 255
          },
          "receipt": {
            "description": "Информация для фискализации чека",
            "allOf": [
              {
                "$ref": "#/components/schemas/RegisterOrderPubReceiptDto"
              }
            ]
          },
          "inn": {
            "type": "string",
            "description": "ИНН покупателя",
            "maxLength": 255
          },
          "kpp": {
            "type": "string",
            "description": "КПП покупателя",
            "maxLength": 255
          },
          "recurring": {
            "type": "boolean",
            "description": "Использовать рекарринговый платеж"
          },
          "paymentMethods": {
            "description": "Методы оплаты, которые будут доступны на форме оплаты",
            "default": "Если не переданы, используются из личного кабинета ATOL PAY: раздел Настройки -> Настройки заказов",
            "example": [
              {
                "paymentType": "card",
                "bankId": 100
              },
              {
                "paymentType": "sbp",
                "bankId": 400
              }
            ],
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentMethodForCreateDto"
            }
          },
          "userDefinedProps": {
            "description": "Дополнительные параметры заказа",
            "allOf": [
              {
                "$ref": "#/components/schemas/UserDefinedPropsDto"
              }
            ]
          },
          "merchant": {
            "description": "Информация о клиенте",
            "allOf": [
              {
                "$ref": "#/components/schemas/MerchantForCreateDto"
              }
            ]
          }
        },
        "required": [
          "amount",
          "orderId",
          "additionalProps"
        ]
      },
      "PaymentMethodUrlsDto": {
        "type": "object",
        "properties": {
          "card": {
            "type": "string",
            "description": "Ссылка на оплату картой"
          },
          "tpay": {
            "type": "string",
            "description": "Ссылка на оплату T-Pay"
          },
          "dolyame": {
            "type": "string",
            "description": "Ссылка на оплату Долями"
          },
          "sbp": {
            "type": "string",
            "description": "Ссылка на оплату СБП"
          },
          "account": {
            "type": "string",
            "description": "Ссылка на оплату по счету"
          }
        }
      },
      "PaymentUrlsDto": {
        "type": "object",
        "properties": {
          "main": {
            "type": "string",
            "description": "Ссылка на главную страницу формы оплаты"
          },
          "mainFrame": {
            "type": "string",
            "description": "Ссылка на главную страницу формы оплаты для отображения внутри фрейма"
          },
          "mainApp": {
            "type": "string",
            "description": "Ссылка на главную страницу формы оплаты для отображения внутри приложения"
          },
          "direct": {
            "description": "Прямые ссылки на метод оплаты без перехода на главную страницу",
            "allOf": [
              {
                "$ref": "#/components/schemas/PaymentMethodUrlsDto"
              }
            ]
          },
          "directFrame": {
            "description": "Прямые ссылки на метод оплаты без перехода на главную страницу для отображения внутри фрейма",
            "allOf": [
              {
                "$ref": "#/components/schemas/PaymentMethodUrlsDto"
              }
            ]
          },
          "directApp": {
            "description": "Прямые ссылки на метод оплаты без перехода на главную страницу для отображения внутри приложения",
            "allOf": [
              {
                "$ref": "#/components/schemas/PaymentMethodUrlsDto"
              }
            ]
          }
        },
        "required": [
          "main",
          "mainFrame",
          "mainApp",
          "direct",
          "directFrame",
          "directApp"
        ]
      },
      "OrderItemReceiptDto": {
        "type": "object",
        "properties": {
          "paymentMethod": {
            "type": "number",
            "description": "Признак способа расчета. Справочное значение. См. возможные варианты в ручке GET /v1/ecom/receipts/dictionaries."
          },
          "paymentSubject": {
            "type": "number",
            "description": "Признак предмета расчета. Справочное значение. См. возможные варианты в ручке GET /v1/ecom/receipts/dictionaries."
          },
          "tax": {
            "type": "number",
            "description": "Ставка НДС. Справочное значение. См. возможные варианты в ручке GET /v1/ecom/receipts/dictionaries."
          },
          "isAgent": {
            "type": "boolean",
            "description": "Признак агента"
          },
          "agentId": {
            "type": "string",
            "description": "ID платежного агента"
          },
          "supplierId": {
            "type": "string",
            "description": "ID поставщика"
          }
        },
        "required": [
          "paymentMethod",
          "paymentSubject",
          "tax"
        ]
      },
      "OrderItemDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Наименование позиции"
          },
          "price": {
            "type": "number",
            "description": "Цена за единицу, в копейках (1000 = 10.00₽)"
          },
          "sum": {
            "type": "number",
            "description": "Стоимость позиции, в копейках (1000 = 10.00₽)"
          },
          "quantity": {
            "type": "number",
            "description": "Количество предмета расчета, в тысячных (999000 = 999.000)"
          },
          "measure": {
            "type": "number",
            "description": "Единица измерения. Справочное значение. См. возможные варианты в ручке GET /v1/ecom/receipts/dictionaries."
          },
          "receipt": {
            "description": "Данные чека",
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/OrderItemReceiptDto"
              }
            ]
          },
          "id": {
            "type": "string",
            "description": "ID позиции (UUID)"
          }
        },
        "required": [
          "name",
          "price",
          "sum",
          "quantity",
          "measure",
          "id"
        ]
      },
      "RegisterOrderPubResponseDto": {
        "type": "object",
        "properties": {
          "orderId": {
            "type": "string",
            "description": "Клиентский номер платежа"
          },
          "amount": {
            "type": "number",
            "description": "Сумма платежа"
          },
          "paymentUrl": {
            "type": "string",
            "description": "Ссылка на форму оплаты. Используйте paymentUrls.main вместо",
            "deprecated": true
          },
          "paymentUrls": {
            "description": "Ссылки на оплату",
            "allOf": [
              {
                "$ref": "#/components/schemas/PaymentUrlsDto"
              }
            ]
          },
          "positions": {
            "description": "Cписок позиций заказа",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderItemDto"
            }
          }
        },
        "required": [
          "orderId",
          "amount",
          "paymentUrl",
          "paymentUrls",
          "positions"
        ]
      },
      "RegisterPaymentEndpointResponseDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Статус запроса",
            "example": "success"
          },
          "data": {
            "description": "Данные результата",
            "allOf": [
              {
                "$ref": "#/components/schemas/RegisterOrderPubResponseDto"
              }
            ]
          }
        },
        "required": [
          "status",
          "data"
        ]
      },
      "RefundPositionDto": {
        "type": "object",
        "properties": {
          "parentItemId": {
            "type": "string",
            "example": "e11b21fa-58e7-4918-bb38-159065c36a62",
            "description": "ID родительской позиции"
          },
          "sum": {
            "type": "number",
            "minimum": 0,
            "maximum": 2000000000,
            "example": 10099,
            "description": "Сумма за позицию, в копейках (1000 = 10.00₽)"
          },
          "quantity": {
            "type": "number",
            "minimum": 1,
            "maximum": 2000000000,
            "example": 10999,
            "description": "Количество предмета расчета, в тысячных (999000 = 999.000)"
          }
        },
        "required": [
          "parentItemId",
          "sum",
          "quantity"
        ]
      },
      "CancelOrderPubRequestDto": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number",
            "minimum": 1,
            "maximum": 2000000000,
            "example": 10099,
            "description": "Сумма возврата, в копейках (1000 = 10.00₽). По умолчанию возврат на полную сумму"
          },
          "positions": {
            "description": "Cписок позиций. Обязателен, если частичный возврат и заказ имеет чек",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RefundPositionDto"
            }
          }
        }
      },
      "CancelPaymentEndpointResponseDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Статус запроса",
            "example": "success"
          },
          "message": {
            "type": "string",
            "description": "Сообщение результата",
            "example": "OK"
          }
        },
        "required": [
          "status",
          "message"
        ]
      },
      "DepositPaymentEndpointResponseDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Статус запроса",
            "example": "success"
          },
          "message": {
            "type": "string",
            "description": "Сообщение результата",
            "example": "OK"
          }
        },
        "required": [
          "status",
          "message"
        ]
      },
      "CompleteOrderByAccountResponseDto": {
        "type": "object",
        "properties": {
          "orderId": {
            "type": "string",
            "description": "ID заказа"
          },
          "status": {
            "type": "number",
            "description": "Статус платежа\n\n    0 - processing,\n    1 - success,\n    2 - notResponding,\n    3 - error,\n    4 - canceled,\n    5 - refunded,\n    6 - fraud,\n    7 - partialCancel,\n    8 - partialRefund,\n    9 - paymentIsOverdue,\n    10 - confirm3ds,\n    11 - awaitingDeposit,\n    12 - retryError,\n    255 - cardChecked\n  ",
            "enum": [
              0,
              1,
              2,
              3,
              4,
              5,
              6,
              7,
              8,
              9,
              10,
              11,
              12,
              255
            ]
          }
        },
        "required": [
          "orderId",
          "status"
        ]
      },
      "CompleteByAccountEndpointResponseDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Статус запроса",
            "example": "success"
          },
          "data": {
            "description": "Данные результата",
            "allOf": [
              {
                "$ref": "#/components/schemas/CompleteOrderByAccountResponseDto"
              }
            ]
          }
        },
        "required": [
          "status",
          "data"
        ]
      },
      "PayOrderByRecurringRequestDto": {
        "type": "object",
        "properties": {
          "bindingId": {
            "type": "string",
            "description": "ID привязки карты"
          },
          "buyerEmail": {
            "type": "string",
            "maximum": 64,
            "example": "test@example.ru",
            "description": "Электронная почта покупателя"
          }
        },
        "required": [
          "bindingId",
          "buyerEmail"
        ]
      },
      "PayOrderByRecurringEndpointResponseDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Статус запроса",
            "example": "success"
          },
          "message": {
            "type": "string",
            "description": "Сообщение результата",
            "example": "OK"
          }
        },
        "required": [
          "status",
          "message"
        ]
      },
      "SubscriptionPlanPeriodDto": {
        "type": "object",
        "properties": {
          "years": {
            "type": "number",
            "description": "Период в годах"
          },
          "months": {
            "type": "number",
            "description": "Период в месяцах"
          },
          "days": {
            "type": "number",
            "description": "Период в днях"
          },
          "minutes": {
            "type": "number",
            "description": "Период в минутах. Доступен только на тестовых средах"
          },
          "seconds": {
            "type": "number",
            "description": "Период в секундах. Доступен только на тестовых средах"
          }
        }
      },
      "ReceiptForCreateDto": {
        "type": "object",
        "properties": {
          "providerId": {
            "type": "number",
            "description": "ID провайдера фискализации:\n\n    100 - АТОЛ Онлайн"
          },
          "sno": {
            "type": "number",
            "example": 1,
            "description": "Система налогообложения. Справочное значение. См. возможные варианты в ручке GET /v1/ecom/receipts/dictionaries.",
            "minimum": 0,
            "maximum": 5
          }
        },
        "required": [
          "providerId",
          "sno"
        ]
      },
      "OrderItemReceiptForCreateDto": {
        "type": "object",
        "properties": {
          "paymentMethod": {
            "type": "number",
            "example": 0,
            "description": "Признак способа расчета. Справочное значение. См. возможные варианты в ручке GET /v1/ecom/receipts/dictionaries."
          },
          "paymentSubject": {
            "type": "number",
            "example": 0,
            "description": "Признак предмета расчета. Справочное значение. См. возможные варианты в ручке GET /v1/ecom/receipts/dictionaries."
          },
          "tax": {
            "type": "number",
            "example": 0,
            "description": "Ставка НДС. Справочное значение. См. возможные варианты в ручке GET /v1/ecom/receipts/dictionaries."
          },
          "isAgent": {
            "type": "boolean",
            "example": true,
            "description": "Признак агента"
          },
          "agentId": {
            "type": "string",
            "example": "b0d84710-71f0-49ee-8219-f1b31a8d6770",
            "description": "ID платежного агента"
          },
          "supplierId": {
            "type": "string",
            "example": "b0d84710-71f0-49ee-8219-f1b31a8d6770",
            "description": "ID поставщика"
          }
        },
        "required": [
          "paymentMethod",
          "paymentSubject",
          "tax"
        ]
      },
      "OrderItemForCreateDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "Книги",
            "description": "Наименование позиции",
            "maxLength": 255
          },
          "price": {
            "type": "number",
            "minimum": 0,
            "maximum": 2000000000,
            "example": 10099,
            "description": "Цена за единицу, в копейках (1000 = 10.00₽)"
          },
          "quantity": {
            "type": "number",
            "minimum": 1,
            "maximum": 2000000000,
            "example": 10999,
            "description": "Количество предмета расчета, в тысячных (999000 = 999.000)"
          },
          "measure": {
            "type": "number",
            "example": 3,
            "description": "Единица измерения. Справочное значение. См. возможные варианты в ручке GET /v1/ecom/receipts/dictionaries."
          },
          "receipt": {
            "description": "Информация для фискализации чека",
            "allOf": [
              {
                "$ref": "#/components/schemas/OrderItemReceiptForCreateDto"
              }
            ]
          }
        },
        "required": [
          "name",
          "price",
          "quantity",
          "measure"
        ]
      },
      "SupbscriptionPaymentMethodForCreateDto": {
        "type": "object",
        "properties": {
          "paymentType": {
            "type": "string",
            "enum": [
              "card"
            ],
            "description": "Тип метода оплаты:\n\n    card - оплата по карте\n",
            "example": "card"
          },
          "bankId": {
            "type": "number",
            "enum": [
              100,
              700
            ],
            "example": 100,
            "description": "ID банка оплаты:\n\n    Для paymentType=card:\n      100 - Альфа-Банк\n      700 - Т-Банк\n"
          }
        },
        "required": [
          "paymentType",
          "bankId"
        ]
      },
      "SubscriptionPlanDataForCreateDto": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number",
            "minimum": 1,
            "maximum": 2000000000,
            "example": 10099,
            "description": "Сумма платежа в копейках"
          },
          "returnUrl": {
            "type": "string",
            "example": "https://atolpay.ru/example",
            "description": "URL для кнопок \"Вернуться в магазин\" на платежной форме",
            "maxLength": 255
          },
          "appReturnUrl": {
            "type": "string",
            "example": "app://page",
            "description": "URL для кнопок \"Вернуться в приложение\" на платежной форме. Используется только в режиме tp=app",
            "maxLength": 255
          },
          "receipt": {
            "description": "Информация о чеке",
            "allOf": [
              {
                "$ref": "#/components/schemas/ReceiptForCreateDto"
              }
            ]
          },
          "merchant": {
            "description": "Информация о клиенте",
            "allOf": [
              {
                "$ref": "#/components/schemas/MerchantForCreateDto"
              }
            ]
          },
          "items": {
            "description": "Список позиций",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderItemForCreateDto"
            }
          },
          "userDefinedProps": {
            "description": "Дополнительные параметры заказа",
            "allOf": [
              {
                "$ref": "#/components/schemas/UserDefinedPropsDto"
              }
            ]
          },
          "paymentMethods": {
            "description": "Методы оплаты подписки",
            "default": "Если не переданы, используются из личного кабинета ATOL PAY: раздел Настройки -> Настройки заказов",
            "example": [
              {
                "paymentType": "card",
                "bankId": 100
              }
            ],
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SupbscriptionPaymentMethodForCreateDto"
            }
          }
        },
        "required": [
          "returnUrl"
        ]
      },
      "SubscriptionPlanForCreateDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Название плана подписки",
            "maxLength": 255
          },
          "externalPlanId": {
            "type": "string",
            "description": "Внешний ID плана подписки (допустимы только цифры, символы латинского алфавита и символы :, +, -, _, .)",
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "description": "Описание плана подписки",
            "maxLength": 255
          },
          "period": {
            "description": "Период подписки. Должно быть передано одно из значений",
            "allOf": [
              {
                "$ref": "#/components/schemas/SubscriptionPlanPeriodDto"
              }
            ]
          },
          "trialPeriod": {
            "description": "Пробный период подписки. Должно быть передано одно из значений",
            "allOf": [
              {
                "$ref": "#/components/schemas/SubscriptionPlanPeriodDto"
              }
            ]
          },
          "data": {
            "description": "Данные для формирования заказа",
            "allOf": [
              {
                "$ref": "#/components/schemas/SubscriptionPlanDataForCreateDto"
              }
            ]
          }
        },
        "required": [
          "name",
          "period",
          "data"
        ]
      },
      "SubscriptionBuyerDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID конечного покупателя в системе мерчанта. К нему будут привязываться сохраненные карты",
            "maxLength": 255
          },
          "email": {
            "type": "string",
            "maximum": 64,
            "example": "test@example.ru",
            "description": "Электронная почта покупателя. Подставляется на форме оплаты"
          },
          "inn": {
            "type": "string",
            "description": "ИНН покупателя",
            "maxLength": 255
          },
          "kpp": {
            "type": "string",
            "description": "КПП покупателя",
            "maxLength": 255
          }
        }
      },
      "CreateBuyerSubscriptionOrderPubRequestDto": {
        "type": "object",
        "properties": {
          "sourceName": {
            "type": "string",
            "example": "lk",
            "description": "Источник создания платежа. Требуется для CMS модулей",
            "enum": [
              "1c-bitrix",
              "Bitrix",
              "bitrix24_cloud",
              "Bitrix24_cloud",
              "CS-Cart",
              "RadicalMart: AtolPay payment plugin",
              "wp",
              "wordpress",
              "WordPress",
              "WP",
              "angfa",
              "opencart",
              "tilda",
              "website",
              "api",
              "lk",
              "widget",
              "pay_subscriptions_cron",
              "cscart",
              "modx",
              "drupal",
              "insales"
            ],
            "default": "Если не передано, сохраняется значение \"api\""
          },
          "subscriptionPlanId": {
            "type": "string",
            "description": "ID плана подписки. Имеет приоритет над subscriptionPlan"
          },
          "externalPlanId": {
            "type": "string",
            "description": "Внешний ID плана подписки. Имеет приоритет над subscriptionPlan",
            "maxLength": 255
          },
          "subscriptionPlan": {
            "description": "План подписки",
            "allOf": [
              {
                "$ref": "#/components/schemas/SubscriptionPlanForCreateDto"
              }
            ]
          },
          "orderId": {
            "type": "string",
            "example": "b0d84710-71f0-49ee-8219-f1b31a8d6770",
            "description": "Внешний ID заказа (допустимы только цифры, символы латинского алфавита и символы :, +, -, _, .)",
            "maxLength": 255
          },
          "notificationUrl": {
            "type": "string",
            "example": "https://atolpay.ru/example",
            "description": "URL, на который приходят уведомления об изменении статуса платежа. Имеет приоритет над настройками в ATOL PAY (Настройки -> Настройки заказов -> Настройки колбэков)",
            "maxLength": 255
          },
          "sourceVersion": {
            "type": "string",
            "example": "1.0.0",
            "description": "Версия источника создания платежа. Требуется для CMS модулей",
            "maxLength": 32
          },
          "buyer": {
            "description": "Данные покупателя",
            "allOf": [
              {
                "$ref": "#/components/schemas/SubscriptionBuyerDto"
              }
            ]
          }
        }
      },
      "CreateBuyerSubscriptionOrderPubResponseDto": {
        "type": "object",
        "properties": {
          "subscriptionId": {
            "type": "string",
            "description": "ID подписки"
          },
          "subscriptionPlanId": {
            "type": "string",
            "description": "ID плана подписки"
          },
          "amount": {
            "type": "number",
            "description": "Сумма платежа, в копейках (1000 = 10.00₽)"
          },
          "paymentUrl": {
            "type": "string",
            "description": "Ссылка на оплату. Используйте paymentUrls.main вместо",
            "deprecated": true
          },
          "paymentUrls": {
            "description": "Ссылки на оплату",
            "allOf": [
              {
                "$ref": "#/components/schemas/PaymentUrlsDto"
              }
            ]
          },
          "positions": {
            "description": "Cписок позиций заказа",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderItemDto"
            }
          },
          "orderId": {
            "type": "string",
            "description": "Внешний ID заказа"
          }
        },
        "required": [
          "subscriptionId",
          "subscriptionPlanId",
          "amount",
          "paymentUrl",
          "paymentUrls",
          "positions",
          "orderId"
        ]
      },
      "CreateBuyerSubscriptionOrderEndpointResponseDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Статус запроса",
            "example": "success"
          },
          "data": {
            "description": "Данные результата",
            "allOf": [
              {
                "$ref": "#/components/schemas/CreateBuyerSubscriptionOrderPubResponseDto"
              }
            ]
          }
        },
        "required": [
          "status",
          "data"
        ]
      },
      "CancelBuyerSubscriptionEndpointResponseDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Статус запроса",
            "example": "success"
          },
          "data": {
            "type": "object",
            "description": "Данные результата"
          }
        },
        "required": [
          "status",
          "data"
        ]
      },
      "SubscriptionItemBuyerDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID покупателя",
            "nullable": true
          },
          "email": {
            "type": "string",
            "description": "Email покупателя",
            "nullable": true
          }
        },
        "required": [
          "id",
          "email"
        ]
      },
      "SubscriptionItemPlanDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID плана подписки"
          },
          "externalPlanId": {
            "type": "string",
            "description": "Внешний ID плана подписки",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Название плана подписки"
          },
          "description": {
            "type": "string",
            "description": "Описание плана подписки",
            "nullable": true
          },
          "isActive": {
            "type": "boolean",
            "description": "Признак активности плана подписки"
          },
          "period": {
            "description": "Период подписки",
            "allOf": [
              {
                "$ref": "#/components/schemas/SubscriptionPlanPeriodDto"
              }
            ]
          },
          "trialPeriod": {
            "description": "Пробный период подписки",
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SubscriptionPlanPeriodDto"
              }
            ]
          }
        },
        "required": [
          "id",
          "externalPlanId",
          "name",
          "description",
          "isActive",
          "period",
          "trialPeriod"
        ]
      },
      "SubscriptionItemDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Внутренний ID подписки"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string",
            "description": "Дата создания подписки"
          },
          "nextPaymentAt": {
            "format": "date-time",
            "type": "string",
            "description": "Дата следующего платежа",
            "nullable": true
          },
          "canceledAt": {
            "format": "date-time",
            "type": "string",
            "description": "Дата отмены подписки",
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "paid",
              "error",
              "canceled",
              "trial",
              "processing",
              "paused"
            ],
            "description": "Статус подписки"
          },
          "amount": {
            "type": "number",
            "description": "Сумма подписки"
          },
          "isTrialAccepted": {
            "type": "boolean",
            "description": "Был ли использован триальный период (учитываются предыдущие подписки пользователя)"
          },
          "buyer": {
            "description": "Данные покупателя",
            "allOf": [
              {
                "$ref": "#/components/schemas/SubscriptionItemBuyerDto"
              }
            ]
          },
          "plan": {
            "description": "План подписки",
            "allOf": [
              {
                "$ref": "#/components/schemas/SubscriptionItemPlanDto"
              }
            ]
          }
        },
        "required": [
          "id",
          "createdAt",
          "nextPaymentAt",
          "canceledAt",
          "status",
          "amount",
          "isTrialAccepted",
          "buyer",
          "plan"
        ]
      },
      "GetBuyerSubscriptionsPubResponseDto": {
        "type": "object",
        "properties": {
          "subscriptions": {
            "description": "Список подписок",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubscriptionItemDto"
            }
          }
        },
        "required": [
          "subscriptions"
        ]
      },
      "GetBuyerSubscriptionsEndpointResponseDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Статус запроса",
            "example": "success"
          },
          "data": {
            "description": "Данные результата",
            "allOf": [
              {
                "$ref": "#/components/schemas/GetBuyerSubscriptionsPubResponseDto"
              }
            ]
          }
        },
        "required": [
          "status",
          "data"
        ]
      },
      "ReceiptDto": {
        "type": "object",
        "properties": {
          "providerId": {
            "type": "number",
            "description": "ID провайдера фискализации"
          },
          "sno": {
            "type": "number",
            "description": "Система налогообложения. Справочное значение. См. возможные варианты в ручке GET /v1/ecom/receipts/dictionaries."
          }
        },
        "required": [
          "providerId",
          "sno"
        ]
      },
      "MerchantBaseDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Название продавца",
            "nullable": true
          }
        },
        "required": [
          "name"
        ]
      },
      "OrderItemBaseDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Наименование позиции"
          },
          "price": {
            "type": "number",
            "description": "Цена за единицу, в копейках (1000 = 10.00₽)"
          },
          "sum": {
            "type": "number",
            "description": "Стоимость позиции, в копейках (1000 = 10.00₽)"
          },
          "quantity": {
            "type": "number",
            "description": "Количество предмета расчета, в тысячных (999000 = 999.000)"
          },
          "measure": {
            "type": "number",
            "description": "Единица измерения. Справочное значение. См. возможные варианты в ручке GET /v1/ecom/receipts/dictionaries."
          },
          "receipt": {
            "description": "Данные чека",
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/OrderItemReceiptDto"
              }
            ]
          }
        },
        "required": [
          "name",
          "price",
          "sum",
          "quantity",
          "measure"
        ]
      },
      "SubscriptionPaymentMethod": {
        "type": "object",
        "properties": {
          "paymentType": {
            "type": "string",
            "enum": [
              "card"
            ],
            "description": "Тип метода оплаты:\n\n    card - оплата по карте\n"
          },
          "bankId": {
            "type": "number",
            "enum": [
              100,
              700
            ],
            "description": "ID банка оплаты:\n\n    Для paymentType=card:\n      100 - Альфа-Банк\n      700 - Т-Банк\n"
          }
        },
        "required": [
          "paymentType",
          "bankId"
        ]
      },
      "SubscriptionPlanDataDto": {
        "type": "object",
        "properties": {
          "returnUrl": {
            "type": "string",
            "description": "URL для кнопок \"Вернуться в магазин\" на платежной форме"
          },
          "appReturnUrl": {
            "type": "string",
            "description": "URL для кнопок \"Вернуться в приложение\" на платежной форме. Используется только в режиме tp=app"
          },
          "receipt": {
            "description": "Данные чека",
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ReceiptDto"
              }
            ]
          },
          "merchant": {
            "description": "Данные продавца",
            "allOf": [
              {
                "$ref": "#/components/schemas/MerchantBaseDto"
              }
            ]
          },
          "items": {
            "description": "Cписок позиций",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderItemBaseDto"
            }
          },
          "paymentMethods": {
            "description": "Методы оплаты подписки",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubscriptionPaymentMethod"
            }
          },
          "userDefinedProps": {
            "description": "Дополнительные параметры заказа",
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/UserDefinedPropsDto"
              }
            ]
          }
        },
        "required": [
          "returnUrl",
          "appReturnUrl",
          "receipt",
          "merchant",
          "items",
          "paymentMethods",
          "userDefinedProps"
        ]
      },
      "SubscriptionPlanItemBaseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID плана подписки"
          },
          "externalPlanId": {
            "type": "string",
            "description": "Внешний ID плана подписки",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Название плана подписки"
          },
          "amount": {
            "type": "number",
            "description": "Сумма плана подписки"
          },
          "description": {
            "type": "string",
            "description": "Описание плана подписки",
            "nullable": true
          },
          "paymentUrl": {
            "type": "string",
            "description": "Ссылка на форму оплаты подписки"
          },
          "isActive": {
            "type": "boolean",
            "description": "Признак активности плана подписки"
          },
          "period": {
            "description": "Период подписки",
            "allOf": [
              {
                "$ref": "#/components/schemas/SubscriptionPlanPeriodDto"
              }
            ]
          },
          "trialPeriod": {
            "description": "Пробный период подписки",
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SubscriptionPlanPeriodDto"
              }
            ]
          },
          "createdAt": {
            "format": "date-time",
            "type": "string",
            "description": "Дата создания подписки"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string",
            "description": "Дата обновления подписки"
          },
          "data": {
            "description": "Данные для формирования заказа",
            "allOf": [
              {
                "$ref": "#/components/schemas/SubscriptionPlanDataDto"
              }
            ]
          }
        },
        "required": [
          "id",
          "externalPlanId",
          "name",
          "amount",
          "description",
          "paymentUrl",
          "isActive",
          "period",
          "trialPeriod",
          "createdAt",
          "updatedAt",
          "data"
        ]
      },
      "GetSubscriptionPlansPubResponseDto": {
        "type": "object",
        "properties": {
          "plans": {
            "description": "Список планов подписок",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubscriptionPlanItemBaseDto"
            }
          }
        },
        "required": [
          "plans"
        ]
      },
      "GetSubscriptionPlansEndpointResponseDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Статус запроса",
            "example": "success"
          },
          "data": {
            "description": "Данные результата",
            "allOf": [
              {
                "$ref": "#/components/schemas/GetSubscriptionPlansPubResponseDto"
              }
            ]
          }
        },
        "required": [
          "status",
          "data"
        ]
      },
      "CreateSubscriptionPlanPubRequestDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Название плана подписки",
            "maxLength": 255
          },
          "externalPlanId": {
            "type": "string",
            "description": "Внешний ID плана подписки (допустимы только цифры, символы латинского алфавита и символы :, +, -, _, .)",
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "description": "Описание плана подписки",
            "maxLength": 255
          },
          "period": {
            "description": "Период подписки. Должно быть передано одно из значений",
            "allOf": [
              {
                "$ref": "#/components/schemas/SubscriptionPlanPeriodDto"
              }
            ]
          },
          "trialPeriod": {
            "description": "Пробный период подписки. Должно быть передано одно из значений",
            "allOf": [
              {
                "$ref": "#/components/schemas/SubscriptionPlanPeriodDto"
              }
            ]
          },
          "data": {
            "description": "Данные для формирования заказа",
            "allOf": [
              {
                "$ref": "#/components/schemas/SubscriptionPlanDataForCreateDto"
              }
            ]
          }
        },
        "required": [
          "name",
          "period",
          "data"
        ]
      },
      "CreateSubscriptionPlanPubResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID плана подписки"
          },
          "externalPlanId": {
            "type": "string",
            "description": "Внешний ID плана подписки",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Название плана подписки"
          },
          "amount": {
            "type": "number",
            "description": "Сумма подписки"
          },
          "description": {
            "type": "string",
            "description": "Описание плана подписки",
            "nullable": true
          },
          "isActive": {
            "type": "boolean",
            "description": "Признак активности плана подписки"
          },
          "paymentUrl": {
            "type": "string",
            "description": "Ссылка на форму оплаты"
          },
          "period": {
            "description": "Период подписки",
            "allOf": [
              {
                "$ref": "#/components/schemas/SubscriptionPlanPeriodDto"
              }
            ]
          },
          "trialPeriod": {
            "description": "Пробный период подписки",
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SubscriptionPlanPeriodDto"
              }
            ]
          },
          "data": {
            "description": "Данные для формирования заказа",
            "allOf": [
              {
                "$ref": "#/components/schemas/SubscriptionPlanDataDto"
              }
            ]
          },
          "createdAt": {
            "format": "date-time",
            "type": "string",
            "description": "Дата создания подписки"
          }
        },
        "required": [
          "id",
          "externalPlanId",
          "name",
          "amount",
          "description",
          "isActive",
          "paymentUrl",
          "period",
          "trialPeriod",
          "data",
          "createdAt"
        ]
      },
      "CreateSubscriptionPlanEndpointResponseDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Статус запроса",
            "example": "success"
          },
          "data": {
            "description": "Данные результата",
            "allOf": [
              {
                "$ref": "#/components/schemas/CreateSubscriptionPlanPubResponseDto"
              }
            ]
          }
        },
        "required": [
          "status",
          "data"
        ]
      },
      "UpdateSubscriptionPlanPubRequestDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Название плана подписки",
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "description": "Описание плана подписки. Значение null очищает поле",
            "nullable": true
          },
          "subscriptionPlanId": {
            "type": "string",
            "description": "ID плана подписки. Используется для поиска плана"
          },
          "externalPlanId": {
            "type": "string",
            "description": "Внешний ID плана подписки. Используется для поиска плана",
            "maxLength": 255
          }
        }
      },
      "UpdateSubscriptionPlanPubResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID плана подписки"
          },
          "externalPlanId": {
            "type": "string",
            "description": "Внешний ID плана подписки",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Название плана подписки"
          },
          "amount": {
            "type": "number",
            "description": "Сумма подписки"
          },
          "description": {
            "type": "string",
            "description": "Описание плана подписки",
            "nullable": true
          },
          "isActive": {
            "type": "boolean",
            "description": "Признак активности плана подписки"
          },
          "paymentUrl": {
            "type": "string",
            "description": "Ссылка на форму оплаты"
          },
          "period": {
            "description": "Период подписки",
            "allOf": [
              {
                "$ref": "#/components/schemas/SubscriptionPlanPeriodDto"
              }
            ]
          },
          "trialPeriod": {
            "description": "Пробный период подписки",
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SubscriptionPlanPeriodDto"
              }
            ]
          },
          "data": {
            "description": "Данные для формирования заказа",
            "allOf": [
              {
                "$ref": "#/components/schemas/SubscriptionPlanDataDto"
              }
            ]
          },
          "createdAt": {
            "format": "date-time",
            "type": "string",
            "description": "Дата создания подписки"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string",
            "description": "Дата обновления подписки"
          }
        },
        "required": [
          "id",
          "externalPlanId",
          "name",
          "amount",
          "description",
          "isActive",
          "paymentUrl",
          "period",
          "trialPeriod",
          "data",
          "createdAt",
          "updatedAt"
        ]
      },
      "UpdateSubscriptionPlanEndpointResponseDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Статус запроса",
            "example": "success"
          },
          "data": {
            "description": "Данные результата",
            "allOf": [
              {
                "$ref": "#/components/schemas/UpdateSubscriptionPlanPubResponseDto"
              }
            ]
          }
        },
        "required": [
          "status",
          "data"
        ]
      },
      "ProcessReceiptStatusRequestDto": {
        "type": "object",
        "properties": {}
      },
      "ReadyzCheckSwagger": {
        "type": "object",
        "properties": {
          "data": {
            "description": "results of modules check",
            "default": "[]",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "type": "string",
            "description": "result of service run",
            "default": "success"
          }
        },
        "required": [
          "data",
          "status"
        ]
      },
      "LivezCheckSwagger": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "result of service run",
            "default": "success"
          }
        },
        "required": [
          "status"
        ]
      }
    }
  }
}