{
  "openapi": "3.0.3",
  "info": {
    "title": "Finlink H2H Gateway",
    "description": "Программный интерфейс для интеграции магазина с процессингом Finlink.\n\n## Как вызывать\n1. Зарегистрируйте кабинет и дождитесь модерации.\n2. Выпустите ключ доступа (`POST /api-keys`) либо войдите и используйте session token.\n3. Передавайте ключ в заголовке `X-API-KEY`.\n4. Укажите URL колбэков через `PUT /webhooks`.\n\nБазовый префикс: `/partners/v1`.\n\n## Методы сделок (direction_id)\n- `sbp` — СБП (телефон)\n- `card` — банковская карта\n- `account` — расчётный счёт\n- `sbp_pdf` / `card_pdf` / `account_pdf` — тот же метод + обязательный PDF-чек клиента (flag `payin_pdf`, `requires_client_pdf_receipt: true`). Включите режим в кабинете «Методы». Чек: `POST /payins/{id}/receipt`.\n- Статус `payin_frozen` — заморозка сделки при подделке / несовпадении банка или суммы в PDF (только для PDF-режима).\n\nСписок доступных методов мерчанта: `GET /profile` → `directions`.\n",
    "version": "2026.8.0",
    "contact": {
      "name": "Finlink Integrations",
      "email": "integrations@finlink.local",
      "url": "/merchant"
    },
    "license": {
      "name": "Proprietary",
      "url": "/merchant"
    }
  },
  "servers": [
    {
      "url": "{scheme}://{host}/partners/v1",
      "description": "Рабочий контур",
      "variables": {
        "scheme": {
          "default": "http",
          "enum": [
            "http",
            "https"
          ]
        },
        "host": {
          "default": "127.0.0.1:3000"
        }
      }
    }
  ],
  "tags": [
    {
      "name": "Ключи",
      "description": "Ключи доступа для H2H-запросов"
    },
    {
      "name": "Баланс",
      "description": "Балансы кабинета и движение средств"
    },
    {
      "name": "Сеть",
      "description": "IP-ограничения и сетевые настройки"
    },
    {
      "name": "Входящие",
      "description": "Входящие ордера (пополнение)"
    },
    {
      "name": "Операции",
      "description": "Служебные действия по ордерам"
    },
    {
      "name": "Хуки входящих",
      "description": "Уведомления по входящим ордерам"
    },
    {
      "name": "Исходящие",
      "description": "Исходящие ордера (выплаты)"
    },
    {
      "name": "Хуки исходящих",
      "description": "Уведомления по исходящим ордерам"
    },
    {
      "name": "Аккаунт",
      "description": "Регистрация, сессия и профиль"
    },
    {
      "name": "Выводы",
      "description": "Вывод средств с баланса"
    },
    {
      "name": "Коллбеки",
      "description": "URL приёма статусов ордеров"
    }
  ],
  "x-tagGroups": [
    {
      "name": "Кабинет",
      "tags": [
        "Аккаунт",
        "Ключи",
        "Баланс",
        "Коллбеки",
        "Сеть",
        "Выводы"
      ]
    },
    {
      "name": "Ордера",
      "tags": [
        "Входящие",
        "Хуки входящих",
        "Исходящие",
        "Хуки исходящих",
        "Операции"
      ]
    }
  ],
  "paths": {
    "/api-keys": {
      "get": {
        "tags": [
          "Ключи"
        ],
        "summary": "Запросить апи-ключи",
        "description": "Запросить перечень апи-ключей с пагинацией",
        "security": [
          {
            "MerchantAccessKey": []
          },
          {
            "MerchantSession": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "statuses",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "active,paid,review"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GwEnvelopeApikeysQueryAPIKeysResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorUnauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorForbidden"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorValidation"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorInternal"
                }
              }
            }
          }
        },
        "operationId": "gw_fetch_apikeys"
      },
      "post": {
        "tags": [
          "Ключи"
        ],
        "summary": "Сгенерировать новый ключ доступа",
        "description": "Создать новый ключ доступа с полным доступом к аккаунту",
        "security": [
          {
            "MerchantAccessKey": []
          },
          {
            "MerchantSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GwEnvelopeApikeysGenerateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorUnauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorForbidden"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorValidation"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorInternal"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "description": "Request",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccessKeyCreateInput"
              }
            }
          }
        },
        "operationId": "gw_submit_apikeys"
      },
      "delete": {
        "tags": [
          "Ключи"
        ],
        "summary": "Отозвать ключи",
        "description": "Отозвать все ключи в аккаунте и заблокировать доступ",
        "security": [
          {
            "MerchantAccessKey": []
          },
          {
            "MerchantSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GwEnvelopeApikeysRevokeAllResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorUnauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorForbidden"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorValidation"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorInternal"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "description": "Request",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccessKeyRevokeAllInput"
              }
            }
          }
        },
        "operationId": "gw_remove_apikeys"
      }
    },
    "/api-keys/{id}": {
      "delete": {
        "tags": [
          "Ключи"
        ],
        "summary": "Отозвать ключ",
        "description": "Отозвать ключ по ID и заблокировать доступ",
        "security": [
          {
            "MerchantAccessKey": []
          },
          {
            "MerchantSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GwEnvelopeApikeysRevokeResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorUnauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorForbidden"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorValidation"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorInternal"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "description": "Request",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccessKeyRevokeInput"
              }
            }
          }
        },
        "operationId": "gw_remove_apikeysId"
      }
    },
    "/balance": {
      "get": {
        "tags": [
          "Баланс"
        ],
        "summary": "Запросить балансы",
        "description": "Запросить текущий перечень балансов для всех валют",
        "security": [
          {
            "MerchantAccessKey": []
          },
          {
            "MerchantSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GwEnvelopeBalancesQueryResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorUnauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorForbidden"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorValidation"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorInternal"
                }
              }
            }
          }
        },
        "operationId": "gw_fetch_balance"
      }
    },
    "/balance/{id}/loans": {
      "get": {
        "tags": [
          "Баланс"
        ],
        "summary": "Запросить займы",
        "description": "Запросить перечень займов для баланса с пагинацией",
        "security": [
          {
            "MerchantAccessKey": []
          },
          {
            "MerchantSession": []
          }
        ],
        "parameters": [
          {
            "description": "balance id",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GwEnvelopeBalancesQueryLoansResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorUnauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorForbidden"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorValidation"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorInternal"
                }
              }
            }
          }
        },
        "operationId": "gw_fetch_balanceIdLoans"
      }
    },
    "/balance/{id}/transactions": {
      "get": {
        "tags": [
          "Баланс"
        ],
        "summary": "Запросить транзакции",
        "description": "Запросить перечень транзакций для баланса с пагинацией",
        "security": [
          {
            "MerchantAccessKey": []
          },
          {
            "MerchantSession": []
          }
        ],
        "parameters": [
          {
            "description": "balance id",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GwEnvelopeBalancesQueryTransactionsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorUnauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorForbidden"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorValidation"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorInternal"
                }
              }
            }
          }
        },
        "operationId": "gw_fetch_balanceIdTransactions"
      }
    },
    "/ip-list": {
      "get": {
        "tags": [
          "Сеть"
        ],
        "summary": "Запросить перечень IP",
        "description": "Запросить актуальный перечень IP, с которых шлюз отправляет запросы на синхронизацию статуса заявок",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GwEnvelopeSystemIPListResponse"
                }
              }
            }
          }
        },
        "operationId": "gw_fetch_iplist"
      }
    },
    "/payins": {
      "get": {
        "tags": [
          "Входящие"
        ],
        "summary": "Список входящих ордеров",
        "description": "Выгрузка входящих ордеров шлюза (постранично)",
        "security": [
          {
            "MerchantAccessKey": []
          },
          {
            "MerchantSession": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "statuses",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "active,paid,review"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GwEnvelopePayinsQueryPayinsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorUnauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorForbidden"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorValidation"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorInternal"
                }
              }
            }
          }
        },
        "operationId": "gw_fetch_payins"
      },
      "post": {
        "tags": [
          "Входящие"
        ],
        "summary": "Создать заявку входящий ордер",
        "description": "Создать pay-in. Передайте direction_id (sbp|card|account или sbp_pdf|card_pdf|account_pdf). Реквизит закрепляется автоматически, если есть активный реквизит с тем же базовым методом и подходящими лимитами — тогда статус сразу review; иначе pending без реквизита. PDF-режим: клиент прикрепляет чек через POST /payins/{id}/receipt.",
        "security": [
          {
            "MerchantAccessKey": []
          },
          {
            "MerchantSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GwEnvelopePayinsCreatePayinResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorUnauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorForbidden"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorValidation"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorInternal"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "description": "Request",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GwIncomingCreatePayinRequest"
              }
            }
          }
        },
        "operationId": "gw_submit_payins"
      }
    },
    "/payins/analytics": {
      "get": {
        "tags": [
          "Входящие"
        ],
        "summary": "Аналитика",
        "description": "Аналитические данные incoming за последние 60 дней",
        "security": [
          {
            "MerchantAccessKey": []
          },
          {
            "MerchantSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GwEnvelopePayinsAnalyticsPayinsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorUnauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorForbidden"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorValidation"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorInternal"
                }
              }
            }
          }
        },
        "operationId": "gw_fetch_payinsAnalytics"
      }
    },
    "/payins/cancel/{id}": {
      "get": {
        "tags": [
          "Входящие"
        ],
        "summary": "Отменить ордер входящий ордер",
        "description": "Отменить ордер входящий ордер со стороны кабинет партнёра",
        "security": [
          {
            "MerchantAccessKey": []
          },
          {
            "MerchantSession": []
          }
        ],
        "parameters": [
          {
            "description": "incoming ID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GwEnvelopePayinsCanselResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorUnauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorForbidden"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorValidation"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorInternal"
                }
              }
            }
          }
        },
        "operationId": "gw_fetch_payinsCancelId"
      }
    },
    "/payins/csv": {
      "get": {
        "tags": [
          "Входящие"
        ],
        "summary": "Запросить отчет",
        "description": "Создать отчет о ордерх в формате CSV.",
        "security": [
          {
            "MerchantAccessKey": []
          },
          {
            "MerchantSession": []
          }
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/csv": {
                "schema": {
                  "type": "file"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/csv": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/csv": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorUnauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/csv": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorForbidden"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/csv": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorValidation"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/csv": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorInternal"
                }
              }
            }
          }
        },
        "operationId": "gw_fetch_payinsCsv"
      }
    },
    "/payins/custom/{id}": {
      "get": {
        "tags": [
          "Входящие"
        ],
        "summary": "Карточка входящего ордера по ее custom_id",
        "description": "Получить детальную информацию о входящий ордер сделке по ее custom_id",
        "security": [
          {
            "MerchantAccessKey": []
          },
          {
            "MerchantSession": []
          }
        ],
        "parameters": [
          {
            "description": "incoming ID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GwEnvelopePayinsGetPayinByCustomResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorUnauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorForbidden"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorValidation"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorInternal"
                }
              }
            }
          }
        },
        "operationId": "gw_fetch_payinsCustomId"
      }
    },
    "/payins/force-complete": {
      "post": {
        "tags": [
          "Операции",
          "Входящие"
        ],
        "summary": "Force complete incoming",
        "description": "Принудительно завершить заявку",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GwEnvelopePayinsForceCompletePayinResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorBadRequest"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorValidation"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorInternal"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "description": "Request",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GwIncomingForceCompletePayinRequest"
              }
            }
          }
        },
        "operationId": "gw_submit_payinsForcecomplete"
      }
    },
    "/payins/force-sync": {
      "post": {
        "tags": [
          "Операции",
          "Входящие"
        ],
        "summary": "Force sync incoming",
        "description": "Принудительно отправить запрос на сервер кабинет партнёра",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GwEnvelopePayinsForceSyncPayinResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorBadRequest"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorValidation"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorInternal"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "description": "Request",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GwIncomingForceSyncPayinRequest"
              }
            }
          }
        },
        "operationId": "gw_submit_payinsForcesync"
      }
    },
    "/payins/form": {
      "get": {
        "tags": [
          "Входящие"
        ],
        "summary": "Форма для входящий ордер",
        "description": "Необходимые поля и их параметры для создании ордер",
        "security": [
          {
            "MerchantAccessKey": []
          },
          {
            "MerchantSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GwEnvelopePayinsPayinFormResponse"
                }
              }
            }
          }
        },
        "operationId": "gw_fetch_payinsForm"
      }
    },
    "/payins/options": {
      "get": {
        "tags": [
          "Хуки входящих"
        ],
        "summary": "Получить настройки синх. входящий ордер",
        "description": "Получить настройки синхронизации для входящий ордер",
        "security": [
          {
            "MerchantAccessKey": []
          },
          {
            "MerchantSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GwEnvelopePayinsyncoptionsGetOptionsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorUnauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorForbidden"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorValidation"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorInternal"
                }
              }
            }
          }
        },
        "operationId": "gw_fetch_payinsOptions"
      },
      "put": {
        "tags": [
          "Хуки входящих"
        ],
        "summary": "Обновить настр. синхр. входящий ордер",
        "description": "Обновить настройки синхронизации для входящий ордер. Данные применяются мгновенно",
        "security": [
          {
            "MerchantAccessKey": []
          },
          {
            "MerchantSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GwEnvelopePayinsyncoptionsUpdateOptionsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorUnauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorForbidden"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorValidation"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorInternal"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "description": "Request",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GwPayinsyncoptionsUpdateOptionsRequest"
              }
            }
          }
        },
        "operationId": "gw_upsert_payinsOptions"
      }
    },
    "/payins/options/send_test": {
      "post": {
        "tags": [
          "Хуки входящих"
        ],
        "summary": "Отправить тестовый веб-хук",
        "description": "Отправляет тестовый запрос по переданным настройкам синхронизации. Используется для тестирования и настройки API кабинет партнёра",
        "security": [
          {
            "MerchantAccessKey": []
          },
          {
            "MerchantSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GwEnvelopePayinsyncoptionsSendTestOptionsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorUnauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorForbidden"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorValidation"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorInternal"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "description": "Request",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GwPayinsyncoptionsSendTestOptionsRequest"
              }
            }
          }
        },
        "operationId": "gw_submit_payinsOptionsSendtest"
      }
    },
    "/payins/options/validate": {
      "post": {
        "tags": [
          "Хуки входящих"
        ],
        "summary": "Валидировать настройки синх. входящий ордер",
        "description": "Проверить все параметры синхронизации (включая payload)",
        "security": [
          {
            "MerchantAccessKey": []
          },
          {
            "MerchantSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GwEnvelopePayinsyncoptionsValidateOptionsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorUnauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorForbidden"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorValidation"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorInternal"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "description": "Request",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GwPayinsyncoptionsValidateOptionsRequest"
              }
            }
          }
        },
        "operationId": "gw_submit_payinsOptionsValidate"
      }
    },
    "/payins/paid": {
      "post": {
        "tags": [
          "Входящие"
        ],
        "summary": "Пометить оплаченной входящий ордер",
        "description": "Указать статус 'paid' для ордер, уведомляет трейдеров о поступлении платежа",
        "security": [
          {
            "MerchantAccessKey": []
          },
          {
            "MerchantSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GwEnvelopePayinsPaidPayinResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorUnauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorForbidden"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorValidation"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorInternal"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "description": "Request",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GwIncomingPaidPayinRequest"
              }
            }
          }
        },
        "operationId": "gw_submit_payinsPaid"
      }
    },
    "/payins/review": {
      "post": {
        "tags": [
          "Входящие"
        ],
        "summary": "Отправить на проверку",
        "description": "Указать статус 'на проверку' для ордер входящий ордер и уведомить администрацию о необходимости проведения проверки",
        "security": [
          {
            "MerchantAccessKey": []
          },
          {
            "MerchantSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GwEnvelopePayinsReviewPayinResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorUnauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorForbidden"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorValidation"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorInternal"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "Файл подтверждения (изображение или PDF)"
                  },
                  "ids": {
                    "type": "array",
                    "description": "ID заявок для проверки"
                  }
                },
                "required": [
                  "file",
                  "ids"
                ]
              }
            }
          }
        },
        "operationId": "gw_submit_payinsReview"
      }
    },
    "/payins/sync": {
      "post": {
        "tags": [
          "Входящие"
        ],
        "summary": "Синхронизировать входящий ордер",
        "description": "Принудительно отправить запросы на сервера кабинет партнёра, указанные в incoming-sync-options",
        "security": [
          {
            "MerchantAccessKey": []
          },
          {
            "MerchantSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GwEnvelopePayinsSyncPayinResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorUnauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorForbidden"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorValidation"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorInternal"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "description": "Request",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GwIncomingSyncPayinRequest"
              }
            }
          }
        },
        "operationId": "gw_submit_payinsSync"
      }
    },
    "/payins/{id}": {
      "get": {
        "tags": [
          "Входящие"
        ],
        "summary": "Карточка входящего ордера",
        "description": "Получить детальную информацию о входящий ордер сделке",
        "security": [
          {
            "MerchantAccessKey": []
          },
          {
            "MerchantSession": []
          }
        ],
        "parameters": [
          {
            "description": "incoming ID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GwEnvelopePayinsGetPayinResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorUnauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorForbidden"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorValidation"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorInternal"
                }
              }
            }
          }
        },
        "operationId": "gw_fetch_payinsId"
      }
    },
    "/payins/{id}/payment-url": {
      "get": {
        "tags": [
          "Входящие"
        ],
        "summary": "Получить ссылку оплаты входящий ордер",
        "description": "Получить актуальную ссылку оплаты входящий ордер",
        "security": [
          {
            "MerchantAccessKey": []
          },
          {
            "MerchantSession": []
          }
        ],
        "parameters": [
          {
            "description": "incoming id",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GwEnvelopePayinsPayinPaymentURLResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorUnauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorForbidden"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorValidation"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorInternal"
                }
              }
            }
          }
        },
        "operationId": "gw_fetch_payinsIdPaymenturl"
      }
    },
    "/payouts": {
      "get": {
        "tags": [
          "Исходящие"
        ],
        "summary": "Получить ордер исходящий ордер",
        "description": "Получить список сделок исходящий ордер с пагинацией",
        "security": [
          {
            "MerchantAccessKey": []
          },
          {
            "MerchantSession": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GwEnvelopePayoutsQueryPayoutsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorUnauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorForbidden"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorValidation"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorInternal"
                }
              }
            }
          }
        },
        "operationId": "gw_fetch_payouts"
      },
      "post": {
        "tags": [
          "Исходящие"
        ],
        "summary": "Создать заявку исходящий ордер",
        "description": "Создать новую заявку (ордер) исходящий ордер",
        "security": [
          {
            "MerchantAccessKey": []
          },
          {
            "MerchantSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GwEnvelopePayoutsCreatePayoutResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorUnauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorForbidden"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorValidation"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorInternal"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "description": "Request",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GwOutgoingCreatePayoutRequest"
              }
            }
          }
        },
        "operationId": "gw_submit_payouts"
      }
    },
    "/payouts/checker": {
      "post": {
        "tags": [
          "Исходящие"
        ],
        "summary": "Callback от сервиса проверки чека",
        "description": "Обработка проверки чека от сервиса",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GwEnvelopePayoutsStopScamCallbackResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorUnauthorized"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorInternal"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "description": "Callback payload",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GwOutgoingStopScamCallbackRequest"
              }
            }
          }
        },
        "operationId": "gw_submit_payoutsChecker"
      }
    },
    "/payouts/custom/{id}": {
      "get": {
        "tags": [
          "Исходящие"
        ],
        "summary": "Получить заявку outgoing по ее custom_id",
        "security": [
          {
            "MerchantAccessKey": []
          },
          {
            "MerchantSession": []
          }
        ],
        "parameters": [
          {
            "description": "outgoing ID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GwEnvelopePayoutsGetPayoutByCustomResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorUnauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorForbidden"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorValidation"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorInternal"
                }
              }
            }
          }
        },
        "operationId": "gw_fetch_payoutsCustomId"
      }
    },
    "/payouts/form": {
      "get": {
        "tags": [
          "Исходящие"
        ],
        "summary": "Форма для исходящий ордер",
        "description": "Необходимые поля и их параметры для создании ордер",
        "security": [
          {
            "MerchantAccessKey": []
          },
          {
            "MerchantSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GwEnvelopePayoutsPayoutFormResponse"
                }
              }
            }
          }
        },
        "operationId": "gw_fetch_payoutsForm"
      }
    },
    "/payouts/options": {
      "get": {
        "tags": [
          "Хуки исходящих"
        ],
        "summary": "Получить настройки синх. исходящий ордер",
        "description": "Получить настройки синхронизации для исходящий ордер",
        "security": [
          {
            "MerchantAccessKey": []
          },
          {
            "MerchantSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GwEnvelopePayinsyncoptionsGetOptionsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorUnauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorForbidden"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorValidation"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorInternal"
                }
              }
            }
          }
        },
        "operationId": "gw_fetch_payoutsOptions"
      },
      "put": {
        "tags": [
          "Хуки исходящих"
        ],
        "summary": "Обновить настр. синхр. исходящий ордер",
        "description": "Обновить настройки синхронизации для исходящий ордер. Данные применяются мгновенно",
        "security": [
          {
            "MerchantAccessKey": []
          },
          {
            "MerchantSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GwEnvelopePayinsyncoptionsUpdateOptionsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorUnauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorForbidden"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorValidation"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorInternal"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "description": "Request",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GwPayoutsyncoptionsUpdateOptionsRequest"
              }
            }
          }
        },
        "operationId": "gw_upsert_payoutsOptions"
      }
    },
    "/payouts/options/send_test": {
      "post": {
        "tags": [
          "Хуки исходящих"
        ],
        "summary": "Отправить тестовый веб-хук",
        "description": "Отправляет тестовый запрос по переданным настройкам синхронизации. Используется для тестирования и настройки API кабинет партнёра",
        "security": [
          {
            "MerchantAccessKey": []
          },
          {
            "MerchantSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GwEnvelopePayinsyncoptionsSendTestOptionsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorUnauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorForbidden"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorValidation"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorInternal"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "description": "Request",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GwPayoutsyncoptionsSendTestOptionsRequest"
              }
            }
          }
        },
        "operationId": "gw_submit_payoutsOptionsSendtest"
      }
    },
    "/payouts/options/validate": {
      "post": {
        "tags": [
          "Хуки исходящих"
        ],
        "summary": "Валидировать настройки синх. исходящий ордер",
        "description": "Проверить все параметры синхронизации (включая payload)",
        "security": [
          {
            "MerchantAccessKey": []
          },
          {
            "MerchantSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GwEnvelopePayinsyncoptionsValidateOptionsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorUnauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorForbidden"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorValidation"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorInternal"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "description": "Request",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GwPayoutsyncoptionsValidateOptionsRequest"
              }
            }
          }
        },
        "operationId": "gw_submit_payoutsOptionsValidate"
      }
    },
    "/payouts/sync": {
      "post": {
        "tags": [
          "Исходящие"
        ],
        "summary": "Синхронизировать исходящий ордер",
        "description": "Принудительно отправить запросы на сервера кабинет партнёра, указанные в outgoing-sync-options",
        "security": [
          {
            "MerchantAccessKey": []
          },
          {
            "MerchantSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GwEnvelopePayoutsSyncPayoutResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorUnauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorForbidden"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorValidation"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorInternal"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "description": "Request",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GwOutgoingSyncPayoutRequest"
              }
            }
          }
        },
        "operationId": "gw_submit_payoutsSync"
      }
    },
    "/payouts/{id}": {
      "get": {
        "tags": [
          "Исходящие"
        ],
        "summary": "Получить заявку outgoing по ее id",
        "security": [
          {
            "MerchantAccessKey": []
          },
          {
            "MerchantSession": []
          }
        ],
        "parameters": [
          {
            "description": "outgoing ID",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GwEnvelopePayoutsGetPayoutResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorUnauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorForbidden"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorValidation"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorInternal"
                }
              }
            }
          }
        },
        "operationId": "gw_fetch_payoutsId"
      }
    },
    "/profile": {
      "get": {
        "tags": [
          "Аккаунт"
        ],
        "summary": "Профиль",
        "description": "Профиль кабинета, ставки и список directions (direction_id: sbp | card | account | *_pdf; flag payin_pdf).",
        "security": [
          {
            "MerchantAccessKey": []
          },
          {
            "MerchantSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK — включает directions[] с direction_id"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorUnauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorForbidden"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorValidation"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorInternal"
                }
              }
            }
          }
        },
        "operationId": "gw_fetch_profile"
      }
    },
    "/register": {
      "post": {
        "tags": [
          "Аккаунт"
        ],
        "summary": "Зарегистрироваться",
        "description": "Зарегистрировать новый аккаунт и отправить запрос на верификацию",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GwEnvelopeProfileRegisterResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorUnauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorForbidden"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorValidation"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorInternal"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "description": "Request",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GwMerchantRegisterRequest"
              }
            }
          }
        },
        "operationId": "gw_submit_register"
      }
    },
    "/setup-otp": {
      "post": {
        "tags": [
          "Аккаунт"
        ],
        "summary": "Установить OTP ключ",
        "description": "Закрепить двухфакторную аутентификацию (единоразово)",
        "security": [
          {
            "MerchantAccessKey": []
          },
          {
            "MerchantSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GwEnvelopeProfileSetOTPResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorUnauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorForbidden"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorValidation"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorInternal"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "description": "Request",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GwMerchantSetOTPRequest"
              }
            }
          }
        },
        "operationId": "gw_submit_setupotp"
      }
    },
    "/signin": {
      "post": {
        "tags": [
          "Аккаунт"
        ],
        "summary": "Войти",
        "description": "Войти, используя логин, пароль и одноразовый код",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GwEnvelopeProfileSignInResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorUnauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorForbidden"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorValidation"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorInternal"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "description": "Request",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GwMerchantSignInRequest"
              }
            }
          }
        },
        "operationId": "gw_submit_signin"
      }
    },
    "/withdrawals": {
      "get": {
        "tags": [
          "Выводы"
        ],
        "summary": "История выводов",
        "description": "Список заявок на вывод с пагинацией (limit / offset).",
        "security": [
          {
            "MerchantAccessKey": []
          },
          {
            "MerchantSession": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GwEnvelopeWithdrawalsQueryWithdrawalsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorUnauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorForbidden"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorValidation"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorInternal"
                }
              }
            }
          }
        },
        "operationId": "gw_fetch_withdrawals"
      }
    },
    "/withdrawals/request": {
      "post": {
        "tags": [
          "Выводы"
        ],
        "summary": "Создать вывод",
        "description": "Новая заявка на вывод средств с выбранного баланса.",
        "security": [
          {
            "MerchantAccessKey": []
          },
          {
            "MerchantSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GwEnvelopeWithdrawalsRequestWithdrawalResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorUnauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorForbidden"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorValidation"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayErrorInternal"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "description": "Request",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GwCashoutRequestWithdrawalRequest"
              }
            }
          }
        },
        "operationId": "gw_submit_withdrawalsRequest"
      }
    },
    "/webhooks": {
      "get": {
        "tags": [
          "Коллбеки"
        ],
        "summary": "Текущий webhook_url",
        "security": [
          {
            "MerchantAccessKey": []
          },
          {
            "MerchantSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "operationId": "gw_fetch_webhooks"
      },
      "put": {
        "tags": [
          "Коллбеки"
        ],
        "summary": "Сохранить URL для коллбеков статусов",
        "description": "На этот URL Finlink шлёт POST при создании и смене статуса входящий ордер / исходящий ордер.",
        "security": [
          {
            "MerchantAccessKey": []
          },
          {
            "MerchantSession": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CallbackEndpointConfig"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "operationId": "gw_upsert_webhooks"
      },
      "post": {
        "tags": [
          "Коллбеки"
        ],
        "summary": "Отправить тестовый коллбек",
        "security": [
          {
            "MerchantAccessKey": []
          },
          {
            "MerchantSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "operationId": "gw_submit_webhooks"
      }
    }
  },
  "components": {
    "securitySchemes": {
      "MerchantAccessKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-KEY",
        "description": "Секрет кабинета. Создаётся один раз — сохраните локально."
      },
      "MerchantSession": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "Session",
        "description": "Токен сессии после `/signin` или `/register`."
      }
    },
    "schemas": {
      "AccessKeyCreateInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "otp": {
            "description": "Обязателен при активированной 2FA",
            "type": "string"
          },
          "whitelist_ip": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "AccessKeyCreateResult": {
        "type": "object",
        "required": [
          "created_at",
          "key",
          "name"
        ],
        "properties": {
          "created_at": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "AccessKeyListResult": {
        "type": "object",
        "required": [
          "results",
          "total"
        ],
        "properties": {
          "results": {
            "description": "Array of items",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccessKeyListItem"
            }
          },
          "total": {
            "description": "Total count",
            "type": "integer"
          }
        }
      },
      "AccessKeyListItem": {
        "type": "object",
        "required": [
          "id",
          "key",
          "name"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "AccessKeyRevokeAllInput": {
        "type": "object"
      },
      "AccessKeyRevokeAllResult": {
        "type": "object"
      },
      "AccessKeyRevokeInput": {
        "type": "object"
      },
      "AccessKeyRevokeResult": {
        "type": "object"
      },
      "LedgerLoanListResult": {
        "type": "object",
        "required": [
          "results",
          "total"
        ],
        "properties": {
          "results": {
            "description": "Array of items",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LedgerLoanItem"
            }
          },
          "total": {
            "description": "Total count",
            "type": "integer"
          }
        }
      },
      "LedgerLoanItem": {
        "type": "object",
        "required": [
          "amount",
          "created_at",
          "id",
          "rate",
          "tx_id"
        ],
        "properties": {
          "amount": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "example": "2020-08-10T03:47:30.85458792+00:00"
          },
          "id": {
            "type": "string"
          },
          "rate": {
            "type": "string"
          },
          "tx_id": {
            "type": "string"
          }
        }
      },
      "LedgerBalanceListResult": {
        "type": "object",
        "required": [
          "balances"
        ],
        "properties": {
          "balances": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LedgerBalanceItem"
            }
          }
        }
      },
      "LedgerTxListResult": {
        "type": "object",
        "required": [
          "results",
          "total"
        ],
        "properties": {
          "results": {
            "description": "Array of items",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LedgerTxItem"
            }
          },
          "total": {
            "description": "Total count",
            "type": "integer"
          }
        }
      },
      "LedgerTxItem": {
        "type": "object",
        "required": [
          "after",
          "amount",
          "before",
          "created_at",
          "id",
          "reason"
        ],
        "properties": {
          "after": {
            "type": "string"
          },
          "amount": {
            "type": "string"
          },
          "before": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "example": "2020-08-10T03:47:30.85458792+00:00"
          },
          "id": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "LedgerBalanceItem": {
        "type": "object",
        "required": [
          "balance",
          "currency_id",
          "freezed",
          "id"
        ],
        "properties": {
          "balance": {
            "type": "string",
            "example": "123.456"
          },
          "currency_id": {
            "type": "string",
            "example": "rub-fiat"
          },
          "freezed": {
            "type": "string",
            "example": "123.456"
          },
          "id": {
            "type": "string"
          }
        }
      },
      "GatewayErrorBadRequest": {
        "type": "object",
        "required": [
          "code",
          "field",
          "message"
        ],
        "properties": {
          "code": {
            "type": "string",
            "example": "bad_request"
          },
          "field": {
            "type": "string",
            "example": "Invalid request field name"
          },
          "message": {
            "type": "string",
            "example": "Localized human-readable message ready for frontend"
          }
        }
      },
      "GatewayErrorForbidden": {
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "string",
            "example": "forbidden"
          },
          "message": {
            "type": "string",
            "example": "Localized human-readable message ready for frontend"
          }
        }
      },
      "GatewayErrorInternal": {
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "string",
            "example": "internal"
          },
          "message": {
            "type": "string",
            "example": "Localized human-readable message ready for frontend"
          }
        }
      },
      "GatewayErrorUnauthorized": {
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "string",
            "example": "unauthorized"
          },
          "message": {
            "type": "string",
            "example": "Localized human-readable message ready for frontend"
          }
        }
      },
      "GatewayErrorValidation": {
        "type": "object",
        "required": [
          "code",
          "current_value",
          "field",
          "message"
        ],
        "properties": {
          "code": {
            "type": "string",
            "example": "unprocessable_entity"
          },
          "current_value": {
            "type": "string",
            "example": "Current invalid value"
          },
          "field": {
            "type": "string",
            "example": "Invalid entity field name"
          },
          "message": {
            "type": "string",
            "example": "Localized human-readable message ready for frontend"
          }
        }
      },
      "GwFormField": {
        "type": "object",
        "required": [
          "field_name",
          "input_type",
          "label"
        ],
        "properties": {
          "field_name": {
            "type": "string"
          },
          "input_type": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "placeholder": {
            "type": "string"
          },
          "props": {},
          "validators": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GwFormValidator"
            }
          }
        }
      },
      "GwFormValidator": {
        "type": "object",
        "required": [
          "error_message",
          "type"
        ],
        "properties": {
          "error_message": {
            "type": "string"
          },
          "props": {},
          "type": {
            "type": "string"
          }
        }
      },
      "GwEnvelopeApikeysGenerateResponse": {
        "type": "object",
        "required": [
          "data",
          "status"
        ],
        "properties": {
          "data": {
            "description": "Data of response",
            "$ref": "#/components/schemas/AccessKeyCreateResult"
          },
          "status": {
            "description": "Status of operation, always 'true'",
            "type": "boolean"
          }
        }
      },
      "GwEnvelopeApikeysQueryAPIKeysResponse": {
        "type": "object",
        "required": [
          "data",
          "status"
        ],
        "properties": {
          "data": {
            "description": "Data of response",
            "$ref": "#/components/schemas/AccessKeyListResult"
          },
          "status": {
            "description": "Status of operation, always 'true'",
            "type": "boolean"
          }
        }
      },
      "GwEnvelopeApikeysRevokeAllResponse": {
        "type": "object",
        "required": [
          "data",
          "status"
        ],
        "properties": {
          "data": {
            "description": "Data of response",
            "$ref": "#/components/schemas/AccessKeyRevokeAllResult"
          },
          "status": {
            "description": "Status of operation, always 'true'",
            "type": "boolean"
          }
        }
      },
      "GwEnvelopeApikeysRevokeResponse": {
        "type": "object",
        "required": [
          "data",
          "status"
        ],
        "properties": {
          "data": {
            "description": "Data of response",
            "$ref": "#/components/schemas/AccessKeyRevokeResult"
          },
          "status": {
            "description": "Status of operation, always 'true'",
            "type": "boolean"
          }
        }
      },
      "GwEnvelopeBalancesQueryLoansResponse": {
        "type": "object",
        "required": [
          "data",
          "status"
        ],
        "properties": {
          "data": {
            "description": "Data of response",
            "$ref": "#/components/schemas/LedgerLoanListResult"
          },
          "status": {
            "description": "Status of operation, always 'true'",
            "type": "boolean"
          }
        }
      },
      "GwEnvelopeBalancesQueryResponse": {
        "type": "object",
        "required": [
          "data",
          "status"
        ],
        "properties": {
          "data": {
            "description": "Data of response",
            "$ref": "#/components/schemas/LedgerBalanceListResult"
          },
          "status": {
            "description": "Status of operation, always 'true'",
            "type": "boolean"
          }
        }
      },
      "GwEnvelopeBalancesQueryTransactionsResponse": {
        "type": "object",
        "required": [
          "data",
          "status"
        ],
        "properties": {
          "data": {
            "description": "Data of response",
            "$ref": "#/components/schemas/LedgerTxListResult"
          },
          "status": {
            "description": "Status of operation, always 'true'",
            "type": "boolean"
          }
        }
      },
      "GwEnvelopePayinsAnalyticsPayinsResponse": {
        "type": "object",
        "required": [
          "data",
          "status"
        ],
        "properties": {
          "data": {
            "description": "Data of response",
            "$ref": "#/components/schemas/GwIncomingAnalyticsPayinsResponse"
          },
          "status": {
            "description": "Status of operation, always 'true'",
            "type": "boolean"
          }
        }
      },
      "GwEnvelopePayinsCanselResponse": {
        "type": "object",
        "required": [
          "data",
          "status"
        ],
        "properties": {
          "data": {
            "description": "Data of response",
            "$ref": "#/components/schemas/GwIncomingCanselResponse"
          },
          "status": {
            "description": "Status of operation, always 'true'",
            "type": "boolean"
          }
        }
      },
      "GwEnvelopePayinsCreatePayinResponse": {
        "type": "object",
        "required": [
          "data",
          "status"
        ],
        "properties": {
          "data": {
            "description": "Data of response",
            "$ref": "#/components/schemas/GwIncomingCreatePayinResponse"
          },
          "status": {
            "description": "Status of operation, always 'true'",
            "type": "boolean"
          }
        }
      },
      "GwEnvelopePayinsForceCompletePayinResponse": {
        "type": "object",
        "required": [
          "data",
          "status"
        ],
        "properties": {
          "data": {
            "description": "Data of response",
            "$ref": "#/components/schemas/GwIncomingForceCompletePayinResponse"
          },
          "status": {
            "description": "Status of operation, always 'true'",
            "type": "boolean"
          }
        }
      },
      "GwEnvelopePayinsForceSyncPayinResponse": {
        "type": "object",
        "required": [
          "data",
          "status"
        ],
        "properties": {
          "data": {
            "description": "Data of response",
            "$ref": "#/components/schemas/GwIncomingForceSyncPayinResponse"
          },
          "status": {
            "description": "Status of operation, always 'true'",
            "type": "boolean"
          }
        }
      },
      "GwEnvelopePayinsGetPayinByCustomResponse": {
        "type": "object",
        "required": [
          "data",
          "status"
        ],
        "properties": {
          "data": {
            "description": "Data of response",
            "$ref": "#/components/schemas/GwIncomingGetPayinByCustomResponse"
          },
          "status": {
            "description": "Status of operation, always 'true'",
            "type": "boolean"
          }
        }
      },
      "GwEnvelopePayinsGetPayinResponse": {
        "type": "object",
        "required": [
          "data",
          "status"
        ],
        "properties": {
          "data": {
            "description": "Data of response",
            "$ref": "#/components/schemas/GwIncomingGetPayinResponse"
          },
          "status": {
            "description": "Status of operation, always 'true'",
            "type": "boolean"
          }
        }
      },
      "GwEnvelopePayinsPaidPayinResponse": {
        "type": "object",
        "required": [
          "data",
          "status"
        ],
        "properties": {
          "data": {
            "description": "Data of response",
            "$ref": "#/components/schemas/GwIncomingPaidPayinResponse"
          },
          "status": {
            "description": "Status of operation, always 'true'",
            "type": "boolean"
          }
        }
      },
      "GwEnvelopePayinsPayinFormResponse": {
        "type": "object",
        "required": [
          "data",
          "status"
        ],
        "properties": {
          "data": {
            "description": "Data of response",
            "$ref": "#/components/schemas/GwIncomingPayinFormResponse"
          },
          "status": {
            "description": "Status of operation, always 'true'",
            "type": "boolean"
          }
        }
      },
      "GwEnvelopePayinsPayinPaymentURLResponse": {
        "type": "object",
        "required": [
          "data",
          "status"
        ],
        "properties": {
          "data": {
            "description": "Data of response",
            "$ref": "#/components/schemas/GwIncomingPayinPaymentURLResponse"
          },
          "status": {
            "description": "Status of operation, always 'true'",
            "type": "boolean"
          }
        }
      },
      "GwEnvelopePayinsQueryPayinsResponse": {
        "type": "object",
        "required": [
          "data",
          "status"
        ],
        "properties": {
          "data": {
            "description": "Data of response",
            "$ref": "#/components/schemas/GwIncomingQueryPayinsResponse"
          },
          "status": {
            "description": "Status of operation, always 'true'",
            "type": "boolean"
          }
        }
      },
      "GwEnvelopePayinsReviewPayinResponse": {
        "type": "object",
        "required": [
          "data",
          "status"
        ],
        "properties": {
          "data": {
            "description": "Data of response",
            "$ref": "#/components/schemas/GwIncomingReviewPayinResponse"
          },
          "status": {
            "description": "Status of operation, always 'true'",
            "type": "boolean"
          }
        }
      },
      "GwEnvelopePayinsSyncPayinResponse": {
        "type": "object",
        "required": [
          "data",
          "status"
        ],
        "properties": {
          "data": {
            "description": "Data of response",
            "$ref": "#/components/schemas/GwIncomingSyncPayinResponse"
          },
          "status": {
            "description": "Status of operation, always 'true'",
            "type": "boolean"
          }
        }
      },
      "GwEnvelopePayinsyncoptionsGetOptionsResponse": {
        "type": "object",
        "required": [
          "data",
          "status"
        ],
        "properties": {
          "data": {
            "description": "Data of response",
            "$ref": "#/components/schemas/GwPayinsyncoptionsGetOptionsResponse"
          },
          "status": {
            "description": "Status of operation, always 'true'",
            "type": "boolean"
          }
        }
      },
      "GwEnvelopePayinsyncoptionsSendTestOptionsResponse": {
        "type": "object",
        "required": [
          "data",
          "status"
        ],
        "properties": {
          "data": {
            "description": "Data of response",
            "$ref": "#/components/schemas/GwPayinsyncoptionsSendTestOptionsResponse"
          },
          "status": {
            "description": "Status of operation, always 'true'",
            "type": "boolean"
          }
        }
      },
      "GwEnvelopePayinsyncoptionsUpdateOptionsResponse": {
        "type": "object",
        "required": [
          "data",
          "status"
        ],
        "properties": {
          "data": {
            "description": "Data of response",
            "$ref": "#/components/schemas/GwPayinsyncoptionsUpdateOptionsResponse"
          },
          "status": {
            "description": "Status of operation, always 'true'",
            "type": "boolean"
          }
        }
      },
      "GwEnvelopePayinsyncoptionsValidateOptionsResponse": {
        "type": "object",
        "required": [
          "data",
          "status"
        ],
        "properties": {
          "data": {
            "description": "Data of response",
            "$ref": "#/components/schemas/GwPayinsyncoptionsValidateOptionsResponse"
          },
          "status": {
            "description": "Status of operation, always 'true'",
            "type": "boolean"
          }
        }
      },
      "GwEnvelopePayoutsCreatePayoutResponse": {
        "type": "object",
        "required": [
          "data",
          "status"
        ],
        "properties": {
          "data": {
            "description": "Data of response",
            "$ref": "#/components/schemas/GwOutgoingCreatePayoutResponse"
          },
          "status": {
            "description": "Status of operation, always 'true'",
            "type": "boolean"
          }
        }
      },
      "GwEnvelopePayoutsGetPayoutByCustomResponse": {
        "type": "object",
        "required": [
          "data",
          "status"
        ],
        "properties": {
          "data": {
            "description": "Data of response",
            "$ref": "#/components/schemas/GwOutgoingGetPayoutByCustomResponse"
          },
          "status": {
            "description": "Status of operation, always 'true'",
            "type": "boolean"
          }
        }
      },
      "GwEnvelopePayoutsGetPayoutResponse": {
        "type": "object",
        "required": [
          "data",
          "status"
        ],
        "properties": {
          "data": {
            "description": "Data of response",
            "$ref": "#/components/schemas/GwOutgoingGetPayoutResponse"
          },
          "status": {
            "description": "Status of operation, always 'true'",
            "type": "boolean"
          }
        }
      },
      "GwEnvelopePayoutsPayoutFormResponse": {
        "type": "object",
        "required": [
          "data",
          "status"
        ],
        "properties": {
          "data": {
            "description": "Data of response",
            "$ref": "#/components/schemas/GwOutgoingPayoutFormResponse"
          },
          "status": {
            "description": "Status of operation, always 'true'",
            "type": "boolean"
          }
        }
      },
      "GwEnvelopePayoutsQueryPayoutsResponse": {
        "type": "object",
        "required": [
          "data",
          "status"
        ],
        "properties": {
          "data": {
            "description": "Data of response",
            "$ref": "#/components/schemas/GwOutgoingQueryPayoutsResponse"
          },
          "status": {
            "description": "Status of operation, always 'true'",
            "type": "boolean"
          }
        }
      },
      "GwEnvelopePayoutsStopScamCallbackResponse": {
        "type": "object",
        "required": [
          "data",
          "status"
        ],
        "properties": {
          "data": {
            "description": "Data of response",
            "$ref": "#/components/schemas/GwOutgoingStopScamCallbackResponse"
          },
          "status": {
            "description": "Status of operation, always 'true'",
            "type": "boolean"
          }
        }
      },
      "GwEnvelopePayoutsSyncPayoutResponse": {
        "type": "object",
        "required": [
          "data",
          "status"
        ],
        "properties": {
          "data": {
            "description": "Data of response",
            "$ref": "#/components/schemas/GwOutgoingSyncPayoutResponse"
          },
          "status": {
            "description": "Status of operation, always 'true'",
            "type": "boolean"
          }
        }
      },
      "GwEnvelopeProfileProfileResponse": {
        "type": "object",
        "required": [
          "data",
          "status"
        ],
        "properties": {
          "data": {
            "description": "Data of response",
            "$ref": "#/components/schemas/GwMerchantProfileResponse"
          },
          "status": {
            "description": "Status of operation, always 'true'",
            "type": "boolean"
          }
        }
      },
      "GwEnvelopeProfileRegisterResponse": {
        "type": "object",
        "required": [
          "data",
          "status"
        ],
        "properties": {
          "data": {
            "description": "Data of response",
            "$ref": "#/components/schemas/GwMerchantRegisterResponse"
          },
          "status": {
            "description": "Status of operation, always 'true'",
            "type": "boolean"
          }
        }
      },
      "GwEnvelopeProfileSetOTPResponse": {
        "type": "object",
        "required": [
          "data",
          "status"
        ],
        "properties": {
          "data": {
            "description": "Data of response",
            "$ref": "#/components/schemas/GwMerchantSetOTPResponse"
          },
          "status": {
            "description": "Status of operation, always 'true'",
            "type": "boolean"
          }
        }
      },
      "GwEnvelopeProfileSignInResponse": {
        "type": "object",
        "required": [
          "data",
          "status"
        ],
        "properties": {
          "data": {
            "description": "Data of response",
            "$ref": "#/components/schemas/GwMerchantSignInResponse"
          },
          "status": {
            "description": "Status of operation, always 'true'",
            "type": "boolean"
          }
        }
      },
      "GwEnvelopeSystemIPListResponse": {
        "type": "object",
        "required": [
          "data",
          "status"
        ],
        "properties": {
          "data": {
            "description": "Data of response",
            "$ref": "#/components/schemas/GwSysIPListResponse"
          },
          "status": {
            "description": "Status of operation, always 'true'",
            "type": "boolean"
          }
        }
      },
      "GwEnvelopeWithdrawalsQueryWithdrawalsResponse": {
        "type": "object",
        "required": [
          "data",
          "status"
        ],
        "properties": {
          "data": {
            "description": "Data of response",
            "$ref": "#/components/schemas/GwCashoutQueryWithdrawalsResponse"
          },
          "status": {
            "description": "Status of operation, always 'true'",
            "type": "boolean"
          }
        }
      },
      "GwEnvelopeWithdrawalsRequestWithdrawalResponse": {
        "type": "object",
        "required": [
          "data",
          "status"
        ],
        "properties": {
          "data": {
            "description": "Data of response",
            "$ref": "#/components/schemas/GwCashoutRequestWithdrawalResponse"
          },
          "status": {
            "description": "Status of operation, always 'true'",
            "type": "boolean"
          }
        }
      },
      "GwIncomingAnalyticsPayinsResponse": {
        "type": "object",
        "required": [
          "avg_sum",
          "conversion",
          "count",
          "devices",
          "payins",
          "payins_by_day",
          "sum"
        ],
        "properties": {
          "avg_sum": {
            "type": "number"
          },
          "conversion": {
            "type": "integer"
          },
          "count": {
            "type": "integer"
          },
          "devices": {
            "type": "object",
            "required": [
              "data"
            ],
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/GwIncomingDeviceItem"
                }
              }
            }
          },
          "payins": {
            "type": "object",
            "required": [
              "data"
            ],
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/GwIncomingPayinItem"
                }
              }
            }
          },
          "payins_by_day": {
            "type": "object",
            "required": [
              "data",
              "max",
              "min"
            ],
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/GwIncomingPayinByDayItem"
                }
              },
              "max": {
                "type": "integer"
              },
              "min": {
                "type": "integer"
              }
            }
          },
          "sum": {
            "type": "number"
          }
        }
      },
      "GwIncomingCanselResponse": {
        "type": "object",
        "required": [
          "base_amount",
          "created_at",
          "expired_at",
          "id",
          "status",
          "synced"
        ],
        "properties": {
          "bank_id": {
            "type": "string"
          },
          "base_amount": {
            "type": "string",
            "example": "123.456"
          },
          "created_at": {
            "type": "string",
            "example": "2020-08-10T03:47:30.85458792+00:00"
          },
          "custom_id": {
            "type": "string"
          },
          "direction_id": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DirectionId"
              }
            ],
            "description": "Метод оплаты: sbp (СБП), card (карта), account (счёт). Обязательно передавайте для pay-in."
          },
          "expired_at": {
            "type": "string",
            "example": "2020-08-10T03:47:30.85458792+00:00"
          },
          "firstname": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "lastname": {
            "type": "string"
          },
          "requisite": {
            "type": "string"
          },
          "result_amount": {
            "type": "string",
            "example": "123.456"
          },
          "status": {
            "type": "string"
          },
          "synced": {
            "type": "boolean"
          }
        }
      },
      "GwIncomingCreatePayinRequest": {
        "type": "object",
        "required": [
          "amount",
          "failed_url",
          "merchant_reference_id",
          "success_url"
        ],
        "properties": {
          "amount": {
            "type": "string",
            "example": "123.456"
          },
          "custom_id": {
            "type": "string"
          },
          "direction_id": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DirectionId"
              }
            ],
            "description": "Метод оплаты: sbp (СБП), card (карта), account (счёт). Обязательно передавайте для pay-in."
          },
          "failed_url": {
            "type": "string"
          },
          "merchant_reference_id": {
            "type": "string"
          },
          "success_url": {
            "type": "string"
          },
          "ttl_seconds": {
            "type": "integer",
            "description": "Время на исполнение сделки в секундах. По истечении pending/review автоматически переходят в cancelled. По умолчанию 900 (15 мин).",
            "example": 900
          },
          "expires_in": {
            "type": "integer",
            "description": "Синоним ttl_seconds"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "Явный ISO-дедлайн исполнения сделки"
          },
          "expired_at": {
            "type": "string",
            "format": "date-time",
            "description": "Синоним expires_at"
          }
        }
      },
      "GwIncomingCreatePayinResponse": {
        "type": "object",
        "required": [
          "payin",
          "payment_url"
        ],
        "properties": {
          "payin": {
            "$ref": "#/components/schemas/GwIncomingPayinBaseViewWithBank"
          },
          "payment_url": {
            "type": "string"
          }
        }
      },
      "GwIncomingForceCompletePayinRequest": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          }
        }
      },
      "GwIncomingForceCompletePayinResponse": {
        "type": "object",
        "required": [
          "base_amount",
          "created_at",
          "expired_at",
          "id",
          "status",
          "synced"
        ],
        "properties": {
          "bank_id": {
            "type": "string"
          },
          "base_amount": {
            "type": "string",
            "example": "123.456"
          },
          "created_at": {
            "type": "string",
            "example": "2020-08-10T03:47:30.85458792+00:00"
          },
          "custom_id": {
            "type": "string"
          },
          "direction_id": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DirectionId"
              }
            ],
            "description": "Метод оплаты: sbp (СБП), card (карта), account (счёт). Обязательно передавайте для pay-in."
          },
          "expired_at": {
            "type": "string",
            "example": "2020-08-10T03:47:30.85458792+00:00"
          },
          "firstname": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "lastname": {
            "type": "string"
          },
          "requisite": {
            "type": "string"
          },
          "result_amount": {
            "type": "string",
            "example": "123.456"
          },
          "status": {
            "type": "string"
          },
          "synced": {
            "type": "boolean"
          }
        }
      },
      "GwIncomingForceSyncPayinRequest": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          }
        }
      },
      "GwIncomingForceSyncPayinResponse": {
        "type": "object"
      },
      "GwIncomingGetPayinByCustomResponse": {
        "type": "object",
        "required": [
          "base_amount",
          "created_at",
          "expired_at",
          "id",
          "status",
          "synced"
        ],
        "properties": {
          "bank_id": {
            "type": "string"
          },
          "base_amount": {
            "type": "string",
            "example": "123.456"
          },
          "created_at": {
            "type": "string",
            "example": "2020-08-10T03:47:30.85458792+00:00"
          },
          "custom_id": {
            "type": "string"
          },
          "direction_id": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DirectionId"
              }
            ],
            "description": "Метод оплаты: sbp (СБП), card (карта), account (счёт). Обязательно передавайте для pay-in."
          },
          "expired_at": {
            "type": "string",
            "example": "2020-08-10T03:47:30.85458792+00:00"
          },
          "firstname": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "lastname": {
            "type": "string"
          },
          "requisite": {
            "type": "string"
          },
          "result_amount": {
            "type": "string",
            "example": "123.456"
          },
          "status": {
            "type": "string"
          },
          "synced": {
            "type": "boolean"
          }
        }
      },
      "GwIncomingGetPayinResponse": {
        "type": "object",
        "required": [
          "base_amount",
          "created_at",
          "expired_at",
          "id",
          "status",
          "synced"
        ],
        "properties": {
          "bank_id": {
            "type": "string"
          },
          "base_amount": {
            "type": "string",
            "example": "123.456"
          },
          "created_at": {
            "type": "string",
            "example": "2020-08-10T03:47:30.85458792+00:00"
          },
          "custom_id": {
            "type": "string"
          },
          "direction_id": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DirectionId"
              }
            ],
            "description": "Метод оплаты: sbp (СБП), card (карта), account (счёт). Обязательно передавайте для pay-in."
          },
          "expired_at": {
            "type": "string",
            "example": "2020-08-10T03:47:30.85458792+00:00"
          },
          "firstname": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "lastname": {
            "type": "string"
          },
          "requisite": {
            "type": "string"
          },
          "result_amount": {
            "type": "string",
            "example": "123.456"
          },
          "status": {
            "type": "string"
          },
          "synced": {
            "type": "boolean"
          }
        }
      },
      "GwIncomingPaidPayinRequest": {
        "type": "object",
        "properties": {
          "ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "GwIncomingPaidPayinResponse": {
        "type": "object",
        "required": [
          "results",
          "total"
        ],
        "properties": {
          "results": {
            "description": "Array of items",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GwIncomingPaidPayinResponseItem"
            }
          },
          "total": {
            "description": "Total count",
            "type": "integer"
          }
        }
      },
      "GwIncomingPaidPayinResponseItem": {
        "type": "object",
        "required": [
          "base_amount",
          "created_at",
          "expired_at",
          "id",
          "status",
          "synced"
        ],
        "properties": {
          "bank_id": {
            "type": "string"
          },
          "base_amount": {
            "type": "string",
            "example": "123.456"
          },
          "created_at": {
            "type": "string",
            "example": "2020-08-10T03:47:30.85458792+00:00"
          },
          "custom_id": {
            "type": "string"
          },
          "direction_id": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DirectionId"
              }
            ],
            "description": "Метод оплаты: sbp (СБП), card (карта), account (счёт). Обязательно передавайте для pay-in."
          },
          "expired_at": {
            "type": "string",
            "example": "2020-08-10T03:47:30.85458792+00:00"
          },
          "firstname": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "lastname": {
            "type": "string"
          },
          "requisite": {
            "type": "string"
          },
          "result_amount": {
            "type": "string",
            "example": "123.456"
          },
          "status": {
            "type": "string"
          },
          "synced": {
            "type": "boolean"
          }
        }
      },
      "GwIncomingPayinBaseViewWithBank": {
        "type": "object",
        "required": [
          "base_amount",
          "created_at",
          "expired_at",
          "id",
          "status",
          "synced",
          "usdt_sum"
        ],
        "properties": {
          "bank_id": {
            "type": "string"
          },
          "bank_str": {
            "type": "string"
          },
          "base_amount": {
            "type": "string",
            "example": "123.456"
          },
          "created_at": {
            "type": "string",
            "example": "2020-08-10T03:47:30.85458792+00:00"
          },
          "custom_id": {
            "type": "string"
          },
          "direction_id": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DirectionId"
              }
            ],
            "description": "Метод оплаты: sbp (СБП), card (карта), account (счёт). Обязательно передавайте для pay-in."
          },
          "expired_at": {
            "type": "string",
            "example": "2020-08-10T03:47:30.85458792+00:00"
          },
          "firstname": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "lastname": {
            "type": "string"
          },
          "requisite": {
            "type": "string"
          },
          "result_amount": {
            "type": "string",
            "example": "123.456"
          },
          "status": {
            "type": "string"
          },
          "synced": {
            "type": "boolean"
          },
          "usdt_sum": {
            "type": "string"
          },
          "vnd_amount": {
            "type": "string",
            "example": "123.456"
          }
        }
      },
      "GwIncomingPayinDirView": {
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "GwIncomingPayinFormResponse": {
        "type": "object",
        "required": [
          "create_url",
          "fields"
        ],
        "properties": {
          "create_url": {
            "type": "string"
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GwFormField"
            }
          }
        }
      },
      "GwIncomingPayinPaymentURLResponse": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          }
        }
      },
      "GwIncomingQueryPayinsResponse": {
        "type": "object",
        "required": [
          "results",
          "total"
        ],
        "properties": {
          "results": {
            "description": "Array of items",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GwIncomingQueryPayinsResponseItem"
            }
          },
          "total": {
            "description": "Total count",
            "type": "integer"
          }
        }
      },
      "GwIncomingQueryPayinsResponseItem": {
        "type": "object",
        "required": [
          "base_amount",
          "created_at",
          "expired_at",
          "id",
          "status",
          "synced"
        ],
        "properties": {
          "bank_id": {
            "type": "string"
          },
          "base_amount": {
            "type": "string",
            "example": "123.456"
          },
          "created_at": {
            "type": "string",
            "example": "2020-08-10T03:47:30.85458792+00:00"
          },
          "custom_id": {
            "type": "string"
          },
          "direction": {
            "$ref": "#/components/schemas/GwIncomingPayinDirView"
          },
          "direction_id": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DirectionId"
              }
            ],
            "description": "Метод оплаты: sbp (СБП), card (карта), account (счёт). Обязательно передавайте для pay-in."
          },
          "expired_at": {
            "type": "string",
            "example": "2020-08-10T03:47:30.85458792+00:00"
          },
          "firstname": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "lastname": {
            "type": "string"
          },
          "requisite": {
            "type": "string"
          },
          "result_amount": {
            "type": "string",
            "example": "123.456"
          },
          "status": {
            "type": "string"
          },
          "synced": {
            "type": "boolean"
          }
        }
      },
      "GwIncomingReviewPayinResponse": {
        "type": "object",
        "required": [
          "results",
          "total"
        ],
        "properties": {
          "results": {
            "description": "Array of items",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GwIncomingReviewPayinResponseItem"
            }
          },
          "total": {
            "description": "Total count",
            "type": "integer"
          }
        }
      },
      "GwIncomingReviewPayinResponseItem": {
        "type": "object",
        "required": [
          "base_amount",
          "created_at",
          "expired_at",
          "id",
          "status",
          "synced"
        ],
        "properties": {
          "bank_id": {
            "type": "string"
          },
          "base_amount": {
            "type": "string",
            "example": "123.456"
          },
          "created_at": {
            "type": "string",
            "example": "2020-08-10T03:47:30.85458792+00:00"
          },
          "custom_id": {
            "type": "string"
          },
          "direction_id": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DirectionId"
              }
            ],
            "description": "Метод оплаты: sbp (СБП), card (карта), account (счёт). Обязательно передавайте для pay-in."
          },
          "expired_at": {
            "type": "string",
            "example": "2020-08-10T03:47:30.85458792+00:00"
          },
          "firstname": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "lastname": {
            "type": "string"
          },
          "requisite": {
            "type": "string"
          },
          "result_amount": {
            "type": "string",
            "example": "123.456"
          },
          "status": {
            "type": "string"
          },
          "synced": {
            "type": "boolean"
          }
        }
      },
      "GwIncomingSyncPayinRequest": {
        "type": "object",
        "properties": {
          "ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "GwIncomingSyncPayinResponse": {
        "type": "object"
      },
      "GwIncomingDeviceItem": {
        "type": "object",
        "required": [
          "d",
          "v"
        ],
        "properties": {
          "d": {
            "description": "Device, such as \"Windows, Linux, MacOS\" etc",
            "type": "string",
            "example": "Windows"
          },
          "v": {
            "type": "integer"
          }
        }
      },
      "GwIncomingPayinByDayItem": {
        "type": "object",
        "required": [
          "d",
          "h",
          "v"
        ],
        "properties": {
          "d": {
            "description": "Day of the entry. From 0 (monday) to 6 (sunday)",
            "type": "integer"
          },
          "h": {
            "description": "Hour of the entry. From 0 (00:00) to 23 (23:00)",
            "type": "integer"
          },
          "v": {
            "description": "Value of the entry",
            "type": "integer"
          }
        }
      },
      "GwIncomingPayinItem": {
        "type": "object",
        "required": [
          "t",
          "v"
        ],
        "properties": {
          "amount": {
            "type": "string"
          },
          "date": {
            "type": "string"
          },
          "day_total": {
            "type": "string"
          },
          "requisite_id": {
            "type": "string"
          },
          "successful_amount": {
            "type": "string"
          },
          "successful_deals": {
            "type": "integer"
          },
          "t": {
            "type": "integer"
          },
          "v": {
            "type": "integer"
          }
        }
      },
      "GwPayinsyncoptionsGetOptionsResponse": {
        "type": "object",
        "required": [
          "backoff_times",
          "callback_url",
          "id",
          "max_attempts",
          "payload",
          "updated_at"
        ],
        "properties": {
          "backoff_times": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "callback_url": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "max_attempts": {
            "type": "integer"
          },
          "payload": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "example": "2020-08-10T03:47:30.85458792+00:00"
          }
        }
      },
      "GwPayinsyncoptionsSendTestOptionsRequest": {
        "type": "object",
        "required": [
          "callback_url",
          "max_attempts",
          "payload"
        ],
        "properties": {
          "callback_url": {
            "type": "string"
          },
          "max_attempts": {
            "description": "BackoffTimes []string `json:\"backoff_times\" validate:\"required\"`",
            "type": "integer"
          },
          "payload": {
            "type": "string"
          }
        }
      },
      "GwPayinsyncoptionsSendTestOptionsResponse": {
        "type": "object"
      },
      "GwPayinsyncoptionsUpdateOptionsRequest": {
        "type": "object",
        "required": [
          "callback_url",
          "max_attempts",
          "payload"
        ],
        "properties": {
          "callback_url": {
            "type": "string"
          },
          "max_attempts": {
            "description": "BackoffTimes []string `json:\"backoff_times\" validate:\"required\"`",
            "type": "integer"
          },
          "payload": {
            "type": "string"
          }
        }
      },
      "GwPayinsyncoptionsUpdateOptionsResponse": {
        "type": "object",
        "required": [
          "backoff_times",
          "callback_url",
          "id",
          "max_attempts",
          "payload",
          "updated_at"
        ],
        "properties": {
          "backoff_times": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "callback_url": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "max_attempts": {
            "type": "integer"
          },
          "payload": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "example": "2020-08-10T03:47:30.85458792+00:00"
          }
        }
      },
      "GwPayinsyncoptionsValidateOptionsRequest": {
        "type": "object",
        "required": [
          "callback_url",
          "max_attempts",
          "payload"
        ],
        "properties": {
          "callback_url": {
            "type": "string"
          },
          "max_attempts": {
            "description": "BackoffTimes []string `json:\"backoff_times\" validate:\"required\"`",
            "type": "integer"
          },
          "payload": {
            "type": "string"
          }
        }
      },
      "GwPayinsyncoptionsValidateOptionsResponse": {
        "type": "object"
      },
      "GwOutgoingCreatePayoutRequest": {
        "type": "object",
        "required": [
          "amount",
          "direction_id",
          "merchant_reference_id",
          "requisite"
        ],
        "properties": {
          "amount": {
            "type": "string",
            "example": "123.456"
          },
          "custom_id": {
            "type": "string"
          },
          "direction_id": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DirectionId"
              }
            ],
            "description": "Метод оплаты: sbp (СБП), card (карта), account (счёт). Обязательно передавайте для pay-in."
          },
          "merchant_reference_id": {
            "type": "string"
          },
          "requisite": {
            "type": "string"
          }
        }
      },
      "GwOutgoingCreatePayoutResponse": {
        "type": "object",
        "required": [
          "amount",
          "created_at",
          "expired_at",
          "id",
          "requisite",
          "status",
          "synced",
          "usdt_sum"
        ],
        "properties": {
          "amount": {
            "type": "string",
            "example": "123.456"
          },
          "created_at": {
            "type": "string",
            "example": "2020-08-10T03:47:30.85458792+00:00"
          },
          "custom_id": {
            "type": "string"
          },
          "expired_at": {
            "type": "string",
            "example": "2020-08-10T03:47:30.85458792+00:00"
          },
          "id": {
            "type": "string"
          },
          "requisite": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "synced": {
            "type": "boolean"
          },
          "usdt_sum": {
            "type": "string"
          }
        }
      },
      "GwOutgoingGetPayoutByCustomResponse": {
        "type": "object",
        "required": [
          "amount",
          "created_at",
          "expired_at",
          "id",
          "requisite",
          "status",
          "synced",
          "usdt_sum"
        ],
        "properties": {
          "amount": {
            "type": "string",
            "example": "123.456"
          },
          "created_at": {
            "type": "string",
            "example": "2020-08-10T03:47:30.85458792+00:00"
          },
          "custom_id": {
            "type": "string"
          },
          "expired_at": {
            "type": "string",
            "example": "2020-08-10T03:47:30.85458792+00:00"
          },
          "id": {
            "type": "string"
          },
          "requisite": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "synced": {
            "type": "boolean"
          },
          "usdt_sum": {
            "type": "string"
          }
        }
      },
      "GwOutgoingGetPayoutResponse": {
        "type": "object",
        "required": [
          "amount",
          "created_at",
          "expired_at",
          "id",
          "requisite",
          "status",
          "synced",
          "usdt_sum"
        ],
        "properties": {
          "amount": {
            "type": "string",
            "example": "123.456"
          },
          "created_at": {
            "type": "string",
            "example": "2020-08-10T03:47:30.85458792+00:00"
          },
          "custom_id": {
            "type": "string"
          },
          "expired_at": {
            "type": "string",
            "example": "2020-08-10T03:47:30.85458792+00:00"
          },
          "id": {
            "type": "string"
          },
          "requisite": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "synced": {
            "type": "boolean"
          },
          "usdt_sum": {
            "type": "string"
          }
        }
      },
      "GwOutgoingPayoutDirectionView": {
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "GwOutgoingPayoutFormResponse": {
        "type": "object",
        "required": [
          "create_url",
          "fields"
        ],
        "properties": {
          "create_url": {
            "type": "string"
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GwFormField"
            }
          }
        }
      },
      "GwOutgoingQueryPayoutsResponse": {
        "type": "object",
        "required": [
          "results",
          "total"
        ],
        "properties": {
          "results": {
            "description": "Array of items",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GwOutgoingQueryPayoutsResponseItem"
            }
          },
          "total": {
            "description": "Total count",
            "type": "integer"
          }
        }
      },
      "GwOutgoingQueryPayoutsResponseItem": {
        "type": "object",
        "required": [
          "amount",
          "created_at",
          "expired_at",
          "id",
          "requisite",
          "status",
          "synced",
          "usdt_sum"
        ],
        "properties": {
          "amount": {
            "type": "string",
            "example": "123.456"
          },
          "created_at": {
            "type": "string",
            "example": "2020-08-10T03:47:30.85458792+00:00"
          },
          "custom_id": {
            "type": "string"
          },
          "direction": {
            "$ref": "#/components/schemas/GwOutgoingPayoutDirectionView"
          },
          "expired_at": {
            "type": "string",
            "example": "2020-08-10T03:47:30.85458792+00:00"
          },
          "id": {
            "type": "string"
          },
          "receipt_url": {
            "type": "string"
          },
          "requisite": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "synced": {
            "type": "boolean"
          },
          "usdt_sum": {
            "type": "string"
          }
        }
      },
      "GwOutgoingStopScamCallbackRequest": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "transaction_id": {
            "type": "string"
          },
          "verdict": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "expected": {},
                "got": {},
                "type": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "GwOutgoingStopScamCallbackResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          }
        }
      },
      "GwOutgoingSyncPayoutRequest": {
        "type": "object",
        "properties": {
          "ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "GwOutgoingSyncPayoutResponse": {
        "type": "object"
      },
      "GwPayoutsyncoptionsSendTestOptionsRequest": {
        "type": "object",
        "required": [
          "callback_url",
          "max_attempts",
          "payload"
        ],
        "properties": {
          "callback_url": {
            "type": "string"
          },
          "max_attempts": {
            "description": "BackoffTimes []string `json:\"backoff_times\" validate:\"required\"`",
            "type": "integer"
          },
          "payload": {
            "type": "string"
          }
        }
      },
      "GwPayoutsyncoptionsUpdateOptionsRequest": {
        "type": "object",
        "required": [
          "callback_url",
          "max_attempts",
          "payload"
        ],
        "properties": {
          "callback_url": {
            "type": "string"
          },
          "max_attempts": {
            "description": "BackoffTimes []string `json:\"backoff_times\" validate:\"required\"`",
            "type": "integer"
          },
          "payload": {
            "type": "string"
          }
        }
      },
      "GwPayoutsyncoptionsValidateOptionsRequest": {
        "type": "object",
        "required": [
          "callback_url",
          "max_attempts",
          "payload"
        ],
        "properties": {
          "callback_url": {
            "type": "string"
          },
          "max_attempts": {
            "description": "BackoffTimes []string `json:\"backoff_times\" validate:\"required\"`",
            "type": "integer"
          },
          "payload": {
            "type": "string"
          }
        }
      },
      "GwMerchantProfileResponse": {
        "type": "object",
        "required": [
          "id",
          "moderated",
          "name",
          "otp_active",
          "pay_in_percent",
          "pay_out_percent",
          "payin_form_url",
          "site"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "moderated": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "otp_active": {
            "type": "boolean"
          },
          "pay_in_percent": {
            "type": "string"
          },
          "pay_out_percent": {
            "type": "string"
          },
          "payin_form_url": {
            "type": "string"
          },
          "site": {
            "type": "string"
          }
        }
      },
      "GwMerchantRegisterRequest": {
        "type": "object",
        "required": [
          "login",
          "name",
          "password",
          "site"
        ],
        "properties": {
          "login": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "site": {
            "type": "string"
          }
        }
      },
      "GwMerchantRegisterResponse": {
        "type": "object",
        "required": [
          "access_token"
        ],
        "properties": {
          "access_token": {
            "type": "string"
          }
        }
      },
      "GwMerchantSetOTPRequest": {
        "type": "object",
        "required": [
          "code",
          "otp"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "otp": {
            "type": "string"
          }
        }
      },
      "GwMerchantSetOTPResponse": {
        "type": "object"
      },
      "GwMerchantSignInRequest": {
        "type": "object",
        "required": [
          "login",
          "password"
        ],
        "properties": {
          "login": {
            "type": "string"
          },
          "otp": {
            "type": "string"
          },
          "password": {
            "type": "string"
          }
        }
      },
      "GwMerchantSignInResponse": {
        "type": "object",
        "required": [
          "access_token"
        ],
        "properties": {
          "access_token": {
            "type": "string"
          }
        }
      },
      "GwSysIPListResponse": {
        "type": "object",
        "required": [
          "ips"
        ],
        "properties": {
          "ips": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "GwCashoutQueryWithdrawalResponseItem": {
        "type": "object",
        "required": [
          "amount",
          "balance_id",
          "created_at",
          "id",
          "status",
          "system_comment",
          "user_comment"
        ],
        "properties": {
          "amount": {
            "type": "string"
          },
          "balance_id": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "system_comment": {
            "type": "string"
          },
          "user_comment": {
            "type": "string"
          }
        }
      },
      "GwCashoutQueryWithdrawalsResponse": {
        "type": "object",
        "required": [
          "results",
          "total"
        ],
        "properties": {
          "results": {
            "description": "Array of items",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GwCashoutQueryWithdrawalResponseItem"
            }
          },
          "total": {
            "description": "Total count",
            "type": "integer"
          }
        }
      },
      "GwCashoutRequestWithdrawalRequest": {
        "type": "object",
        "required": [
          "amount",
          "balance_id",
          "comment",
          "otp"
        ],
        "properties": {
          "amount": {
            "type": "string"
          },
          "balance_id": {
            "type": "string"
          },
          "comment": {
            "type": "string"
          },
          "otp": {
            "type": "string"
          }
        }
      },
      "GwCashoutRequestWithdrawalResponse": {
        "type": "object",
        "required": [
          "amount",
          "id",
          "status"
        ],
        "properties": {
          "amount": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "CallbackEndpointConfig": {
        "type": "object",
        "properties": {
          "webhook_url": {
            "type": "string",
            "example": "https://your-shop.example/api/finlink/callbacks"
          }
        }
      },
      "DirectionId": {
        "type": "string",
        "description": "Метод сделки (direction_id). Совпадает с методами в кабинете мерчанта.",
        "enum": [
          "sbp",
          "card",
          "account"
        ],
        "example": "sbp"
      },
      "MerchantDirection": {
        "type": "object",
        "properties": {
          "direction_id": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DirectionId"
              }
            ],
            "description": "Метод оплаты: sbp (СБП), card (карта), account (счёт). Обязательно передавайте для pay-in."
          },
          "label": {
            "type": "string",
            "example": "СБП"
          },
          "description": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "pay_in_percent": {
            "type": "number",
            "example": 5
          },
          "pay_out_percent": {
            "type": "number",
            "example": 2
          }
        }
      }
    }
  }
}