openapi: 3.0.1
info:
  title: 'Nominal Accounts Overview (beneficiary-customer)'
  description: |
    ### Сервис предназначен для управления сделками (смарт-контрактами) при расчетах через номинальный счет с множеством бенефициаров по схеме "Бенефициар-заказчик".
    
    **Рекомендации по использованию API:**
    
    * При использовании методов в параметре **scope** ссылки авторизации пользователя должен быть указан сервис **nominal_accounts** для получения доступа к конкретному ресурсу
    * Действия, касающиеся одного и того же бенефициара - создание сделки (смарт-контракта), исполнение сделки (смарт-контракта) прерывание сделки (смарт-контракта) и вывод средств - выполняются на стороне Банка последовательно (под блокировкой). Рекомендуется со стороны площадки также отправлять запросы по одному бенефициару последовательно, дожидаясь ответа по предыдущему запросу. Неисполнение данной рекомендации может привести к ошибке с кодом 429 "Too many requests" и необходимости повторной отправки запроса
    * Бенефициар, в отношении которого выполняются операции по удалению, изменению информации, выводу средств, созданию сделки (смарт-контракта), исполнению сделки (смарт-контракта) или прерывание сделки (смарт-контракта), должен быть активным
    * В случае получения ответа с кодом 500 "SOWA Internal Error" необходимо переподписать content и повторить отправку запроса

    [Подробнее о сделках (смарт-контрактах)](/ru/sber-api/scenarios/transfers/nominal-accounts/overview)

    [Инструкция по получению токена в интерфейсе СББОЛ](/ru/sber-api/start/connect#poluchit-access-token)
    
    ### API URLs
    
    * Тестовый контур - https://iftfintech.testsbi.sberbank.ru:9443
    * Промышленный контур - https://fintech.sberbank.ru:9443
    
    [Правила получения доступа к API](/ru/sber-api/specifications/overview)
    
    [Скачать JSON-схемы](https://cdn-app.sberdevices.ru/misc/0.0.0/assets/bsm-docs/06deff79_nominal_accounts_overview_(beneficiary-customer).1.0.0.schemas.zip)
    
    [Таблица ошибок](/ru/sber-api/scenarios/transfers/nominal-accounts/table-errors)
    
  version: 1.0.0
servers:
  - url: https://iftfintech.testsbi.sberbank.ru:9443/v1/nominal-account
    description: Тестовый контур
  - url: https://fintech.sberbank.ru:9443/v1/nominal-account
    description: Промышленный контур
paths:
  '/signup':
    post:
      operationId: signup
      tags:
        - 'Активация API'
      summary: 'Активировать API'
      description: |
        Активация API для работы с сервисом "Nominal Accounts Overview (beneficiary-customer)"
        
        Разовый запрос, выполняемый для сопоставления clientId SberAPI с номинальным счетом
        
        Чтобы использовать метод, в параметре **scope** ссылки авторизации пользователя должен быть указан сервис **nominal_accounts** для получения доступа к этому ресурсу
      parameters:
        - $ref: '#/components/parameters/RqUID'
        - $ref: '#/components/parameters/Authorization'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - content
                - signature
              properties:
                content:
                  type: object
                  required:
                    - data
                    - agreement
                  properties:
                    data:
                      type: object
                      required:
                        - nominalAccountNumber
                      properties:
                        nominalAccountNumber:
                          $ref: '#/components/schemas/nominalAccountNumber'
                      additionalProperties: false
                      description: 'Данные'
                    agreement:
                      $ref: '#/components/schemas/agreement'
                  additionalProperties: false
                  description: 'Подписываемый payload'
                signature:
                  $ref: '#/components/schemas/signature'
              additionalProperties: false
              description: 'Запрос онбординга системы партнера, содержащий номер номинального счета'
        required: true  
      responses:
        '201':
          content:
            application/json:
              schema:
                type: object
                properties:
                  nominalAccountId:
                    $ref: '#/components/schemas/id'
                additionalProperties: false
                description: 'успешный ответ'
          description: Created
        '400':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIBadRequest'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'        
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIUnauthorized'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIForbidden'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Not Found
        '405':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Method Not Allowed
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIUnprocessableEntity'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'       
          description: Unprocessable Entity  
        '429':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPITooManyRequests'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIInternalServerError'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Internal Server Error
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIBadGateway'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Bad Gateway
        '503':
          description: Service Unavailable
        '504':
          description: Gateway Timeout
  '/transactions/incomes':
    get:
      operationId: cashFlowEventsIncomesByIdNominalAccounts
      tags:
        - Методы работы с платежами
      summary: 'Запросить операции зачисления'
      description: |
        Метод возвращает список операций зачисления по номинальному счету, начиная с дня Х на заданную глубину (за исключением операций возврата). Для получения списка операций возврата по номинальному счету необходимо воспользоваться методом **GET/transactions/refunds**
      
        Чтобы использовать метод, в параметре **scope** ссылки авторизации пользователя должен быть указан сервис **nominal_accounts** для получения доступа к этому ресурсу 
      
        В случае открытия клиентом нескольких номинальных счетов заголовок **nominalAccountId** является обяательным к заполнению
      
        Значения параметров **startDate** и **endDate** фильтруют события зачисления по дате создания транзакции
      
        Значение параметра **pageNumber** в запросе позволит отобразить в ответе необходимую страницу с данными 
       
        Значение параметра **pageSize** в запросе позволит отобразить в ответе необходимое количество записей на странице
      parameters:
        - $ref: '#/components/parameters/RqUID'
        - $ref: '#/components/parameters/Authorization'  
        - $ref: '#/components/parameters/nominalAccountId' 
        - $ref: '#/components/parameters/pageNumber' 
        - $ref: '#/components/parameters/pageSize' 
        - name: startDate
          in: query
          description: 'Дата начала диапазона поиска событий зачисления по дате создания (включительно) (передавать в UTC)'
          required: false
          schema:
            type: string
            format: date-time
            example: '2025-03-15T23:31:00.999Z'  
        - name: endDate
          in: query
          description: 'Дата окончания диапазона поиска событий зачисления по дате создания (включительно) (передавать в UTC)'
          required: false
          schema:
            type: string
            format: date-time
            example: '2025-03-15T23:31:00.999Z'  
      responses:
        '200':
          headers:
            page-number:
              schema:
                type: number
                minimum: 0
              description: 'Порядковый номер страницы событий'
              example: 0
            page-size:
              schema:
                type: number
                minimum: 1
                maximum: 100
              description: 'Количество элементов событий'
              example: 20
            total-elements:
              schema:
                type: number
                minimum: 0
              description: Общее количество элементов списка
              example: 2086  
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/transactionsFlowResp'
          description: OK  
        '400':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIBadRequest'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'        
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIUnauthorized'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIForbidden'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Not Found
        '405':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Method Not Allowed
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIUnprocessableEntity'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Unprocessable Entity  
        '429':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPITooManyRequests'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIInternalServerError'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'       
          description: Internal Server Error
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIBadGateway'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Bad Gateway
        '503':
          description: Service Unavailable
        '504':
          description: Gateway Timeout    
  #'/transactions/expenses':
  #  get:
  #    operationId: cashFlowEventsExpensesByIdNominalAccounts
  #    tags:
  #      - Методы для запроса информации по номинальному счету
  #    summary: 'Запросить список операций списания по номинальному счету за определенный промежуток времени'
  #    description: 'Метод возвращает список операций списания по номинальному счету, начиная с дня Х на заданную глубину <br></br> Чтобы использовать метод, в параметре **scope** ссылки авторизации пользователя должен быть указан сервис **nominal_accounts** для получения доступа к этому ресурсу <br></br>В случае открытия клиентом нескольких номинальных счетов заголовок **nominalAccountId** является обяательным к заполнению<br></br> Значения параметров **startDate** и **endDate** фильтруют события списания по дате создания транзакции<br></br>Значение параметра **pageNumber** в запросе позволит отобразить в ответе необходимую страницу с данными <br></br>Значение параметра **pageSize** в запросе позволит отобразить в ответе необходимое количество записей на странице <br></br>Значение параметра **filterStatus** в запросе позволит отфильтровать события списания по статусу'
    #  parameters:
    #    - $ref: '#/components/parameters/RqUID'
    #    - $ref: '#/components/parameters/Authorization'  
    #    - $ref: '#/components/parameters/nominalAccountId' 
    #    - $ref: '#/components/parameters/pageNumber' 
    #    - $ref: '#/components/parameters/pageSize' 
    #    - name: startDate
    #      in: query
    #      description: 'Дата начала диапазона поиска событий зачисления по дате создания (включительно) (передавать в UTC)'
    #      required: false
    #      schema:
    #        type: string
    #        format: date-time
    #        example: '2025-03-15T23:31:00.999Z'  
    #    - name: endDate
    #      in: query
    #      description: 'Дата окончания диапазона поиска событий зачисления по дате создания (включительно) (передавать в UTC)'
    #      required: false
    #      schema:
    #        type: string
    #        format: date-time
    #        example: '2025-03-15T23:31:00.999Z'  
    #    - name: filterStatus
    #      in: query
    #      description: 'Отфильтровать операции по статусу (ALL - все операции, DONE - успешно исполненные операции списания, ERROR - операции списания в ошибке, FINISHED - операции списания в конечном статусе, NOT_FINISHED - операции списания не в конечном статусе)'
    #      required: false
    #      schema:
    #        type: string
    #        default: ALL
    #        enum:
    #          - DONE
    #          - ERROR
    #          - FINISHED
    #          - NOT_FINISHED 
    #          - ALL
    #        example: 'DONE'
    #  responses:
    #    '200':
    #      headers:
    #        page-number:
    #          schema:
    #            type: number
    #            minimum: 0
    #          description: 'Порядковый номер страницы событий'
    #          example: 0
    #        page-size:
    #          schema:
    #            type: number
    #            minimum: 1
    #            maximum: 100
    #          description: 'Количество элементов событий'
    #          example: 20
    #        total-elements:
    #          schema:
    #            type: number
    #            minimum: 0
    #          description: Общее количество элементов списка
    #          example: 2086  
    #      content:
    #        application/json:
    #          schema:
    #            $ref: '#/components/schemas/transactionsFlowExpResp'
    #      description: OK  
    #    '400':
    #      content:
    #        application/json:
    #          schema:
    #            oneOf:
    #              - $ref: '#/components/schemas/error'
    #              - $ref: '#/components/schemas/errorSberBusinessAPIBadRequest'
    #      headers:
    #        X-Request-Id:
    #          $ref: '#/components/headers/XRequestId'        
    #      description: Bad Request
    #    '401':
    #      content:
    #        application/json:
    #          schema:
    #            oneOf:
    #              - $ref: '#/components/schemas/error'
    #              - $ref: '#/components/schemas/errorSberBusinessAPIUnauthorized'
    #      headers:
    #        X-Request-Id:
    #          $ref: '#/components/headers/XRequestId' 
    #      description: Unauthorized
    #    '403':
    #      content:
    #        application/json:
    #          schema:
    #            oneOf:
    #              - $ref: '#/components/schemas/error'
    #              - $ref: '#/components/schemas/errorSberBusinessAPIForbidden'
    #      headers:
    #        X-Request-Id:
    #          $ref: '#/components/headers/XRequestId' 
    #      description: Forbidden
    #    '404':
    #      content:
    #        application/json:
    #          schema:
    #            $ref: '#/components/schemas/error'
    #      description: Not Found
    #    '405':
    #      content:
    #        application/json:
    #          schema:
    #            $ref: '#/components/schemas/error'
    #      description: Method Not Allowed
    #    '422':
    #      content:
    #        application/json:
    #          schema:
    #            $ref: '#/components/schemas/errorSberBusinessAPIUnprocessableEntity'
    #      headers:
    #        X-Request-Id:
    #          $ref: '#/components/headers/XRequestId'      
    #      description: Unprocessable Entity  
    #    '429':
    #      content:
    #        application/json:
    #          schema:
    #            oneOf:
    #              - $ref: '#/components/schemas/error'
    #              - $ref: '#/components/schemas/errorSberBusinessAPITooManyRequests'
    #      headers:
    #        X-Request-Id:
    #          $ref: '#/components/headers/XRequestId'      
    #      description: Too Many Requests
    #    '500':
    #      content:
    #        application/json:
    #          schema:
    #            oneOf:
    #             - $ref: '#/components/schemas/error'
    #              - $ref: '#/components/schemas/errorSberBusinessAPIInternalServerError'
    #      headers:
    #        X-Request-Id:
    #          $ref: '#/components/headers/XRequestId'       
    #      description: Internal Server Error
    #    '502':
    #      content:
    #        application/json:
    #          schema:
    #            $ref: '#/components/schemas/errorSberBusinessAPIBadGateway'
    #      headers:
    #        X-Request-Id:
    #          $ref: '#/components/headers/XRequestId' 
    #      description: Bad Gateway
    #    '503':
    #      description: Service Unavailable
    #    '504':
    #      description: Gateway Timeout  
  '/transactions/{id}':
    get:
      operationId: cashFlowEvent
      tags:
        - Методы работы с платежами
      summary: 'Запросить детали операции'
      description: |
      
        Метод возвращает детали операции по ее **id** 
        
        Чтобы использовать метод, в параметре **scope** ссылки авторизации пользователя должен быть указан сервис **nominal_accounts** для получения доступа к этому ресурсу 
        
        В случае открытия клиентом нескольких номинальных счетов заголовок **nominalAccountId** является обяательным к заполнению
      parameters:
        - $ref: '#/components/parameters/RqUID'
        - $ref: '#/components/parameters/Authorization'  
        - $ref: '#/components/parameters/nominalAccountId'    
        - name: id
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/id'     
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/transactionResp'
          description: OK  
        '400':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIBadRequest'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'         
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIUnauthorized'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIForbidden'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Not Found
        '405':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Method Not Allowed
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIUnprocessableEntity'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Unprocessable Entity  
        '429':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPITooManyRequests'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'       
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIInternalServerError'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Internal Server Error
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIBadGateway'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Bad Gateway
        '503':
          description: Service Unavailable
        '504':
          description: Gateway Timeout   
  '/transactions/refunds':
    get:
      operationId: getBeneficiaryRefunds
      tags:
        - 'Методы работы с платежами'
      summary: 'Запросить список возвратов'
      description: |
        Метод возвращает список событий по зачислению средств на номинальный счет со счетов невыясненных сумм (возврат средств на номинальный счет по факту отказа в зачислении в **сторонних банках**)
        
        Чтобы использовать метод, в параметре **scope** ссылки авторизации пользователя должен быть указан сервис **nominal_accounts** для получения доступа к этому ресурсу 
        
        В случае открытия клиентом нескольких номинальных счетов заголовок **nominalAccountId** является обяательным к заполнению  
        
        Транзакция возврата не связана с первоначальной проведенной транзакцией дебета, и никак не повлияет на статус исполненной первоначальной транзакции, статус сделки (смарт-контракта) и иные исполненные транзакции в рамках сделки (смарт-контракта) (для банка она будет восприниматься, как транзакция кредита в пользу бенефициара). Сопоставить перваначальную транзакцию с транзакцией возврата можно с помощью идентификаторов **primaryTransactionId** и **refundTransactionId** из ответа 
        
        Сортировка в запросе выполняется по createDate (дата создания возврата). Параметр  **sortMethode = asc** в запросе, сортировка ответа будет от меньшего значения даты к большему, значение **sortMethod = desc** - от большего к меньшему. По умолчанию значение параметра  **sortMethod = asc** 
        
        Значение параметра **startDate** и **endDate** в запросе позволит осуществить поиск событий возврата за указанный период (включая дату начала и дату окончания)
        
        Значение параметра **pageNumber** в запросе позволит отобразить в ответе необходимую страницу с данными
        
        Значение параметра **pageSize** в запросе позволит отобразить в ответе необходимое количество записей на странице 
        
        Значение параметра **beneficiaryId** в запросе позволит выполнить запрос по одному бенефициару
      parameters:
        - $ref: '#/components/parameters/RqUID'
        - $ref: '#/components/parameters/Authorization'  
        - $ref: '#/components/parameters/nominalAccountId'      
        - $ref: '#/components/parameters/pageNumber' 
        - $ref: '#/components/parameters/pageSize' 
        - name: startDate
          in: query
          description: 'Дата начала диапазона поиска событий возврата по дате создания возврата (включительно) (передавать в UTC)'
          required: false
          schema:
            type: string
            format: date-time
            example: '2025-03-15T23:31:00.999Z'  
        - name: endDate
          in: query
          description: 'Дата окончания диапазона поиска событий возврата по дате создания возврата (включительно) (передавать в UTC)'
          required: false
          schema:
            type: string
            format: date-time
            example: '2025-03-15T23:31:00.999Z'  
      responses:
        '200':
          headers:
            page-number:
              schema:
                type: number
                minimum: 0
              description: 'Порядковый номер страницы событий возврата'
              example: 0
            page-size:
              schema:
                type: number
                minimum: 1
                maximum: 100
              description: 'Количество элементов событий возврата'
              example: 20
            total-elements:
              schema:
                type: number
                minimum: 0
              description: Общее количество элементов списка возвратов
              example: 2086
          content:
            application/json:
              schema:
                type: object
                description: 'Список событий возврата'
                properties:
                  refundEvents:
                    $ref: '#/components/schemas/refundEvents'
                additionalProperties: false    
          description: OK
        '400':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIBadRequest'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'        
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIUnauthorized'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIForbidden'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Not Found
        '405':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Method Not Allowed
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIUnprocessableEntity'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'       
          description: Unprocessable Entity  
        '429':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPITooManyRequests'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'       
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIInternalServerError'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'       
          description: Internal Server Error
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIBadGateway'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Bad Gateway
        '503':
          description: Service Unavailable
        '504':
          description: Gateway Timeout   
  '/transactions/undefined':
    get:
      summary: 'Запросить список нераспределенных пополнений'
      description: |
      
       Метод возвращает список нераспределенных/частично распределенных операций пополнения номинального счета, совершенных через эквайринг (сортировка  данных выполняется по возрастанию даты создания (createDate)
       
       Чтобы использовать метод, в параметре **scope** ссылки авторизации пользователя должен быть указан сервис **nominal_accounts** для получения доступа к этому ресурсу 
       
       В случае открытия клиентом нескольких номинальных счетов заголовок **nominalAccountId** является обяательным к заполнению 
       
       Значение **amountUndefined** из ответа уменьшается на сумму разнесения после успешного вызова метода **POST/transactions/undefined/{id}/identify** в рамках конкретного нераспределенного пополнения
       
       Чтобы связать неразнесенное пополнение с конкретным заказом, необходимо сравнить два параметра: **paymentNumber** (из отчета эквайринга) — ответ на запрос **GET/ecom/report** и **docNumber** (из списка неразнесенных пополнений) — ответ на запрос **GET /transactions/undefined**. Если значения совпадают — транзакция из отчета относится к данному неразнесенному пополнению
      operationId: getUndefinedTransactions
      tags:
        - 'Методы работы с платежами'
      parameters:
        - $ref: '#/components/parameters/RqUID'
        - $ref: '#/components/parameters/Authorization'
        - $ref: '#/components/parameters/nominalAccountId'
        - $ref: '#/components/parameters/pageNumber'
        - $ref: '#/components/parameters/pageSize'
      responses:
        '200':
          description: 'OK'
          headers:
            page-number:
              schema:
                type: number
                minimum: 0
              description: 'Порядковый номер страницы операций пополнения номинального счета через эквайринг'
              example: 0
            page-size:
              schema:
                type: number
                minimum: 1
                maximum: 100
              description: 'Количество элементов операций пополнения номинального счета через эквайринг'
              example: 20
            total-elements:
              schema:
                type: number
                minimum: 0
              description: 'Общее количество элементов операций пополнения номинального счета через эквайринг'
              example: 2086
          content:
            application/json:
              schema:
                type: object
                description: 'Список операций пополнения номинального счета через эквайринг'
                required: 
                  - transactionsUndefined
                properties:
                  transactionsUndefined:
                    $ref: '#/components/schemas/transactionsUndefined'
                additionalProperties: false
        '400':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIBadRequest'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'        
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIUnauthorized'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIForbidden'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Not Found
        '405':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Method Not Allowed
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIUnprocessableEntity'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Unprocessable Entity  
        '429':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPITooManyRequests'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIInternalServerError'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Internal Server Error
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIBadGateway'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Bad Gateway
        '503':
          description: Service Unavailable
        '504':
          description: Gateway Timeout    
  '/transactions/undefined/{id}/identify':
    post:
      operationId: identifyTransactions
      tags: 
        - Методы работы с платежами
      description: |
      
       Метод предоставляет инструмент для распределения средств, поступивших на номинальный счет через систему эквайринга, на **бенефициаров**
       
       Чтобы использовать метод, в параметре **scope** ссылки авторизации пользователя должен быть указан сервис **nominal_accounts** для получения доступа к этому ресурсу 
       
       В случае открытия клиентом нескольких номинальных счетов заголовок **nominalAccountId** является обяательным к заполнению  
       
       Сумма всех транзакций в запросе должа быть меньше или равна сумме  нераспределенной операции пополнения
       
       Значение path-параметра **id** в запросе - это **undefinedTransactionId** из запроса **GET/transactions/undefined**
       
       Значение атрибута **transactionId** должно быть уникально относительно ранее созданных транзакций
       
       Значение атрибута **amount** в запросе должно быть больше **0**
       
       Бенефициар, в рамках которого выполняется разнесение, должен быть активен (в статусе **"ACTIVATED"**)
       
       Ответ на запрос **201 Created** подтверждает, что запрос прошел предварительные проверки (активность бенефициара, корректность суммы и т.д.) и принят в асинхронную обработку, но финальный статус требует проверки через вызов метода **GET /transactions/{id}**
      summary: 'Разнести нераспределенные пополнения'
      parameters:
        - $ref: '#/components/parameters/RqUID'
        - $ref: '#/components/parameters/Authorization'
        - $ref: '#/components/parameters/nominalAccountId'
        - name: id
          required: true
          in: path
          description: 'Идентификатор операции пополнения номинального счета через эквайринг'
          schema:
            $ref: '#/components/schemas/id'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: Структура тела запроса на разнесение
              required:
                - content
                - signature
              properties:
                content:
                  type: object
                  required:
                    - data
                    - agreement
                  properties:
                    data:
                      $ref: '#/components/schemas/transactionsIdentify'
                    agreement:
                      $ref: '#/components/schemas/agreement'
                  additionalProperties: false  
                  description: 'Подписываемый контент'
                signature:
                  $ref: '#/components/schemas/signature'
              additionalProperties: false 

      responses:
        '201':      
          description: 'Created'
        '400':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIBadRequest'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'        
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIUnauthorized'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIForbidden'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Not Found
        '405':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Method Not Allowed
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIUnprocessableEntity'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Unprocessable Entity  
        '429':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPITooManyRequests'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIInternalServerError'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Internal Server Error
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIBadGateway'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Bad Gateway
        '503':
          description: Service Unavailable
        '504':
          description: Gateway Timeout           
        
          
  '/beneficiaries/create':
    post:
      operationId: addBeneficiarylite
      tags:
        - Методы работы с бенефициарами
      summary: 'Создать бенефициара'
      description: |
        Запрос отправляет анкету бенефициара для добавления в реестр бенефициаров номинального счета
        
        Чтобы использовать метод, в параметре **scope** ссылки авторизации пользователя должен быть указан сервис **nominal_accounts** для получения доступа к этому ресурсу 
        
        В случае открытия клиентом нескольких номинальных счетов заголовок **nominalAccountId** является обяательным к заполнению 
        
        После успешного вызова метода **POST /beneficiaries/create** бенефициар будет переведен в статус **ACTIVATED** асинхронно. Процесс активации бенефициара занимает в среднем от 5 до 15 минут
        
        Значение атрибута **beneficiaryId** в запросе должно быть уникально относительно **beneficiaryId** ранее созданных бенефициаров 
        
        Схема блока **data** должна соответствовать типу бенефициара (**beneficiaryType**) 
        
        БИК банка счета бенефициара в запросе (**account.bankBIC**) должен соответствовать номеру счета бенефициара в запросе (**account.accountNumber**). Подробности правил соответствия по [ссылке](https://normativ.kontur.ru/document?moduleId=1&documentId=24444&ysclid=m3ygncn8z6925372348) 
        
        Значение ИНН бенефициара (**inn**) в запросе должно быть уникально относительно ранее созданных бенефициаров 
        
        Владелец номинального счета не может стать его бенефициаром
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - content
                - signature
              description: Структура тела ответа на запрос создания бенефициара
              properties:
                content:
                  type: object
                  required:
                    - data
                    - agreement
                  properties:
                    data:
                      oneOf:
                        - $ref: '#/components/schemas/beneficiaryIndividualliteNonResident'
                        - $ref: '#/components/schemas/beneficiaryIndividuallite'
                        - $ref: '#/components/schemas/beneficiaryOrglite'
                        - $ref: '#/components/schemas/beneficiaryIndividualEntrepreneurlite'
                    agreement:
                      $ref: '#/components/schemas/agreement'
                  additionalProperties: false
                  description: 'Подписываемый контент'
                signature:
                  $ref: '#/components/schemas/signature'
              additionalProperties: false
        required: true
      parameters:
        - $ref: '#/components/parameters/RqUID'
        - $ref: '#/components/parameters/Authorization'  
        - $ref: '#/components/parameters/nominalAccountId'      
      responses:
        '201':
          content:
            application/json:
              schema:
                type: object
                description: 'ID бенефициара в реестре'
                properties:
                  beneficiaryId:
                      $ref: '#/components/schemas/id'
                additionalProperties: false
          description: Created
        '400':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIBadRequest'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'        
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIUnauthorized'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIForbidden'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Not Found
        '405':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Method Not Allowed
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIUnprocessableEntity'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Unprocessable Entity  
        '429':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPITooManyRequests'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIInternalServerError'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Internal Server Error
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIBadGateway'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Bad Gateway
        '503':
          description: Service Unavailable
        '504':
          description: Gateway Timeout
  '/beneficiaries/delete':
    post:
      operationId: deleteBeneficiary
      tags:
        - Методы работы с бенефициарами
      summary: 'Удалить бенефициара'
      description: |
      
       Запрос отправляет id бенефициара для удаления из реестра бенефициаров номинального счета 
       
       Чтобы использовать метод, в параметре **scope** ссылки авторизации пользователя должен быть указан сервис **nominal_accounts** для получения доступа к этому ресурсу
       
       В случае открытия клиентом нескольких номинальных счетов заголовок **nominalAccountId** является обяательным к заполнению
       
       Перед вызовом метода необходимо проверить, что у бенефициара закрыты все сделки (смарт-контракта)и выведены денежные средства 
       
       Бенефициар, в отношении которого выполняется удаление, должен быть активным
      parameters:
        - $ref: '#/components/parameters/RqUID'
        - $ref: '#/components/parameters/Authorization'  
        - $ref: '#/components/parameters/nominalAccountId'    
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - content
                - signature
              description: Структура тела ответа на запрос создания бенефициара
              properties:
                content:
                  type: object
                  required:
                    - data
                    - agreement
                  properties:
                    data:
                      type: object
                      properties:
                        beneficiaryId:
                            $ref: '#/components/schemas/id'
                    agreement:
                      $ref: '#/components/schemas/agreement'
                  additionalProperties: false
                  description: 'Подписываемый контент'
                signature:
                  $ref: '#/components/schemas/signature'
              additionalProperties: false
        required: true      
      responses:
        '200':
          description: OK
        '400':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIBadRequest'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'         
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIUnauthorized'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIForbidden'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Not Found
        '405':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Method Not Allowed
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIUnprocessableEntity'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'       
          description: Unprocessable Entity  
        '429':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPITooManyRequests'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'       
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIInternalServerError'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'       
          description: Internal Server Error
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIBadGateway'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Bad Gateway
        '503':
          description: Service Unavailable
        '504':
          description: Gateway Timeout
  '/beneficiaries/update':
    post:
      operationId: updateBeneficiary
      tags:
        - Методы работы с бенефициарами
      summary: 'Изменить информацию по бенефициару'
      description: |
       Запрос отправляет информацию по бенефициару для изменения в реестре бенефициаров номинального счетаЗапрос отправляет id бенефициара для изменения информации по бенефициару:номер телефона, e-mail, реквизиты счета  
       
       Чтобы использовать метод, в параметре **scope** ссылки авторизации пользователя должен быть указан сервис **nominal_accounts** для получения доступа к этому ресурсу 
       
       В случае открытия клиентом нескольких номинальных счетов заголовок **nominalAccountId** является обяательным к заполнению  
       
       БИК банка счета бенефициара в запросе (**account.bankBIC**) должен соответствовать номеру счета бенефициара в запросе (**account.accountNumber**). Подробности правил соответствия по [ссылке](https://normativ.kontur.ru/document?moduleId=1&documentId=24444&ysclid=m3ygncn8z6925372348) 
       
       Бенефициар, в отношении которого выполняется изменение информации, должен быть активным 
       
       В случае обновления блока **account** предыдущие реквизиты бенефициара для вывода средств будут удалены
      parameters:
        - $ref: '#/components/parameters/RqUID'
        - $ref: '#/components/parameters/Authorization'  
        - $ref: '#/components/parameters/nominalAccountId'      
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - content
                - signature
              description: Структура тела ответа на запрос создания бенефициара
              properties:
                content:
                  type: object
                  required:
                    - data
                    - agreement
                  properties:
                    data:
                      type: object
                      required:
                        - beneficiaryId
                      properties:
                        beneficiaryId:
                            $ref: '#/components/schemas/id'
                        phone:
                          $ref: '#/components/schemas/phone'
                        email:
                          $ref: '#/components/schemas/email'
                        orgName:
                          $ref: '#/components/schemas/orgShortNameRu'
                        account:
                          oneOf:
                            - $ref: '#/components/schemas/accountProfile'
                            - $ref: '#/components/schemas/sbpRequisites'  
                        #beneficiaryType:
                          #$ref: '#/components/schemas/beneficiaryType'
                        #identificationDoc:
                          #$ref: "#/components/schemas/identificationDocUpdate"  
                        #surname:
                          #$ref: '#/components/schemas/surname'
                        #name: 
                          #$ref: '#/components/schemas/name'
                        #patronymic:
                          #$ref: '#/components/schemas/patronymic'
                    agreement:
                      $ref: '#/components/schemas/agreement'
                  additionalProperties: false
                  description: 'Подписываемый контент'
                signature:
                  $ref: '#/components/schemas/signature'
              additionalProperties: false
        required: true      
      responses:
        '200':
          description: OK
        '400':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIBadRequest'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'        
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIUnauthorized'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIForbidden'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Not Found
        '405':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Method Not Allowed
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIUnprocessableEntity'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'       
          description: Unprocessable Entity  
        '429':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPITooManyRequests'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'     
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIInternalServerError'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Internal Server Error
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIBadGateway'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Bad Gateway
        '503':
          description: Service Unavailable
        '504':
          description: Gateway Timeout
  '/beneficiaries/registry':
    get:
      operationId: getBeneficiariesRegistry
      tags:
        - 'Методы работы с бенефициарами'
      summary: 'Запросить реестр бенефициаров'
      description: |
      
        В ответ на запрос возвращается список бенефициаров в статусах **ACTIVATED**. Список можно пролистать постранично. Каждая страница может содержать до 40 элементов списка
      
        Чтобы использовать метод, в параметре **scope** ссылки авторизации пользователя должен быть указан сервис **nominal_accounts** для получения доступа к этому ресурсу
        
        В случае открытия клиентом нескольких номинальных счетов заголовок **nominalAccountId** является обяательным к заполнению 
      parameters:
        - $ref: '#/components/parameters/RqUID'
        - $ref: '#/components/parameters/Authorization'  
        - $ref: '#/components/parameters/nominalAccountId'     
        - $ref: '#/components/parameters/pageNumber' 
        - name: pageSize
          in: query
          required: false
          schema:
            type: number
            minimum: 1
            maximum: 40
            default: 40
            description: 'Количество элементов реестра бенефициаров на одной странице'
            example: 40
      responses:
        '200':
          headers:
            page-number:
              schema:
                type: number
                minimum: 0
                #maximum: 10000
              description: 'Порядковый номер страницы реестра бенефициаров'
              example: 0
            page-size:
              schema:
                type: number
                minimum: 1
                maximum: 40
              description: 'Количество элементов реестра бенефициаров на одной странице'
              example: 40
            total-elements:
              schema:
                type: number
                minimum: 0
                #maximum: 10000
              description: 'Общее количество элементов реестра бенефициаров'
              example: 2086
            updated:
              schema:
                type: string
                format: date-time
              description: 'Время обновления списка'
              example: '2022-03-15T23:31:00.999Z'
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    beneficiaryId:
                        $ref: '#/components/schemas/id'
                    status:
                      type: string
                      pattern: '^[A-Za-z]{1,20}$'
                      description: | 
                        Статус бенефициара принимает одно из значений: 
                          CREATED (Создан), 
                          ACTIVATED (Активирован), 
                          TOCLOSE (Помечен к закрытию), 
                          DELETED (Исключен из реестра), 
                          BLOCKED (Заблокирован со стороны банка), 
                          ERROR (Ошибка)
                      example: 'ACTIVATED'
                    subject:
                      $ref: '#/components/schemas/subjectBeneficiary'
                    contractNumber:
                      type: string
                      pattern: '^[А-ЯЁа-яёA-Za-z\d\/\-\_]+$'
                      maxLength: 100
                      description: 'Номер договора-основания'
                      example: 'ДКП02-01/2022' 
                    contractDate:
                      $ref: '#/components/schemas/contractDate'
                  additionalProperties: false
                  description: 'Бенефициар'
                maxItems: 40
          description: OK
        '400':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIBadRequest'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'        
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIUnauthorized'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIForbidden'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Not Found
        '405':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Method Not Allowed
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIUnprocessableEntity'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'       
          description: Unprocessable Entity  
        '429':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPITooManyRequests'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIInternalServerError'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Internal Server Error
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIBadGateway'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Bad Gateway
        '503':
          description: Service Unavailable
        '504':
          description: Gateway Timeout
  '/beneficiaries/details/{id}':
    get:
      operationId: getBeneficiaryDetailsById
      tags:
        - 'Методы работы с бенефициарами'
      summary: 'Запросить сведения о бенефициарe'
      description: | 
        Возвращает текущий статус и реквизиты бенефициара, хранимые в реестре 
        
        Чтобы использовать метод, в параметре **scope** ссылки авторизации пользователя должен быть указан сервис **nominal_accounts** для получения доступа к этому ресурсу 

        События по бенефициару: 
          - включить бенефициара в реестр; 
          - изменить информацию по бенефициару; 
          - удалить бенефициара из реестра; 
          - заблокировать/разблокировать бенефициара (события, инициируемые банком);
      
      parameters:
        - $ref: '#/components/parameters/RqUID'
        - $ref: '#/components/parameters/Authorization'  
        - name: id
          in: path
          required: true
          schema:
              $ref: '#/components/schemas/id'
        - $ref: '#/components/parameters/pageNumber' 
        - name: pageSize
          in: query
          required: false
          schema:
            type: number
            minimum: 1
            maximum: 40
            default: 40
            description: 'Количество элементов событий бенефициара на одной странице'
            example: 40
      responses:
        '200':
          headers:
            page-number:
              schema:
                type: number
                minimum: 0
                #maximum: 10000
              description: 'Порядковый номер страницы событий бенефициара'
              example: 0
            page-size:
              schema:
                type: number
                minimum: 1
                maximum: 40
              description: 'Количество элементов событий бенефициара на одной странице'
              example: 40
            total-elements:
              schema:
                type: number
                minimum: 0
                #maximum: 10000
              description: 'Общее количество элементов событий бенефициара'
              example: 2086
            updated:
              schema:
                type: string
                format: date-time
              description: 'Время обновления списка'
              example: '2022-03-15T23:31:00.999Z'
          content:
            application/json:
              schema:
                type: object
                properties:
                  beneficiaryId:
                      $ref: '#/components/schemas/id'
                  status:
                    type: string
                    pattern: '^[A-Za-z]{1,20}$'
                    description: 'Статус бенефициара принимает одно из значений: CREATED (Создан), ACTIVATED (Активирован), TOCLOSE (Помечен к закрытию), DELETED (Исключен из реестра), BLOCKED (Заблокирован со стороны банка), ERROR (Ошибка)'
                    example: 'ACTIVATED'
                  subject:
                    $ref: '#/components/schemas/subjectBeneficiary'
                  contractNumber:
                      type: string
                      pattern: '^[А-ЯЁа-яёA-Za-z\d\/\-\_]+$'
                      maxLength: 100
                      description: 'Номер договора-основания'
                      example: 'ДКП02-01/2022' 
                  contractDate:
                    $ref: '#/components/schemas/contractDate'
                  events:
                    type: array
                    items:
                      $ref: '#/components/schemas/beneficiaryEvent'
                    maxItems: 40
                    description: 'События по бенефициару и их статусы'
                additionalProperties: false
                description: 'Данные бенефициара'
          description: OK
        '400':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIBadRequest'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'        
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIUnauthorized'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIForbidden'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Not Found
        '405':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Method Not Allowed
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIUnprocessableEntity'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Unprocessable Entity  
        '429':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPITooManyRequests'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIInternalServerError'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Internal Server Error
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIBadGateway'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Bad Gateway
        '503':
          description: Service Unavailable
        '504':
          description: Gateway Timeout
  '/beneficiaries/state/{id}':
    get:
      operationId: getBeneficiaryStateById
      tags:
        - 'Методы работы с бенефициарами'
      summary: 'Запросить состояние бенефициара'
      description: | 
        Метод возвращает детализированный баланс, список сделок (смарт-контрактов) и список событий, связанных с балансом бенефициара. Списки можно пролистать постранично
        
        Чтобы использовать метод, в параметре **scope** ссылки авторизации пользователя должен быть указан сервис **nominal_accounts** для получения доступа к этому ресурсу 
        
        Сочетания типа события (eventType) и статуса события (eventValue): 
          - CREDIT (Транзакция на пополнение, инициирована банком) - CREATED (Создан), PENDING (В процессе обработки), DONE (Исполнен) 
          - DEBIT (Транзакция на списание с ном.счета: оплата СК, вывод средств, оплата комиссии ) - CREATED (Создан), PENDING (В процессе обработки), DONE (Исполнен) 
          - HOLD (Создать сделку (смарт-контракт)) - CREATED (Создан), DONE (Исполнен) 
          - UNHOLD Прервать сделку (смарт-контракт)) - CREATED (Создан), DONE (Исполнен)
      parameters:
        - $ref: '#/components/parameters/RqUID'
        - $ref: '#/components/parameters/Authorization'   
        - name: id
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/id'
        - name: eventsPageNumber
          in: query
          required: false
          schema:
            type: number
            minimum: 0
            maximum: 10000000000
            default: 0
            description: 'Порядковый номер страницы событий сделок (смарт-контрактов) у бенефициара'
            example: 0
        - name: eventsPageSize
          in: query
          required: false
          schema:
            type: number
            minimum: 1
            maximum: 20
            default: 20
            description: 'Количество элементов событий сделок (смарт-контрактов) у бенефициара на странице'
            example: 20
        - name: smartContractsPageNumber
          in: query
          required: false
          schema:
            type: number
            minimum: 0
            maximum: 10000000000
            default: 0
            description: 'Порядковый номер страницы сделок (смарт-контрактов) бенефициара'
            example: 0
        - name: smartContractsPageSize
          in: query
          required: false
          schema:
            type: number
            minimum: 1
            maximum: 20
            default: 20
            description: 'Количество элементов сделок (смарт-контрактов) бенефициара'
            example: 20
        - name: filterEventType
          in: query
          description: Filter events by type
          required: false
          schema:
            type: string
            enum:
              - CREDIT
              - DEBIT
              - HOLD
              - UNHOLD
        - name: filterEventValue
          in: query
          description: Filter events by value
          required: false
          schema:
            type: string
            enum:
              - CREATED
              - PENDING
              - DONE
              - ERROR       
      responses:
        '200':
          headers:
            events-page-number:
              schema:
                type: number
                minimum: 0
              description: 'Порядковый номер страницы событий сделок (смарт-контрактов) у бенефициара'
              example: 0
            events-page-size:
              schema:
                type: number
                minimum: 1
                maximum: 20
              description: 'Количество элементов событий сделок (смарт-контрактов) у бенефициара на странице'
              example: 20
            events-total-elements:
              schema:
                type: number
                minimum: 0
              description: 'Общее количество элементов событий сделок (смарт-контрактов) у бенефициара'
              example: 215
            events-updated:
              schema:
                type: string
                format: date-time
              description: 'Время обновления списка'
              example: '2022-03-15T23:31:00.999Z'
            smart-contracts-page-number:
              schema:
                type: number
                minimum: 0
              description: 'Порядковый номер страницы сделок (смарт-контрактов) бенефициара'
              example: 0
            smart-contracts-page-size:
              schema:
                type: number
                minimum: 1
                maximum: 20
              description: 'Количество элементов сделок (смарт-контрактов) бенефициара'
              example: 20
            smart-contracts-total-elements:
              schema:
                type: number
                minimum: 0
              description: 'Общее количество элементов сделок (смарт-контрактов) бенефициара'
              example: 427
            smart-contracts-updated:
              schema:
                type: string
                format: date-time
              description: 'Время обновления списка'
              example: '2022-03-15T23:31:00.999Z'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/beneficiaryState'
          description: OK
        '400':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIBadRequest'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'        
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIUnauthorized'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIForbidden'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Not Found
        '405':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Method Not Allowed
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIUnprocessableEntity'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'       
          description: Unprocessable Entity  
        '429':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPITooManyRequests'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'       
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIInternalServerError'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Internal Server Error
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIBadGateway'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Bad Gateway
        '503':
          description: Service Unavailable
        '504':
          description: Gateway Timeout
  '/beneficiaries/balance-report/{id}':
    get:
      operationId: getBeneficiaryBalanceReport
      tags:
        - 'Методы работы с бенефициарами'
      summary: 'Запросить выписку по движению средств'
      description: | 
        Метод позволяет по заданным параметрам получить выписку по движению средств на балансе бенефицира
        
        Чтобы использовать метод, в параметре **scope** ссылки авторизации пользователя должен быть указан сервис **nominal_accounts** для получения доступа к этому ресурсу 
        
        События: транзакции
        
        Сочетания типа события (eventType) и статуса события (eventValue): 
          - CREDIT (Транзакция на пополнение) - CREATED (Создан), PENDING (В процессе обработки), DONE (Исполнен) 
          - DEBIT (Транзакция на списание с ном.счета: оплата СК, вывод средств, оплата комиссии) - CREATED (Создан), PENDING (В процессе обработки), DONE (Исполнен) 
      parameters:
        - $ref: '#/components/parameters/RqUID'
        - $ref: '#/components/parameters/Authorization'  
        - name: id
          in: path
          required: true
          schema:
              $ref: '#/components/schemas/id'   
        - $ref: '#/components/parameters/pageNumber'
        - name: pageSize
          in: query
          required: false
          schema:
            type: number
            minimum: 1
            maximum: 20
            default: 20
            description: 'Количество элементов событий сделок (смарт-контрактов) у бенефициара на странице'
            example: 20
        - name: eventType
          in: query
          required: false
          schema:
            type: string
            enum:
              - 'debit'
              - 'credit'
              - 'credit,debit'
              - 'debit,credit'
            description: 'Фильтр типа операции'
            example: 'debit'
        - name: startDate
          in: query
          description: 'Дата начала периода (передавать в UTC)'
          required: false
          schema:
            type: string
            pattern: '^20[0-9]{2}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$'
            example: '2022-11-01'
        - name: endDate
          in: query
          description: 'Дата окончания периода (передавать в UTC)'
          required: false
          schema:
            type: string
            pattern: '^20[0-9]{2}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$'
            example: '2022-11-30'
      responses:
        '200':
          headers:
            page-number:
              schema:
                type: number
                minimum: 0
              description: 'Порядковый номер страницы событий у бенефициара'
              example: 0
            page-size:
              schema:
                type: number
                minimum: 1
                maximum: 20
              description: 'Количество элементов событий у бенефициара на странице'
              example: 20
            total-elements:
              schema:
                type: number
                minimum: 0
              description: 'Общее количество элементов событий у бенефициара'
              example: 215
            updated:
              schema:
                format: date-time
                type: string
              description: 'Время обновления списка'
              example: '2022-03-15T23:31:00.999Z'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/beneficiaryBalanceReport'
          description: OK
        '400':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIBadRequest'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'        
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIUnauthorized'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIForbidden'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Not Found
        '405':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Method Not Allowed
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIUnprocessableEntity'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'     
          description: Unprocessable Entity  
        '429':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPITooManyRequests'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIInternalServerError'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'       
          description: Internal Server Error
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIBadGateway'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Bad Gateway
        '503':
          description: Service Unavailable
        '504':
          description: Gateway Timeout
  '/beneficiaries/moneyback':
    post:
      operationId: moneyback
      tags:
        - 'Методы работы с бенефициарами'
      summary: 'Вывести средства с номинального счета'
      description: | 
        Метод позволяет вывести средства бенефициара с номинального счета на расчетный счет
        
        Чтобы использовать метод, в параметре **scope** ссылки авторизации пользователя должен быть указан сервис **nominal_accounts** для получения доступа к этому ресурсу 
        
        В случае открытия клиентом нескольких номинальных счетов заголовок **nominalAccountId** является обяательным к заполнению   
        
        Расчетный счет бенефицира можно получить запросом **GET /beneficiaries/details/{id}** 
        
        Перед вызовом метода необходимо проверить, что доступный остаток бенефициара больше или равен сумме выводимых средств (значение атрибута **amount** из запроса), путем вызова метода **GET/beneficiaries/state/{id}** 
        
        Данные блока **subject** в запросе должны соответствовать данным бенефициара (счет может отличаться, но должен принадлежать бенефициару)
  
        Параметр **kvd** (код вида дохода) - это поле 20 в платежном поручении. Порядок заполнения **kvd**: не заполняется, если получателем является индивидуальный предприниматель или юридическое лицо, так как этот код необходим только при перечислении денег физическим лицам для указания оснований удержаний по исполнительным документам (229-ФЗ). **kvd** заполняется: при перечислении заработной платы, отпускных, премий сотрудникам; при выплате самозанятым; в других случаях выплат физическим лицам (например, возмещение вреда здоровью) (см. 229-ФЗ ст. 99, ч. 1, 2 ст. 101)      
      parameters:
        - $ref: '#/components/parameters/RqUID'
        - $ref: '#/components/parameters/Authorization'  
        - $ref: '#/components/parameters/nominalAccountId'   
           
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - content
                - signature
              description: Структура тела ответа на запрос вывода средств с номинального счета в пользу бенефициара
              properties:
                content:
                  type: object
                  required:
                    - data
                    - agreement
                  properties:
                    data:
                      type: object
                      description: 'Данные для вывода средств с номинального счета в пользу бенефициара'
                      required:
                        - subject
                        - beneficiaryId
                        - amount
                      properties:
                        subject:
                          $ref: '#/components/schemas/subjectBeneficiaryForMoneyback'
                        beneficiaryId:
                            $ref: '#/components/schemas/id'
                        amount:
                          $ref: '#/components/schemas/amount'
                        currency:
                          $ref: '#/components/schemas/currency'
                        kvd:
                          $ref: '#/components/schemas/kvd'  
                      additionalProperties: false
                    agreement:
                      $ref: '#/components/schemas/agreement'
                  additionalProperties: false
                  description: 'Подписываемый payload'
                signature:
                  $ref: '#/components/schemas/signature'
              additionalProperties: false
        required: true      
      responses:
        '201':
          content:
            application/json:
              schema:
                type: object
                description: 'Уникальный идентификатор события'
                properties:
                  eventId:
                      $ref: '#/components/schemas/id'
                additionalProperties: false
          description: Created
        '400':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIBadRequest'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'         
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIUnauthorized'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIForbidden'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Not Found
        '405':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Method Not Allowed
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIUnprocessableEntity'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'       
          description: Unprocessable Entity  
        '429':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPITooManyRequests'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIInternalServerError'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Internal Server Error
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIBadGateway'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Bad Gateway
        '503':
          description: Service Unavailable
        '504':
          description: Gateway Timeout
  '/beneficiaries/{beneficiaryId}/balance/events/{eventId}':
    get:
      operationId: getBeneficiaryBalanceEventId
      tags:
        - 'Методы работы с бенефициарами'
      summary: 'Запросить детали операции'
      description: | 
        Метод позволяет по eventId получить информацию про денежный event конкретного бенефициара 
        
        Чтобы использовать метод, в параметре **scope** ссылки авторизации пользователя должен быть указан сервис **nominal_accounts** для получения доступа к этому ресурсу 
        
        Событие: транзакция, холдирование, расхолдирование 
        
          Сочетания типа события (eventType) и статуса события (eventValue): 
          - CREDIT (Транзакция на пополнение) - CREATED (Создан), PENDING (В процессе обработки), DONE (Исполнен) 
          - DEBIT (Транзакция на списание с ном.счета: оплата СК, вывод средств, оплата комиссии ) - CREATED (Создан), PENDING (В процессе обработки), DONE (Исполнен) 
          - HOLD (Создать сделку (смарт-контракт)) - CREATED (Создан), DONE (Исполнен) 
          - UNHOLD (Исполнить сделку (смарт-контракт)/Прервать сделку (смарт-контракт)) - CREATED (Создан), DONE (Исполнен)
      parameters:
        - $ref: '#/components/parameters/RqUID'
        - $ref: '#/components/parameters/Authorization'    
        - name: beneficiaryId
          in: path
          required: true
          schema:
              $ref: '#/components/schemas/id'
        - name: eventId
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/id'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/event'
          description: OK
        '400':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIBadRequest'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'        
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIUnauthorized'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIForbidden'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Not Found
        '405':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Method Not Allowed
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIUnprocessableEntity'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Unprocessable Entity  
        '429':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPITooManyRequests'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'       
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIInternalServerError'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Internal Server Error
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIBadGateway'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Bad Gateway
        '503':
          description: Service Unavailable
        '504':
          description: Gateway Timeout
  '/beneficiaries/{beneficiaryId}/credit/payment-order-qr/create':
    get:
      operationId: createQRcreditRPP
      tags:
        - Методы работы с бенефициарами
      summary: 'Запросить QR-код на пополнение номинального счета по реквизитам'
      description: |
      
        Метод возвращает изображение QR-кода (ГОСТ Р 56042—2014) с реквизитами платежного поручения для зачисления средств в пользу конкретного бенефициара номинального счета
        
        Назначение платежа в данном случае формируется на стороне сервиса Безопасные сделки 
        
        Банк не несет ответственность за проверку корректности заполнения реквизитов платежного поручения 
        
        В случае открытия клиентом нескольких номинальных счетов заголовок **nominalAccountId** является обяательным к заполнению
        
        Чтобы использовать метод, в параметре **scope** ссылки авторизации пользователя должен быть указан сервис **nominal_accounts** для получения доступа к этому ресурсу
      parameters:
        - $ref: '#/components/parameters/RqUID'
        - $ref: '#/components/parameters/Authorization'  
        - $ref: '#/components/parameters/nominalAccountId'      
        - name: beneficiaryId
          in: path
          required: true
          schema:
              $ref: '#/components/schemas/id'
        - name: amount
          in: query
          description: Amount of funds in kopecks
          required: false
          schema:
            $ref: '#/components/schemas/amountQR'    
      responses:
        '200':
          content:
            image/png:
              schema:
                type: string
                format: binary
          description: OK
        '400':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIBadRequest'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'         
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIUnauthorized'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIForbidden'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Not Found
        '405':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Method Not Allowed
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIUnprocessableEntity'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Unprocessable Entity  
        '429':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPITooManyRequests'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIInternalServerError'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'       
          description: Internal Server Error
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIBadGateway'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Bad Gateway
        '503':
          description: Service Unavailable
        '504':
          description: Gateway Timeout 
  '/beneficiaries/credit/ecom-order/create':
    post:
      operationId: ecomCreditC2B
      deprecated: true
      tags:
        - Методы работы с бенефициарами
      summary: 'Создать заказ для зачисления средств на номинальный счет с использованием сервисов интернет-эквайринга (оплата по СБП С2В)'
      description: |
       Создание и регистрация заказа на оплату через интернет-эквайринг (включая СБП С2В)
       
       **Важное изменение с 01.06.2026:**
       
       С этой даты зачисление средств на номинальный счет через интернет-эквайринг (включая СБП С2В) производится напрямую через сервисы эквайринга.
       
       Денежные средства, поступившие на номинальный счет через интернет-эквайринг, отразятся на нем, как неразнесенные. Получить список неразнесенных пополнений можно с помощью вызова метода **GET/transactions/undefined**. Разнести данные пополнения можно с помощью вызова метода **POST/transactions/undefined/{id}/identify** 
       
       **Предварительные условия:**
       
       1. Зарегистрируйтесь в системе интернет-эквайринга. Инициировать регистрацию можно в личном кабинете СББОЛ.
       
       2. После регистрации комиссия с плательщика удерживается согласно тарифам вашего договора на интернет-эквайринг.
      parameters:
        - $ref: '#/components/parameters/RqUID'
        - $ref: '#/components/parameters/Authorization'  
        - $ref: '#/components/parameters/nominalAccountId'      
      requestBody:
        content:
           application/json:
            schema:
              type: object
              required:
                - content
                - signature
              description: Структура тела запроса на создание заказа для зачисления средств с использованием сервисов интернет-эквайринга 
              properties:
                content:
                  type: object
                  required:
                    - data
                    - agreement
                  properties:
                    data:
                      $ref: '#/components/schemas/createOrderC2Breq'
                    agreement:
                      $ref: '#/components/schemas/agreement'
                  additionalProperties: false
                  description: 'Подписываемый payload'
                signature:
                  $ref: '#/components/schemas/signature'
              additionalProperties: false
        required: true      
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/createOrderC2Bresp'
          description: OK 
        '400':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIBadRequest'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'         
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIUnauthorized'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIForbidden'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Not Found
        '405':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Method Not Allowed
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIUnprocessableEntity'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Unprocessable Entity  
        '429':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPITooManyRequests'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'     
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIInternalServerError'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'       
          description: Internal Server Error
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIBadGateway'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Bad Gateway
        '503':
          description: Service Unavailable
        '504':
          description: Gateway Timeout  
  '/beneficiaries/credit/ecom-order/info':
    post:
      operationId: getEcomCreditC2B
      deprecated: true
      tags:
        - Методы работы с бенефициарами
      summary: 'Запросить информацию о ранее созданном заказе'
      description: |
       
        Предоставляет информацию о ранее созданном заказе по его идентификатору 
      
        **Важное изменение с 01.06.2026:**
         
        С этой даты зачисление средств на номинальный счет через интернет-эквайринг (включая СБП С2В) производится напрямую через сервисы эквайринга.
        
        Денежные средства, поступившие на номинальный счет через интернет-эквайринг, отразятся на нем, как неразнесенные. Получить список неразнесенных пополнений можно с помощью вызова метода **GET/transactions/undefined**. Разнести данные пополнения можно с помощью вызова метода **POST/transactions/undefined/{id}/identify** 
        
        **Предварительные условия:**
         
        1. Зарегистрируйтесь в системе интернет-эквайринга. Инициировать регистрацию можно в личном кабинете СББОЛ.
        
        2. После регистрации комиссия с плательщика удерживается согласно тарифам вашего договора на интернет-эквайринг.
      parameters:
        - $ref: '#/components/parameters/RqUID'
        - $ref: '#/components/parameters/Authorization'  
        - $ref: '#/components/parameters/nominalAccountId'     
      requestBody:
        content:
           application/json:
            schema:
              type: object
              required:
                - content
                - signature
              description: Структура тела запроса на получение информации по ранее созданному заказу
              properties:
                content:
                  type: object
                  required:
                    - data
                    - agreement
                  properties:
                    data:
                      $ref: '#/components/schemas/infoOrderC2Breq'
                    agreement:
                      $ref: '#/components/schemas/agreement'
                  additionalProperties: false
                  description: 'Подписываемый payload'
                signature:
                  $ref: '#/components/schemas/signature'
              additionalProperties: false   
        required: true      
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/infoOrderC2Bresp'
          description: OK  
        '400':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIBadRequest'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'        
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIUnauthorized'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIForbidden'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Not Found
        '405':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Method Not Allowed
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIUnprocessableEntity'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'       
          description: Unprocessable Entity  
        '429':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPITooManyRequests'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIInternalServerError'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Internal Server Error
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIBadGateway'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Bad Gateway
        '503':
          description: Service Unavailable
        '504':
          description: Gateway Timeout   
  '/smart-contracts':
    post:
      operationId: createSmartContract
      tags:
        - 'Методы работы со сделками (смарт-контрактами)'
      summary: 'Создать сделку'
      description: | 
        Создание сделки (смарт-контракта) 
        
        Чтобы использовать метод, в параметре **scope** ссылки авторизации пользователя должен быть указан сервис **nominal_accounts** для получения доступа к этому ресурсу 
        
        В случае открытия клиентом нескольких номинальных счетов заголовок **nominalAccountId** является обяательным к заполнению 
        
        Синхронный ответ с http-кодом 201 Created означает, что сделка (смарт-контракт) создана  
        
        При последовательном создании сделок (смарт-контрактов) в рамках одного бенефициара рекомендуем руководствоваться правилом: каждый последующий запрос на создание сделки (смарт-контракта) необходимо вызывать, только после получения ответа на предыдущий, иначе - вернется ошибка с http-кодом 429; также вызов метода на исполнение сделки (смарт-контракта) необходимо осуществлять только после получения ответа на вызов метода о создании сделки (смарт-контракта)
        
        Значение атрибута **id** в запросе должно быть уникально относительно id ранее созданных сделок (смарт-контрактов)
        
        Значение атрибута **amount** в запросе должно быть больше 0 
        
      parameters:
        - $ref: '#/components/parameters/RqUID'
        - $ref: '#/components/parameters/Authorization'  
        - $ref: '#/components/parameters/nominalAccountId'        
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - content
                - signature
              description: Структура тела запроса создания сделки (смарт-контракта)
              properties:
                content:
                  type: object
                  required:
                    - data
                    - agreement
                  properties:
                    data:
                      $ref: '#/components/schemas/smartContract'
                    agreement:
                      $ref: '#/components/schemas/agreement'
                  additionalProperties: false
                  description: 'Подписываемый payload'
                signature:
                  $ref: '#/components/schemas/signature'
              additionalProperties: false
        required: true      
      responses:
        '201':
          content:
            application/json:
              schema:
                type: object
                properties:
                  smartContractId:
                      $ref: '#/components/schemas/id'
                additionalProperties: false
                description: OK
          description: Created
        '400':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIBadRequest'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'        
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIUnauthorized'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIForbidden'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Not Found
        '405':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Method Not Allowed
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIUnprocessableEntity'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'       
          description: Unprocessable Entity  
        '429':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPITooManyRequests'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIInternalServerError'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'       
          description: Internal Server Error
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIBadGateway'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Bad Gateway
        '503':
          description: Service Unavailable
        '504':
          description: Gateway Timeout
  '/smart-contracts/async':
    post:
      operationId: createSmartContractAcync
      tags:
        - 'Методы работы со сделками (смарт-контрактами)'
      summary: 'Создать сделку в асинхронном режиме'
      description: | 
        Создание сделки (смарт-контракта) в асинхронном режиме  
        
        Чтобы использовать метод, в параметре **scope** ссылки авторизации пользователя должен быть указан сервис **nominal_accounts** для получения доступа к этому ресурсу 
        
        В случае открытия клиентом нескольких номинальных счетов заголовок **nominalAccountId** является обяательным к заполнению 
        
        Синхронный ответ с http-кодом 201 Created означает, что процесс создания сделки (смарт-контракта) в обработке
        
        Вызов метода на исполнение сделки (смарт-контракта) необходимо осуществлять только после того, как сделка (смарт-контракт) перейдет в статус **RUN** 
        
        Статус сделки (смарт-контракта) можно узнать с помощью вызова метода **GET/smart-contracts/{id}**: **DONE|ERROR** - конечные статусы; **PENDIG** - сделка (смарт-контракт) в процессе создания (необходимо повторить вызов метода **GET/smart-contracts/{id}** до получения статуса RUN); **RUN** - действующая сделка (смарт-контракт)
        
        Преимущества использования метода **POST/smart-contracts/async** перед методом **POST/smart-contracts** заключается в возможности одновременного создания нескольких сделок (смарт-контрактов) в рамках одного бенефициара
        
        Значение атрибута **id** в запросе должно быть уникально относительно id ранее созданных сделок (смарт-контрактов)
        
        
        Значение атрибута **amount** в запросе должно быть больше 0 
      parameters:
        - $ref: '#/components/parameters/RqUID'
        - $ref: '#/components/parameters/Authorization'  
        - $ref: '#/components/parameters/nominalAccountId'       
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - content
                - signature
              description: Структура тела запроса создания сделки (смарт-контракта)
              properties:
                content:
                  type: object
                  required:
                    - data
                    - agreement
                  properties:
                    data:
                      $ref: '#/components/schemas/smartContract'
                    agreement:
                      $ref: '#/components/schemas/agreement'
                  additionalProperties: false
                  description: 'Подписываемый payload'
                signature:
                  $ref: '#/components/schemas/signature'
              additionalProperties: false
        required: true      
      responses:
        '201':
          content:
            application/json:
              schema:
                type: object
                properties:
                  smartContractId:
                      $ref: '#/components/schemas/id'
                additionalProperties: false
                description: OK
          description: Created
        '400':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIBadRequest'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'         
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIUnauthorized'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIForbidden'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Not Found
        '405':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Method Not Allowed
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIUnprocessableEntity'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Unprocessable Entity  
        '429':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPITooManyRequests'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIInternalServerError'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'       
          description: Internal Server Error
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIBadGateway'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Bad Gateway
        '503':
          description: Service Unavailable
        '504':
          description: Gateway Timeout
  
          
  '/smart-contracts/confirmstep':
    post:
      operationId: confirmSmartContractStep
      tags:
        - 'Методы работы со сделками (смарт-контрактами)'
      summary: 'Исполнить сделку'
      description: | 
        Метод предназначен для проведения оплаты ранее созданной сделки (смарт-контракта) (выплата исполнителю сделки (смарт-контракта), оплата комиссии площадки, оплата налогов). В запросе можно отправить на исполнение сразу несколько транзакций (в рамках одной сделки (смарт-контракта))
        
        Чтобы использовать метод, в параметре **scope** ссылки авторизации пользователя должен быть указан сервис **nominal_accounts** для получения доступа к этому ресурсу 
        
        В случае открытия клиентом нескольких номинальных счетов заголовок **nominalAccountId** является обяательным к заполнению  
        
        Транзакции в рамках одного запроса обрабатываются независимо. Ошибка при выполнении одной или нескольких транзакций не влияет на обработку остальных. Неудача исполнения одной транзакции не отменяет исполнения других. Успешно исполненные транзакции будут завершены
        
        Если сумма всех транзакций в запросе равна сумме захолдированных под сделку (смарт-контракт) средств, то после исполнения всех транзакций в рамках данного запроса, сделка (смарт-контракт) автоматически завершится (перейдет в статус **"DONE"**)
        
        Данные отправителя в запросе (блок **payer**) должны соответствовать данным бенефициара. Данные всех блоков **payer** в запросе должны быть идентичны. Бенефициар в рамках запроса должен быть активным (в статусе **"ACTIVATED"**)
        
        Значение атрибута **amount** каждой транзакции в запросе должно быть больше 0 
        
        Сумма всех транзакций в запросе должа быть меньше или равна сумме захолдированных средств под сделку (смарт-контракт)
        
        Сделка (смарт-контракт), в рамках которой выполняется исполнение должна быть активной (в статусе **"RUN"**)
        
        Тип транзакции (**transactionType**) в запросе = **FEE** - устанавливается для формирования платежа по перечислению комиссии на расчетный счет площадки. При указанном типе транзакции данные получателя средств (блок **payee**) должны соответствовать данным владельца номинального счета (данные в **account** - расчетный счет, который принадлежит владельцу номинального счета, в любом банке)
        
        Тип транзакции (**transactionType**) в запросе = **PAYMENT** - устанавливается для формирования платежа по перечислению средств в пользу исполнителя сделки (смарт-контракта)
        
        Тип транзакции (**transactionType**) в запросе = **TAX** - устанавливается для формирования платежа по перечислению средств в ФНС (налоговый платеж в пользу исполнителя сделки (смарт-контракта)). Для данного типа транзакции должен быть заполнен блок **tax** (реквизиты для налоговой)
        
        Тип транзакции (**transactionType**) в запросе = **INTERNAL** - устанавливается для формирования платежа в рамках перевода средств между бенефициарами. Для данного типа транзакции должен быть заполнен блок **payee** в соответствии со схемой **beneficiaryPayee**
        
        Значение атрибута **transactionId** в запросе для каждой транзакции должно быть уникально 
        
        ФИО владельца расчетного счета получателя средств должно полностью совпадать с ФИО получателя средств, указанном в блоке **payee**
        
        Для перемещения средств между бенефициарами в рамках одного номинального счета в транзакции в объекте **payer** необходимо указать данные бенефициара отправителя средств, а в объекте **payee** необходимо указать данные бенефициара получателя (заполнить объект в соответствии со схемой **beneficiaryPayee**)
        
        **validateSelfEmployed** - принимает значение false/true (по умолчанию - false) - выполнить проверку самозанятого
        
        Параметр **kvd** (код вида дохода) - это поле 20 в платежном поручении. Порядок заполнения **kvd**: не заполняется, если получателем является индивидуальный предприниматель или юридическое лицо, так как этот код необходим только при перечислении денег физическим лицам для указания оснований удержаний по исполнительным документам (229-ФЗ). **kvd** заполняется: при перечислении заработной платы, отпускных, премий сотрудникам; при выплате самозанятым; в других случаях выплат физическим лицам (например, возмещение вреда здоровью) (см. 229-ФЗ ст. 99, ч. 1, 2 ст. 101)
        
        Ответ на запрос **201 Created** подтверждает, что платеж прошел предварительные проверки (активность бенефициара и сделки, корректность суммы и т.д.) и принят в асинхронную обработку, но финальный статус требует проверки через вызовы методов **GET /beneficiaries/state/{id} или GET /smart-contracts/{id}**. Здесь возможны три негативных сценария: 1. Синхронный отказ (4xx) — транзакция не создана; 2. Отказ внутри банка (ответ на запрос будет 201, но GET запрос вернет ERROR); 3. Успешная отправка в сторонний банк (ответ на запрос будет 201 и GET запрос вернет DONE), однако при отказе банка получателя в приеме платежа позже инициируется отдельная транзакция возврата, хотя исходный платеж сохранит статус DONE. 
        
      parameters:
        - $ref: '#/components/parameters/RqUID'
        - $ref: '#/components/parameters/Authorization'  
        - $ref: '#/components/parameters/nominalAccountId'     
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - content
                - signature
              description: Структура тела запроса исполнения сделки (смарт-контракта)
              properties:
                content:
                  type: object
                  required:
                    - data
                    - agreement
                  properties:
                    data:
                      $ref: '#/components/schemas/stepconfirmation'
                    agreement:
                      $ref: '#/components/schemas/agreement'
                  additionalProperties: false
                  description: 'Подписываемый payload'
                signature:
                  $ref: '#/components/schemas/signature'
              additionalProperties: false
        required: true      
      responses:
        '201':
          description: Created
        '400':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIBadRequest'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'        
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIUnauthorized'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIForbidden'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Not Found
        '405':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Method Not Allowed
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIUnprocessableEntity'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'       
          description: Unprocessable Entity  
        '429':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPITooManyRequests'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'       
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIInternalServerError'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'       
          description: Internal Server Error
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIBadGateway'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Bad Gateway
        '503':
          description: Service Unavailable
        '504':
          description: Gateway Timeout
  '/smart-contracts/completion':
    post:
      operationId: completeSmartContract
      tags:
        - 'Методы работы со сделками (смарт-контрактами)'
      summary: 'Прервать сделку'
      description: | 
        После того, как выполнены все расчеты по сделке (смарт-контракту), или стороны пришли к согласию завершить сделку (смарт-контракт) преждевременно, необходимо выполнить запрос прерывания сделки (смарт-контракта)
        
        Чтобы использовать метод, в параметре **scope** ссылки авторизации пользователя должен быть указан сервис **nominal_accounts** для получения доступа к этому ресурсу 
        
        В случае открытия клиентом нескольких номинальных счетов заголовок **nominalAccountId** является обяательным к заполнению 
        
        Данный метод вызывается в случае, если необходимо завершить сделку (смарт-контракт), у которой не израсходована сумма захолдированных средств (метод используется для расхолдирования средств по неисполненным или частично исполненным сделкам (смарт-контрактам) в статусе **RUN**)
        
        Бенефициар, в отношении которого выполняется прерывание сделки (смарт-контракта), должен быть активным
      parameters:
        - $ref: '#/components/parameters/RqUID'
        - $ref: '#/components/parameters/Authorization'  
        - $ref: '#/components/parameters/nominalAccountId'      
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - content
                - signature
              description: Структура тела ответа на запрос прерывания сделки (смарт-контракта)
              properties:
                content:
                  type: object
                  required:
                    - data
                    - agreement
                  properties:
                    data:
                      $ref: '#/components/schemas/smartContractCompletion'
                    agreement:
                      $ref: '#/components/schemas/agreement'
                  additionalProperties: false
                  description: 'Подписываемый payload'
                signature:
                  $ref: '#/components/schemas/signature'
              additionalProperties: false
        required: true      
      responses:
        '201':
          description: Created
        '400':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIBadRequest'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'        
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIUnauthorized'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIForbidden'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Not Found
        '405':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Method Not Allowed
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIUnprocessableEntity'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Unprocessable Entity  
        '429':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPITooManyRequests'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIInternalServerError'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'       
          description: Internal Server Error
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIBadGateway'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Bad Gateway
        '503':
          description: Service Unavailable
        '504':
          description: Gateway Timeout
  

  '/smart-contracts/{id}':
    get:
      operationId: getSmartContractById
      tags:
        - 'Методы работы со сделками (смарт-контрактами)'
      summary: 'Запросить информацию о сделке'
      description: | 
        Запрос позволяет увидеть актуальный статус сделки (смарт-контракта), детализацию финансовых обязательств и список событий
        
        Чтобы использовать метод, в параметре **scope** ссылки авторизации пользователя должен быть указан сервис **nominal_accounts** для получения доступа к этому ресурсу 
        
        В случае открытия клиентом нескольких номинальных счетов заголовок **nominalAccountId** является обяательным к заполнению 
        
        Возможные статусы жизненного цикла сделки (смарт-контракта): **RUN** (Действующий), **DONE** (Исполненный), **CANCELED** (Отмененный), **PENDING** (В обработке), **ERROR** (В ошибке)
      parameters:
        - $ref: '#/components/parameters/RqUID'
        - $ref: '#/components/parameters/Authorization'  
        - $ref: '#/components/parameters/nominalAccountId'      
        - name: id
          in: path
          required: true
          schema:
              $ref: '#/components/schemas/id'
        - $ref: '#/components/parameters/pageNumber'
        - name: pageSize
          in: query
          required: false
          schema:
            description: 'Количество элементов на одной странице с событиями по сделке (смарт-контракту)'
            type: number
            minimum: 1
            maximum: 20
            default: 20
            example: 20
      responses:
        '200':
          headers:
            page-number:
              schema:
                type: number
                minimum: 0
                #maximum: 600
              description: 'Порядковый номер страницы с событиями по сделке (смарт-контракту)'
              example: 0
            page-size:
              schema:
                type: number
                minimum: 1
                maximum: 20
              description: 'Количество элементов на одной странице с событиями по сделке (смарт-контракту)'
              example: 20
            total-elements:
              schema:
                type: number
                minimum: 0
                #maximum: 600
              description: 'Общее количество событий по сделке (смарт-контракту)'
              example: 83
            updated:
              schema:
                type: string
                format: date-time
              description: 'Время обновления списка'
              example: '2022-03-15T23:31:00.999Z'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/actualSmartContractWithEvents'
          description: OK
        '400':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIBadRequest'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'         
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIUnauthorized'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIForbidden'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Not Found
        '405':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Method Not Allowed
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIUnprocessableEntity'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'       
          description: Unprocessable Entity  
        '429':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPITooManyRequests'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'       
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIInternalServerError'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'       
          description: Internal Server Error
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIBadGateway'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Bad Gateway
        '503':
          description: Service Unavailable
        '504':
          description: Gateway Timeout
  '/smart-contracts/receipt/create':
    post:
      operationId: receiptCreateSmartContract
      tags:
        - 'Методы работы со сделками (смарт-контрактами)'
      summary: 'Создать чек для самозанятого'
      description: | 
        Метод позволяет сформировать чек для самозанятого по успешно завершённым транзакциям в рамках сделки (смарт-контракта)
        
        Чтобы использовать метод, в параметре **scope** ссылки авторизации пользователя должен быть указан сервис **nominal_accounts** для получения доступа к этому ресурсу 
        
        В случае открытия клиентом нескольких номинальных счетов заголовок **nominalAccountId** является обяательным к заполнению  
      parameters:
        - $ref: '#/components/parameters/RqUID'
        - $ref: '#/components/parameters/Authorization'  
        - $ref: '#/components/parameters/nominalAccountId'     
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - content
                - signature
              description: Структура тела запроса для создания чека
              properties:
                content:
                  type: object
                  required:
                    - data
                    - agreement
                  properties:
                    data:
                      $ref: '#/components/schemas/receiptCreate'
                    agreement:
                      $ref: '#/components/schemas/agreement'
                  additionalProperties: false
                  description: 'Подписываемый payload'
                signature:
                  $ref: '#/components/schemas/signature'
              additionalProperties: false
        required: true      
      responses:
        '201':
          content:
            application/json:
              schema:
                type: object
                properties:
                  receiptId:
                    type: string
                    format: uuid
                    pattern: '^[0-9A-Fa-f-]{36}$'
                    description: 'Id чека'
                    example: '99ee301b-8e06-4fd5-88d4-2ca5668294b1'
                    
                additionalProperties: false
          description: Created    
        '400':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIBadRequest'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'        
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIUnauthorized'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIForbidden'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Not Found
        '405':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Method Not Allowed
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIUnprocessableEntity'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'       
          description: Unprocessable Entity  
        '429':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPITooManyRequests'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIInternalServerError'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'       
          description: Internal Server Error
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIBadGateway'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Bad Gateway
        '503':
          description: Service Unavailable
        '504':
          description: Gateway Timeout 
  '/smart-contracts/receipt/{id}':
    get:
      operationId: getSmartContractReceiptById
      tags:
        - 'Методы работы со сделками (смарт-контрактами)'
      summary: 'Запросить информацию по чеку'
      description: | 
        Запрос позволяет запросить актуальный статус чека и ссылку на чек
        
        Чтобы использовать метод, в параметре **scope** ссылки авторизации пользователя должен быть указан сервис **nominal_accounts** для получения доступа к этому ресурсу 
        
        В случае открытия клиентом нескольких номинальных счетов заголовок **nominalAccountId** является обяательным к заполнению 
      parameters:
        - $ref: '#/components/parameters/RqUID'
        - $ref: '#/components/parameters/Authorization'  
        - $ref: '#/components/parameters/nominalAccountId'     
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            pattern: '^[0-9A-Fa-f-]{36}$'
            description: 'Id чека'
            example: '99ee301b-8e06-4fd5-88d4-2ca5668294b1'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/actualReceipt'
          description: OK
        '400':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIBadRequest'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'         
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIUnauthorized'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIForbidden'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Not Found
        '405':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Method Not Allowed
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIUnprocessableEntity'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Unprocessable Entity  
        '429':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPITooManyRequests'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'     
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIInternalServerError'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'     
          description: Internal Server Error
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIBadGateway'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
          description: Bad Gateway
        '503':
          description: Service Unavailable
        '504':
          description: Gateway Timeout        
#  '/smart-contracts/receipt/{receiptId}/cancel':
#    post:
#      operationId: cancelSmartContractReceipt
#      tags:
#        - 'Методы работы со сделками (смарт-контрактами)'
#      summary: 'Аннулировать чек'
#      #description: |Метод предназначен для отмены чека клиента
#      parameters:
#        - $ref: '#/components/parameters/RqUID'
#        - $ref: '#/components/parameters/Authorization'
#        - $ref: '#/components/parameters/nominalAccountId'
#        - name: receiptId
#          in: path
#          required: true
#          schema:
#            type: string
#            format: uuid
#            pattern: '^[0-9A-Fa-f-]{36}$'
#            description: 'Id чека в системе Безопасные сделки'
#            example: '99ee301b-8e06-4fd5-88d4-2ca5668294b1'
#      requestBody:
#        content:
#          application/json:
#            schema:
#              type: object
#              required:
#                - content
#                - signature
#              description: Структура тела запроса для аннулирования чека
#              properties:
#                content:
#                  type: object
#                  required:
#                    - data
#                    - agreement      
#                  properties:
#                    data:
#                      type: object
#                      description: 'Данные чека'
#                      required: 
#                        - cancelReason
#                      properties:
#                        cancelReason:
#                          type: string
#                          description: 'Причина аннулирования чека'
#                          enum:
#                            - REGISTRATION_MISTAKE
#                            - REFUND
#                          example: 'REGISTRATION_MISTAKE'
#                      additionalProperties: false
#                    agreement:
#                      $ref: '#/components/schemas/agreement'
#                  additionalProperties: false
#                signature:
#                  $ref: '#/components/schemas/signature'
#              additionalProperties: false
 
                        
                      
            
      
         
          
        
  
  
  '/sbp/b2c/bankList':
    get:
      operationId: getBankListSBP
      tags:
        - Методы работы с СБП
      summary: 'Запросить перечень банков для переводов по СБП'
      description: |
        Предоставляет список банков, доступных для перевода по СБП В2С
        
        Чтобы использовать метод, в параметре **scope** ссылки авторизации пользователя должен быть указан сервис **nominal_accounts** для получения доступа к этому ресурсу 
        
        Для использования метода необходимо подключить СБП для переводов физлицам по [инструкции](https://www.sberbank.com/help/business/sbbol/100911?tab=web)
        
        В запросе **POST/sbp/b2c/smart-contracts/confirmstep** на исполнение сделки (смарт-контракта) через СБП В2С в блоке **payee** в параметре **bankBIC** необходимо передать БИК банка из списка банков, возвращаемом в ответе на запрос **GET/sbp/b2c/bankList**
      parameters:
        - $ref: '#/components/parameters/RqUID'
        - $ref: '#/components/parameters/Authorization'         
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bankListSBPresp'
          description: OK    
        '400':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIBadRequest'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'       
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIUnauthorized'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIForbidden'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Not Found
        '405':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Method Not Allowed
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIUnprocessableEntity'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Unprocessable Entity  
        '429':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPITooManyRequests'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIInternalServerError'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'     
          description: Internal Server Error
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIBadGateway'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
          description: Bad Gateway
        '503':
          description: Service Unavailable
        '504':
          description: Gateway Timeout  
  '/sbp/b2c/smart-contracts/confirmstep':
    post:
      operationId: SBPexecutionB2C
      tags:
        - Методы работы с СБП
      summary: 'Исполнить сделку через СБП В2С'
      description: |
        Метод проверяет статус подключения организации (владельца номинального счета) к СБП, проверяет возможность проведения операции СБП В2С с номинального счета, проверяет возможность перевода по указанным реквизитам и исполняет перевод 
        
        Чтобы использовать метод, в параметре **scope** ссылки авторизации пользователя должен быть указан сервис **nominal_accounts** для получения доступа к этому ресурсу 
        
        В случае открытия клиентом нескольких номинальных счетов заголовок **nominalAccountId** является обяательным к заполнению 
        
        Для использования метода необходимо подключить СБП для переводов физлицам по [инструкции](https://www.sberbank.com/help/business/sbbol/100911?tab=web)
        
        Расшифровка значений параметра **kvd** в блоке **transactions**: **null** - **Не указан.**.Код дохода указывать не нужно, если денежные средства не относятся к доходам с установленными ограничениями согласно ст. 99 и запретом согласно ст. 101 229-ФЗ.), **1** - **Размер взыскания ограничен.** (Заработная плата или иные доходы, в отношении которых ст. 99 229-ФЗ установлены ограничения размеров удержания.), **2** - **Периодические выплаты, взыскание невозможно.** (Периодические доходы, на которые в соответствии с ч. 1 ст. 101 229-ФЗ не может быть обращено взыскание, за исключением доходов, указанных в ч. 2 ст. 101 229-ФЗ.), **3** - **Периодические выплаты, размер взыскания не ограничен.** (Периодические доходы, к которым согласно ч. 2 ст. 101 229-ФЗ ограничения по взысканию не применяются.), **4** - **Разовые выплаты, взыскание невозможно.** (Единовременный доход, на который в соответствии с ч. 1 ст. 101 229-ФЗ не может быть обращено взыскание, за исключением доходов, указанных в ч. 2 ст. 101 229-ФЗ.), **5** - **Разовые выплаты, размер взыскания не ограничен.** (Единовременный доход, к которому согласно ч. 2 ст. 101 229-ФЗ ограничения по взысканию не применяются.);
        
        Комиссия за использование сервиса в пользу площадки должна списываться в рамках вызова метода **POST/smart-contracts/confirmstep** с **transactionType** = "FEE" 
        
        В блоке **payee** в параметре **bankBIC** необходимо передать БИК банка из списка банков, возвращаемом в ответе на запрос **GET/sbp/b2c/bankList**
        
        Если в запросе в блоке **payee** заполнен блок **fullNameForCheck**, то будет произведена проверка ФИО получателя из запроса с ФИО получателя из СБП. Если в запросе в блоке **payee** не заполнен блок **fullNameForCheck**, проверка  ФИО получателя из запроса с ФИО получателя из СБП производиться не будет (ДС будут переведены на счет по указанному номеру телефона в банк, указанный в запросе, без проверки ФИО получателя) 
        
        В блоке **fullNameForCheck** блока **payee** в параметрах **lastName**, **firstName** и **middleName** необходимо передать ФИО получателя средств в таком виде, в котором оно указано в ДУЛ получателя 
        
        *validateSelfEmployed** - принимает значение false/true (по умолчанию - false) - выполнить проверку самозанятого 
      parameters:
        - $ref: '#/components/parameters/RqUID'
        - $ref: '#/components/parameters/Authorization'  
        - $ref: '#/components/parameters/nominalAccountId' 
      requestBody:
        content:
           application/json:
            schema:
              type: object
              required:
                - content
                - signature
              description: Структура тела запроса на исполнение перевода СБП В2С
              properties:
                content:
                  type: object
                  required:
                    - data
                    - agreement
                  properties:
                    data:
                      $ref: '#/components/schemas/executeSBPreq'
                    agreement:
                      $ref: '#/components/schemas/agreement'
                  additionalProperties: false
                  description: 'Подписываемый payload'
                signature:
                  $ref: '#/components/schemas/signature'
              additionalProperties: false
        required: true      
      responses:
        '201':
          description: Created   
        '400':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIBadRequest'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIUnauthorized'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIForbidden'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Not Found
        '405':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Method Not Allowed
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIUnprocessableEntity'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'     
          description: Unprocessable Entity  
        '429':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPITooManyRequests'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'     
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIInternalServerError'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'     
          description: Internal Server Error
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIBadGateway'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
          description: Bad Gateway
        '503':
          description: Service Unavailable
        '504':
          description: Gateway Timeout  
          
  '/ecom/report':        
    get:
      summary: 'Получить отчет по операциям зачисления эквайринга'
      description: |
        :::caution
        **ВАЖНО:** Метод находится на этапе опытной эксплуатации 
          
        Отчет может содержать **дублирующиеся записи**
          
        **Как отследить дубли:** Убедитесь, что в назначении платежа в поле "description" при создании заказа добавлен **ключ реконсиляции**.
        :::
        
        Метод позволяет получить отчет по операциям зачисления эквайринга за определенную дату **(не позднее вчерашнего дня T-1)**
        
        Запрос отчета за предыдущий день доступен с 12.00 текущего дня. Отчет за дни предшествующие предыдущему можно запрашивать в любое время
      operationId: getReport
      tags:
        - Методы для работы с отчетами
      parameters:
        - $ref: '#/components/parameters/RqUID'
        - $ref: '#/components/parameters/Authorization'
        - $ref: '#/components/parameters/nominalAccountId'
        - $ref: '#/components/parameters/pageNumber'
        - name: pageSize
          in: query
          required: false
          schema:
            type: number
            minimum: 1
            maximum: 50
            default: 20
            description: 'Количество элементов на странице' 
            example: 20
        - name: reportDate
          required: true
          in: query
          description: 'Дата отчета (должна быть не позднее вчерашнего дня)'
          schema:
            $ref: '#/components/schemas/reportDate'
      responses:
        '200':
          description: 'OK'
          headers:
            page-number:
              schema:
                type: number
                minimum: 0
              description: 'Порядковый номер страницы операций пополнения номинального счета через эквайринг'
              example: 0
            page-size:
              schema:
                type: number
                minimum: 1
                maximum: 100
              description: 'Количество элементов операций пополнения номинального счета через эквайринг'
              example: 20
            total-elements:
              schema:
                type: number
                minimum: 0
              description: 'Общее количество элементов операций пополнения номинального счета через эквайринг'
              example: 2086
          content:
            application/json:
              schema:
                type: object
                description: 'Список операций пополнения номинального счета через эквайринг'
                required: 
                  - reportRequest
                properties:
                  reportRequest:
                    $ref: '#/components/schemas/transactionsReport'
                additionalProperties: false
        '400':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIBadRequest'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'        
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIUnauthorized'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIForbidden'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Not Found
        '405':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Method Not Allowed
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIUnprocessableEntity'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Unprocessable Entity  
        '429':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPITooManyRequests'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/error'
                  - $ref: '#/components/schemas/errorSberBusinessAPIInternalServerError'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'      
          description: Internal Server Error
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorSberBusinessAPIBadGateway'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId' 
          description: Bad Gateway
        '503':
          description: Service Unavailable
        '504':
          description: Gateway Timeout    
components:
  headers:
    XRequestId:
      required: false
      description: 'Уникальный идентификатор запроса.'
      schema:
        type: string
        minLength: 1
        maxLength: 36
        example: 'a30b2c5c-3d89-4f59-9f3b-f20b55ef4f59'  
  parameters:
    RqUID:
      name: RqUID
      in: header
      required: true
      schema:
        type: string
        pattern: '^[0-9a-fA-F-]{36}$'
        description: 'Уникальный идентификатор запроса'
        example: 'f4550e519e81435d864c4b5e07d70e18'  
    Authorization:
      name: Authorization
      in: header
      required: true
      schema:
        type: string
        pattern: '^([a-zA-Z0-9]){38}$'
        description: 'Access token пользователя, полученный через SSO'
        example: 'cb0bbb48-7d32-4419-8413-db7a9e8bb6c8-2'
    nominalAccountId:
      name: nominalAccountId
      in: header
      description: Filter nominal account by ID
      required: false
      schema: 
        type: string
        format: uuid
        pattern: '^[0-9a-fA-F-]{36}$'
        description: 'id номинального счета'
        example: '74550e51-9e81-435d-864c-4b5e07d70e18'
    pageNumber:    
      name: pageNumber
      in: query
      required: false
      schema:
        type: number
        minimum: 0
        maximum: 10000000000
        default: 0
        description: 'Порядковый номер страницы'
        example: 0
    pageSize:    
      name: pageSize
      in: query
      required: false
      schema:
        type: number
        minimum: 1
        maximum: 100
        default: 20
        description: 'Количество элементов на странице' 
        example: 20
  schemas:
    
    birthDate:
      type: string
      pattern: '^(19|20)[0-9]{2}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$'
      description: 'Дата рождения'
      example: '1985-09-09'
    contractDate:
      type: string
      pattern: '^20[0-9]{2}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$'
      description: 'Дата заключения договора присоединения бенефициара к НС date – full-date notation as defined by RFC 3339, section 5.6, full-date = date-fullyear "-" date-month "-" date-mday for example, 2017-07-21'
      example: '2022-03-15'
    expiryDate:
      type: string
      pattern: '^20[0-9]{2}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$'
      description: 'Дата по которую действует сделка (смарт-контракт)'
      example: '2022-03-15'  
      
    
    id:
      type: string
      format: uuid
      pattern: '^[0-9a-fA-F-]{36}$'
      description: 'Идентификатор'
      example: '74550e51-9e81-435d-864c-4b5e07d70e18'
    #contractors:
    #  type: array
    #  maxItems: 10
    #  deprecated: true
    #  description: 'Реквизиты участников сделки (смарт-контракта)'
    #  items:
    #    $ref: '#/components/schemas/subjectContractors'    
    basisAccountNumber:
      type: string
      pattern: '^[0-9]{20,25}$'
      description: 'номер расчетного счета'
      example: '40702810538000118319'
    nominalAccountNumber:
      type: string
      pattern: '^40[0-9]{3}810[0-9]{12}$'
      description: 'Номер номинального счета'
      example: '40703810012345678910'
    orgShortNameRu:
      type: string
      pattern: '^[А-Яа-яёЁ0-9 "№.+()-]{3,160}$'
      description: 'Наименование организации'
      example: 'ПАО Ромашки'
    orgShortNameRuGet:
      type: string
      pattern: '^[А-Яа-яёЁA-Za-z0-9 "№.+()-]{3,160}$'
      description: 'Наименование организации'
      example: 'ПАО Ромашки'  


    addresslite:
      type: string
      pattern: '^[1-9А-ЯЁа-яёA-Za-z][0-9А-ЯЁа-яёA-Za-z №N.,()/\"«»-]{1,250}$'
      description: 'Юридический адрес'
      example: '123456, Кабардино-Балкарская Республика, г.Тырны-Ауз, ул. 50 лет Окт. революци, 69/с1, стр.17, корп.1, этаж 8, ком.258 '
    addressReg:
      type: string
      pattern: '^[1-9А-ЯЁа-яёA-Za-z][0-9А-ЯЁа-яёA-Za-z №N.,()/\"«»-]{1,250}$'
      description: 'Адрес регистрации'
      example: '123456, Кабардино-Балкарская Республика, г.Тырны-Ауз, ул. 50 лет Окт. революци, 69/с1, стр.17, корп.1, этаж 8, ком.258 '  
    addressPost:
      type: string
      pattern: '^[1-9А-ЯЁа-яёA-Za-z][0-9А-ЯЁа-яёA-Za-z №N.,()/\"«»-]{1,250}$'
      description: 'Почтовый адрес'
      example: '123456, Кабардино-Балкарская Республика, г.Тырны-Ауз, ул. 50 лет Окт. революци, 69/с1, стр.17, корп.1, этаж 8, ком.258 '
    
    phone:
      type: string
      pattern: '^((8|\+7)[ -]?)?(\(?\d{3}\)?[ -]?)?[\d -]{7,10}$'
      description: 'Номер телефона для контактов (оповещений)'
      example: '+7(905)123-45-67'
    
    email:
      type: string
      format: email
      maxLength: 40
      description: 'Адрес электронной почты для контактов (оповещений). (**format: email** в данном атрибуте подразумевает следующие правила валидации: данное поле должно содержать строку, соответствующую формату адреса электронной почты согласно стандарту RFC; соответствие значения стандарту электронного адреса (например, с указанием домена верхнего уровня); отсутствие ведущих или конечных символов пробела; проверка актуальных доменов верхнего уровня согласно документации - https://commons.apache.org/proper/commons-validator/apidocs/src-html/org/apache/commons/validator/routines/DomainValidator.html)'
      example: 'info@your-company.ru'
    
    snils:
      type: string
      pattern: '^[0-9]{3}-[0-9]{3}-[0-9]{3} [0-9]{2}$'
      description: 'Страховой номер индивидуального лицевого счета'
      example: '012-345-678 90'
    kpp:
      type: string
      pattern: '^[0-9]{9}$'
      description: 'Код причины постановки на учет'
      example: '773101001'
    #sbpRequisitesForMoneyback:
    #  type: object
    #  required:
    #    - phone
    #    - bankBIC
    #  description: 'Общий набор данных для вывода средств по СБП'
    #  properties:
    #    phone:
    #      $ref: '#/components/schemas/receiverPhoneProfile'
    #    bankBIC:
    #      description: БИК банка получателя
    #      type: string
    #     maxLength: 9
    #      pattern: "^[0-9]{9}$" 
    #  additionalProperties: false
    sbpRequisites:
      type: object
      required:
        - phone
        - bankBIC
      description: 'Реквизиты СБП бенефициара, по которым будут выведены средства с номинального счета при исключении бенефициара из реестра'
      properties:
        phone:
          $ref: '#/components/schemas/receiverPhoneProfile'
        bankBIC:
          description: БИК банка получателя
          type: string
          maxLength: 9
          pattern: "^[0-9]{9}$" 
      additionalProperties: false  
    account:
      required:
        - bankBIC
        - bankCorAccount
        - bankName
        - accountNumber
      type: object
      description: 'Данные расчетного счета'
      properties:
        accountNumber:
          $ref: '#/components/schemas/basisAccountNumber'
        bankBIC:
          type: string
          pattern: '^[0-9]{9}$'
          description: 'БИК'
          example: '044525225'
        bankCorAccount:
          type: string
          pattern: '^[0-9]{20}$'
          description: 'Корреспондентский счет'
          example: '30101810400000000225'
        bankName:
          type: string
          pattern: ^[А-ЯЁа-яёa-zA-Z][А-ЯЁа-яёa-zA-Z0-9 №N.,()\"#$%&\'\*{|}~\[\]\-\\\/]+$
          maxLength: 140
          description: 'Наименование банка'
          example: 'ПАО СБЕРБАНК'
      additionalProperties: false
    accountForMoneyback:
      required:
        - bankBIC
        - bankCorAccount
        - bankName
        - accountNumber
      type: object
      description: 'Общий набор данных для вывода средств по реквизитам расчетного счета'
      properties:
        accountNumber:
          $ref: '#/components/schemas/basisAccountNumber'
        bankBIC:
          type: string
          pattern: '^[0-9]{9}$'
          description: 'БИК'
          example: '044525225'
        bankCorAccount:
          type: string
          pattern: '^[0-9]{20}$'
          description: 'Корреспондентский счет'
          example: '30101810400000000225'
        bankName:
          type: string
          pattern: ^[А-ЯЁа-яёa-zA-Z][А-ЯЁа-яёa-zA-Z0-9 №N.,()\"#$%&\'\*{|}~\[\]\-\\\/]+$
          maxLength: 140
          description: 'Наименование банка'
          example: 'ПАО СБЕРБАНК'
      additionalProperties: false  
    accountProfile:
      required:
        - bankBIC
        - bankCorAccount
        - bankName
        - accountNumber
      type: object
      description: 'Расчетный счет бенефициара, на который будут выведены средства с номинального счета при исключении бенефициара из реестра'
      properties:
        accountNumber:
          $ref: '#/components/schemas/basisAccountNumber'
        bankBIC:
          type: string
          pattern: '^[0-9]{9}$'
          description: 'БИК'
          example: '044525225'
        bankCorAccount:
          type: string
          pattern: '^[0-9]{20}$'
          description: 'Корреспондентский счет'
          example: '30101810400000000225'
        bankName:
          type: string
          pattern: ^[А-ЯЁа-яёa-zA-Z][А-ЯЁа-яёa-zA-Z0-9 №N.,()\"#$%&\'\*{|}~\[\]\-\\\/]+$
          maxLength: 140
          description: 'Наименование банка'
          example: 'ПАО СБЕРБАНК'
      additionalProperties: false  
    smartContractTitle:
      type: string
      pattern: '^[А-ЯЁа-яёA-Za-z0-9 ./№+-]+$'
      maxLength: 250
      description: 'Заголовок сделки (смарт-контракта)'
      example: 'Договор купли-продажи №КП 12/1-2022 от 01.12.2022'
    contractNumber:
      type: string
      pattern: '^[А-ЯЁа-яёA-Za-z\d\/\-\_]+$'
      maxLength: 25
      description: 'Номер договора-основания'
      example: 'ДКП02-01/2022'
    identificationDoc:
      type: object
      required:
        - seria
        - number
        - issuer
        - issueDate
        - issuerCode
      description: 'Документ удостоверяющий личность'
      properties:
        identificationDocType:
          type: string
          description: 'Тип (наименование) документа, удостоверяющего личность - Паспорт гражданина РФ'
          enum:
            - 'Паспорт гражданина РФ'
          example: 'Паспорт гражданина РФ'
          default: 'Паспорт гражданина РФ'
        seria:
          type: string
          pattern: '^[0-9]{4}$'
          description: 'Серия документа'
          example: '4508'
        number:
          type: string
          pattern: '^[0-9]{6}$'
          description: 'Номер документа'
          example: '947357'
        issuer:
          type: string
          pattern: '^[А-ЯЁа-яё0-9 -/.№]{0,150}$'
          description: 'Наименование органа, выдавшего документ'
          example: 'ОВД района Северное Тушино г. Москвы'
        issueDate:
          type: string
          pattern: '^(19|20)[0-9]{2}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$'
          description: 'Дата выдачи паспорта'
          example: '2022-03-15'
        issuerCode:
          type: string
          pattern: '^[0-9-]{7}$'
          description: 'Код подразделения'
          example: '123-243'
      additionalProperties: false
    beneficiaryIndividualliteNonResident:
      type: object
      required:
        - beneficiaryId
        - beneficiaryType
        - nominalAccountId
        - contractNumber
        - contractDate
        - surname
        - name
        - birthDate
        - birthCountry
        - birthPlace
        - identificationDoc
        - addresses
        - account
        - phone
        - inn
        - citizenShips
        - taxResidenceDifference
        - rightOfResidenceUnderInvestmentScheme
      description: 'Анкета бенефициара ФЛ-нерезидента'
      properties:
        beneficiaryId:
            $ref: '#/components/schemas/id'
        beneficiaryType:
          description: 'Тип бенефициара 4 - ФЛ Нерез'
          type: string
          pattern: '^4$'
          example: '4'
        nominalAccountId:
            $ref: '#/components/schemas/id'
        contractNumber:
          $ref: '#/components/schemas/contractNumber'
        contractDate:
          $ref: '#/components/schemas/contractDate'
        surname:
          type: string
          pattern: '^[А-ЯЁA-Z][А-ЯЁа-яёA-Za-z -]+$'
          maxLength: 50
          description: 'Фамилия'
          example: 'Коган-Константинопольский'
        name:
          type: string
          pattern: '^[А-ЯЁA-Z][А-ЯЁа-яёA-Za-z -]+$'
          maxLength: 50
          description: 'Имя'
          example: 'Фарид Оглы'
        patronymic:
          type: string
          pattern: '^[А-ЯЁA-Z][А-Яа-яёЁA-Za-z -]+$'
          maxLength: 50
          description: 'Отчество' #поле обязательно к заполнению при наличии в паспорте
          example: 'Николаевич'
        birthDate:
          $ref: '#/components/schemas/birthDate'
        identificationDoc:
          $ref: "#/components/schemas/identificationDocNonResident"
        otherCountriesOfTaxResident:
          type: array
          maxItems: 20
          items:
            $ref: "#/components/schemas/otherCountriesOfTaxResident"
        addresses:
          type: array
          maxItems: 20
          items:
            type: object
            required:
              - typeAddress
              - address
            properties:
              typeAddress:
                type: string
                enum: 
                  - 'адрес регистрации'
                  - 'адрес фактического места пребывания/проживания'
              address:
                $ref: '#/components/schemas/addressNonResident'
        birthCountry:
          $ref: '#/components/schemas/country' 
        birthPlace:
          type: string
          pattern: '^[А-ЯЁа-яё .-]+$'
          maxLength: 50
          description: 'Место рождения – Город'
          example: 'г. Санкт-Петербург'
        account:
          oneOf:
            - $ref: '#/components/schemas/accountProfile'
            - $ref: '#/components/schemas/sbpRequisites'
        residentCard:
          description: 'Вид на жительство - код страны в формате https://snipp.ru/handbk/iso-3166-1-alpha-2'
          type: array
          maxItems: 10
          items:
            description: 'Код страны в формате https://snipp.ru/handbk/iso-3166-1-alpha-2'
            type: object
            properties:
              country:
                $ref: '#/components/schemas/country' 
        citizenShips:
          description: 'Гражданство - код страны в формате https://snipp.ru/handbk/iso-3166-1-alpha-2'
 
          type: array
          maxItems: 10
          items:
            description: 'Код страны в формате https://snipp.ru/handbk/iso-3166-1-alpha-2'
            type: object
            properties:
              country:
                $ref: '#/components/schemas/country' 
        taxResidenceDifference:
          description: 'Отличается ли страна Вашего налогового резидентства от адреса фактического проживания?'
          type: object
          required: 
            - taxResidenceDifference
          properties:
            taxResidenceDifference:
              type: boolean
              example: false
              description: 'Отличается ли страна Вашего налогового резидентства от адреса фактического проживания?'
            explanationLackResidencyCountryResidence:
              description: 'Причина отсутствия страны Вашего налогового резидентства в адресе фактического проживания'
              type: string
              maxLength: 255
              pattern: '^[А-ЯЁа-яё .-]+$'
              example: 'Причина отсутствия страны Вашего налогового резидентства в адресе фактического проживания'
            
        rightOfResidenceUnderInvestmentScheme:
          $ref: '#/components/schemas/rightOfInvestmentScheme'
 
        phone:
          $ref: '#/components/schemas/phone'
        email:
          $ref: '#/components/schemas/email'
        inn:
          type: string
          pattern: '^[0-9]{12}$'
          description: 'ИНН'
          example: '097743528989'
      additionalProperties: false    
    identificationDocNonResident:
      type: object
      required:
        - number
        - issueDate
        - identificationDocType
        - issuer
      description: 'Документ удостоверяющий личность'
      properties:
        identificationDocType:
          type: string
          description: |
          
            Тип (наименование) документа удостоверяющего личность:
            
            - PF - Паспорт иностранного гражданина,
            
            - RAC - Свид-во о рассмотрении ходатайства о признании лица беженцем на территории РФ
            
            - RCS - Вид на жительство в Российской Федерации лица без гражданства
            
            - RID - Удостоверение беженца
            
            - PTS - Свидетельство о предоставлении временного убежища на территории РФ
          enum:
            - 'PF'
            - 'RAC'
            - 'RCS'
            - 'RID'
            - 'PTS'
          example: 'PF'
          default: 'PF'
        seria:
          type: string
          pattern: '^(?!.*[^A-Z0-9])[A-Z0-9]{0,10}$'
          description: 'Серия документа'
          example: '4508'
        number:
          type: string
          description: 'Номер документа'
          pattern: '^(?!.*[^A-Z0-9])[A-Z0-9]{0,30}$'
          example: 'FA567845'
        issuer:
          type: string
          pattern: '^[А-ЯЁа-яё0-9 -/.№]{0,150}$'
          description: 'Наименование органа, выдавшего документ. Обязательно для Паспорт иностранного гражданина и Паспорта РФ'
          example: 'ОВД г. Минск'
        issueDate:
          type: string
          pattern: '^(19|20)[0-9]{2}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$'
          description: 'Дата выдачи документа'
          example: '2025-03-15'
        expireDate:
          type: string
          pattern: '^(19|20)[0-9]{2}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$'
          description: 'Дата окончания срока действия документа. Указываемая дата должна быть строго больше текущей. Разница между датой выдачи и датой окончания не должна превышать определенный срок, в зависимости от типа'
          example: '2035-03-15'
      additionalProperties: false
    otherCountriesOfTaxResident:
      description: "Страны налогового резидентства"
      type: object
      required: 
        - country
      properties:
        country:
          $ref: '#/components/schemas/country'
        taxId:
          $ref: '#/components/schemas/taxId'
        inAbsenceReason:
          $ref: '#/components/schemas/inAbsenceReason'
      additionalProperties: false
    country:
      description: 'Код страны в формате https://snipp.ru/handbk/iso-3166-1-alpha-2'
      type: string
      maxLength: 2
      pattern: '^[A-Z]{2}$'
      example: 'BY'
    taxId:
      description: "ИН в другой стране налогового резидентства"
      type: string
      maxLength: 50
      minLength: 0
    inAbsenceReason:
      description: "Причина отсутствия ИН"
      type: string
      enum:
        - юрисдикция не присваивает ИН
        - юрисдикция не присвоила ИН физическому лицу
        - иное
        - подано заявление на получение и(или) восстановление идентификатора налогоплательщика (ИН)
      example: "юрисдикция не присвоила ИН физическому лицу"

    addressNonResident:
      type: string
      pattern: '^[1-9А-ЯЁа-яё][0-9А-ЯЁа-яё №N.,()/\"«»-]{1,250}$'
      description: 'Адрес'
      example: '123456, Кабардино-Балкарская Республика, г.Тырны-Ауз, ул. 50 лет Окт. революци, 69/с1, стр.17, корп.1, этаж 8, ком.258 '
    rightOfInvestmentScheme:
      type: object
      description: 'Налоговое резидентство получено по программе «гражданство/ резидентство в обмен на инвестиции'
      required: 
        - rightOfResidenceUnderInvestmentScheme
      additionalProperties: false  
      properties:
        rightOfResidenceUnderInvestmentScheme:
          description: 'Право на проживание в РФ по инвестиционной схеме'
          type: object
          required: 
            - rightOfResidenceUnderInvestmentScheme
          properties:
            rightOfResidenceUnderInvestmentScheme:
              description: 'Имеет ли право на проживание в РФ по инвестиционной схеме?' 
              type: boolean
              example: false
            country:
              type: array
              maxItems: 20
              items:
                description: '3 - Страны, в которых получено право на проживание по инвестиционной схеме (прил.4.0, п.3.2) (Код страны в формате https://snipp.ru/handbk/iso-3166-1-alpha-2)'
                type: string
                maxLength: 2
                pattern: '^[A-Z]{2}$'
                example: 'BY'
                #$ref: '#/components/schemas/country'
          additionalProperties: false
                
        ninetyDaysOtherResidence:
          description: 'Верно ли утверждение, что более 90 дней были проведены в какой-либо другой стране(ах), отличном от указанного Вами в качестве юрисдикции налогового резидентства, в течение предыдущего года?'
          type: object
          properties:
            ninetyDaysOtherResidence:
              description: 'Более 90 дней были проведены в какой-либо другой стране(ах), отличном от указанного в качестве юрисдикции налогового резидентства, в течение предыдущего года'
              type: boolean
              example: false
            country:
              type: array
              maxItems: 30
              items:
                description: '4 - Страны, в которых было проведено более 90 дней, отличное от указанного в качестве юрисдикции налогового резидентства, в течение предыдущего года (Код страны в формате https://snipp.ru/handbk/iso-3166-1-alpha-2)'
                type: string
                maxLength: 2
                pattern: '^[A-Z]{2}$'
                example: 'BY'
              #  $ref: '#/components/schemas/country'
          additionalProperties: false
        statesFilingIncomeDeclarations:
          description: 'Страны, в которых подавалась декларация по налогу на доходы физических лиц за предыдущий год'
          type: object
          properties:
            statesFilingIncomeDeclarations:
              description: 'Подтверждаю, что являюсь плательщиком подоходного налога или его аналога в следующих государствах'
              type: boolean
              example: false
            country:
              type: array
              maxItems: 30
              items:
                description: '1 - Страны, в которых подавалась декларация по налогу на доходы физических лиц за предыдущий год (Код страны в формате https://snipp.ru/handbk/iso-3166-1-alpha-2)'
                type: string
                maxLength: 2
                pattern: '^[A-Z]{2}$'
                example: 'BY'
          additionalProperties: false
              
        centerOfVitalInterestsInStates:
          description: 'Страны, в которых находится «центр моих жизненных интересов»'
          type: object
          properties:
            centerOfVitalInterestsInStates:
              description: 'Подтверждаю, что являюсь плательщиком подоходного налога или его аналога в следующих государствах'
              type: boolean
              example: false
            country:
              type: array
              maxItems: 20
              items:
                description: '1 - Страны, в которых находится «центр моих жизненных интересов» (Код страны в формате https://snipp.ru/handbk/iso-3166-1-alpha-2)'
                type: string
                maxLength: 2
                pattern: '^[A-Z]{2}$'
                example: 'BY'
          additionalProperties: false
      
    beneficiaryOrglite:
      type: object
      required:
        - beneficiaryId
        - beneficiaryType
        - nominalAccountId
        - contractNumber
        - contractDate
        - ogrn
        - inn
        - kpp
        - orgName
        - account
        - legalAddress
        - isForeignOrg
        - isTaxResidentRF
        - isOnlyTaxResidentRF
        - isControlPersonsRF
        - phone
        - email
      description: 'Анкета бенефициара ЮЛ'
      properties:
        beneficiaryId:
            $ref: '#/components/schemas/id'
        beneficiaryType:
          type: string
          pattern: '^1$'
          description: 'Тип бенефициара 1 - ЮЛ'
          example: '1'
        nominalAccountId:
            $ref: '#/components/schemas/id'
        contractNumber:
          $ref: '#/components/schemas/contractNumber'
        contractDate:
          $ref: '#/components/schemas/contractDate'
        ogrn:
          type: string
          pattern: '^[0-9]{13}$'
          description: 'ОГРН'
          example: '1047796372711'
        inn:
          type: string
          pattern: '^[0-9]{10}$'
          description: 'ИНН'
          #minLength: 10
          example: '0743528989'
        kpp:
          $ref: '#/components/schemas/kpp'
        orgName:
          $ref: '#/components/schemas/orgShortNameRu'
        account:
          $ref: '#/components/schemas/account'
        legalAddress:
          $ref: '#/components/schemas/addresslite'
        isForeignOrg:
          type: boolean
          description: 'Признак зарубежной организации: true – да, false – нет'
          example: false
        isTaxResidentRF:
          type: boolean
          description: 'Признак налогового резидента РФ: true – да, false – нет'
          example: true
        isOnlyTaxResidentRF:
          type: boolean
          description: 'Признак налогового резиденства только в РФ: true – да, false – нет'
          example: true
        isControlPersonsRF:
          type: boolean
          description: 'Являются ли все контролирующие лица организации налоговыми резидентами только РФ?: true – да, false – нет'
          example: true
        phone:
          $ref: '#/components/schemas/phone'
        email:
          $ref: '#/components/schemas/email'
      additionalProperties: false
    
    beneficiaryIndividualEntrepreneurlite:
      type: object
      required:
        - beneficiaryId
        - beneficiaryType
        - nominalAccountId
        - contractNumber
        - contractDate
        - surname
        - name
        - birthDate
        - identificationDoc
        - inn
        - ogrnip
        - account
        - postAddress
        - isOnlyTaxResidentRF
        - email
        - phone
      description: 'Анкета бенефициара ИП'
      properties:
        beneficiaryId:
            $ref: '#/components/schemas/id'
        beneficiaryType:
          description: 'Тип бенефициара 2 - ИП'
          type: string
          pattern: '^2$'
          example: '2'
        nominalAccountId:
            $ref: '#/components/schemas/id'
        contractNumber:
          $ref: '#/components/schemas/contractNumber'
        contractDate:
          $ref: '#/components/schemas/contractDate'
        surname:
          $ref: '#/components/schemas/surname'
        name:
          $ref: '#/components/schemas/name'
        patronymic:
          $ref: '#/components/schemas/patronymic'
        birthDate:
          $ref: '#/components/schemas/birthDate'
        identificationDoc:
          $ref: "#/components/schemas/identificationDoc"
        inn:
          type: string
          pattern: '^[0-9]{12}$'
          description: 'ИНН'
          #minLength: 12
          example: '097743528989'
        account:
          $ref: '#/components/schemas/account'
        ogrnip:
          type: string
          pattern: '^3[0-9]{14}$'
          description: 'ОГРНИП'
          example: '304500116000157'
        postAddress:
          $ref: '#/components/schemas/addressPost'
        isOnlyTaxResidentRF:
          type: boolean
          description: 'Признак налогового резиденства только в РФ: true – да, false – нет'
          example: true
        phone:
          $ref: '#/components/schemas/phone'
        email:
          $ref: '#/components/schemas/email'
      additionalProperties: false
    beneficiaryIndividuallite:
      type: object
      required:
        - beneficiaryId
        - beneficiaryType
        - nominalAccountId
        - contractNumber
        - contractDate
        - surname
        - name
        - birthDate
        - birthPlace
        - inn
        - identificationDoc
        - regAddress
        - isOnlyTaxResidentRF
        - phone
        - account
      description: 'Анкета бенефициара ФЛ'
      properties:
        beneficiaryId:
          $ref: '#/components/schemas/id'
        beneficiaryType:
          description: 'Тип бенефициара 3 - ФЛ'
          type: string
          pattern: '^3$'
          example: '3'
        nominalAccountId:
          $ref: '#/components/schemas/id'
        contractNumber:
          $ref: '#/components/schemas/contractNumber'
        contractDate:
          $ref: '#/components/schemas/contractDate'
        surname:
          $ref: '#/components/schemas/surname'
        name:
          $ref: '#/components/schemas/name'
        patronymic:
          $ref: '#/components/schemas/patronymic'
        birthDate:
          $ref: '#/components/schemas/birthDate'
        identificationDoc:
          $ref: "#/components/schemas/identificationDoc"
        regAddress:
          $ref: '#/components/schemas/addressReg'
        birthPlace:
          type: string
          pattern: '^[А-ЯЁа-яё .-]+$'
          maxLength: 50
          description: 'Место рождения – Город'
          example: 'г. Санкт-Петербург'
        account:
          oneOf:
            - $ref: '#/components/schemas/accountProfile'
            - $ref: '#/components/schemas/sbpRequisites'
        isOnlyTaxResidentRF:
          type: boolean
          description: 'Признак налогового резиденства только в РФ: true – да, false – нет'
          example: true
        phone:
          $ref: '#/components/schemas/phone'
        email:
          $ref: '#/components/schemas/email'
        inn:
          type: string
          pattern: '^[0-9]{12}$'
          description: 'ИНН'
          #minLength: 12
          example: '097743528989'
      additionalProperties: false
    surname:
      type: string
      pattern: '^[А-ЯЁA-Z][А-ЯЁа-яёA-Za-z -]+$'
      maxLength: 50
      description: 'Фамилия'
      example: 'Коган-Константинопольский'
    name:
      type: string
      pattern: '^[А-ЯЁA-Z][А-ЯЁа-яёA-Za-z -]+$'
      maxLength: 50
      description: 'Имя'
      example: 'Фарид Оглы'
    patronymic:
      type: string
      pattern: '^[А-ЯЁA-Z][А-ЯЁа-яёA-Za-z -]+$'
      maxLength: 50
      description: 'Отчество' #поле обязательно к заполнению при наличии в паспорте
      example: 'Николаевич'
    surnameReceipt:
      type: string
      pattern: '^(?!.–)[^<>#@&$’]+$'
      maxLength: 50
      description: 'Фамилия'
      example: 'Коган-Константинопольский'
    nameReceipt:
      type: string
      pattern: '^(?!.–)[^<>#@&$’]+$'
      maxLength: 50
      description: 'Имя'
      example: 'Фарид Оглы'
    patronymicReceipt:
      type: string
      pattern: '^(?!.–)[^<>#@&$’]+$'
      maxLength: 50
      description: 'Отчество' #поле обязательно к заполнению при наличии в паспорте
      example: 'Николаевич'  
    
    organization:
      type: object
      required:
        - typeCode
        - orgName
        - inn
        - kpp
        - account
      description: 'Общая структура описания организации'
      properties:
        typeCode:
          type: string
          pattern: ^UL$
          description: 'Тип участника UL'
          default: 'UL'
          example: 'UL'
        orgName:
          $ref: '#/components/schemas/orgShortNameRu'
        inn:
          type: string
          pattern: '^[0-9]{10}$'
          description: 'ИНН ЮЛ'
          #minLength: 10
          example: '0743528989'
        kpp:
          $ref: '#/components/schemas/kpp'
        ogrn:
          type: string
          pattern: '^[0-9]{13}$'
          description: 'ОРГН'
          example: '1047796372711'
        account:
          $ref: '#/components/schemas/account'
      additionalProperties: false
    getOrganization:
      type: object
      required:
        - typeCode
        - orgName
        - inn
        - kpp
        - account
      description: 'Общая структура описания организации'
      properties:
        typeCode:
          type: string
          pattern: ^UL$
          description: 'Тип участника UL'
          default: 'UL'
          example: 'UL'
        orgName:
          $ref: '#/components/schemas/orgShortNameRu'
        inn:
          type: string
          pattern: '^[0-9]{10}$'
          description: 'ИНН ЮЛ'
          example: '0743528989'
        kpp:
          $ref: '#/components/schemas/kpp'
        ogrn:
          type: string
          pattern: '^[0-9]{13}$'
          description: 'ОРГН'
          example: '1047796372711'
        account:
          $ref: '#/components/schemas/account'
      additionalProperties: false  
    #individualEntrepreneur:
    #  type: object
    #  required:
    #    - typeCode
    #    - personName
    #    - inn
    #    - account
    #  description: 'Общий набор данных для ИП'
    #  properties:
    #    typeCode:
    #      description: 'Тип участника IP'
    #      type: string
    #      pattern: '^IP$'
    #      default: 'IP'
    #     example: 'IP'
    #    personName:
    #      type: string
    #      pattern: '^[А-ЯЁа-яёA-Za-z -]{3,250}$'
    #      description: 'ФИО для платежа'
    #      example: 'И Кван Ё'
    #    orgName:
    #      $ref: '#/components/schemas/orgShortNameRu'
    #    inn:
    #      type: string
    #      pattern: '^[0-9]{12}$'
    #      #minLength: 12
    #      description: 'ИНН ФЛ'
    #      example: '774352898912'
    #    ogrnip:
    #      type: string
    #      pattern: '^3[0-9]{14}$'
    #      description: 'ОГРНИП'
    #      example: '304500116000157'
    #    snils:
    #      $ref: '#/components/schemas/snils'
    #    account:
    #      $ref: '#/components/schemas/account'
    #  additionalProperties: false
    individualEntrepreneurBen:
      type: object
      required:
        - typeCode
        - personName
        - inn
        - account
      description: 'Общий набор данных для ИП'
      properties:
        typeCode:
          description: 'Тип участника IP'
          type: string
          pattern: '^IP$'
          default: 'IP'
          example: 'IP'
        personName:
          type: string
          pattern: '^[А-ЯЁа-яёA-Za-z -]{3,250}$'
          description: 'ФИО для платежа'
          example: 'И Кван Ё'
        orgName:
          $ref: '#/components/schemas/orgShortNameRuGet'
        inn:
          type: string
          pattern: '^[0-9]{12}$'
          #minLength: 12
          description: 'ИНН ФЛ'
          example: '774352898912'
        ogrnip:
          type: string
          pattern: '^3[0-9]{14}$'
          description: 'ОГРНИП'
          example: '304500116000157'
        snils:
          $ref: '#/components/schemas/snils'
        account:
          $ref: '#/components/schemas/account'
      additionalProperties: false  
    individualEntrepreneurGet:
      type: object
      required:
        - typeCode
        - personName
        - inn
        - account
      description: 'Общий набор данных для ИП'
      properties:
        typeCode:
          description: 'Тип участника IP'
          type: string
          pattern: '^IP$'
          default: 'IP'
          example: 'IP'
        personName:
          type: string
          maxLength: 250
          description: 'ФИО для платежа'
          example: 'И Кван Ё'
        orgName:
          $ref: '#/components/schemas/orgShortNameRuGet'
        inn:
          type: string
          pattern: '^[0-9]{12}$'
          #minLength: 12
          description: 'ИНН ФЛ'
          example: '774352898912'
        ogrnip:
          type: string
          pattern: '^3[0-9]{14}$'
          description: 'ОГРНИП'
          example: '304500116000157'
        snils:
          $ref: '#/components/schemas/snils'
        account:
          $ref: '#/components/schemas/account'
      additionalProperties: false    
    individualEntrepreneurPost:
      type: object
      required:
        - typeCode
        - personName
        - inn
        - account
      description: 'Общий набор данных для ИП'
      properties:
        typeCode:
          description: 'Тип участника IP'
          type: string
          pattern: '^IP$'
          default: 'IP'
          example: 'IP'
        personName:
          type: string
          pattern: '^(?!.–)[^<>#@&$’]+$'
          maxLength: 250
          description: 'ФИО для платежа'
          example: 'И Кван Ё'
        orgName:
          $ref: '#/components/schemas/orgShortNameRu'
        inn:
          type: string
          pattern: '^[0-9]{12}$'
          #minLength: 12
          description: 'ИНН ФЛ'
          example: '774352898912'
        ogrnip:
          type: string
          pattern: '^3[0-9]{14}$'
          description: 'ОГРНИП'
          example: '304500116000157'
        snils:
          $ref: '#/components/schemas/snils'
        account:
          $ref: '#/components/schemas/account'
      additionalProperties: false  
    getIndividualEntrepreneur:
      type: object
      required:
        - typeCode
        - personName
        - inn
        - account
      description: 'Общий набор данных для ИП'
      properties:
        typeCode:
          description: 'Тип участника IP'
          type: string
          pattern: '^IP$'
          default: 'IP'
          example: 'IP'
        personName:
          type: string
          pattern: '^(?!.–)[^<>#@&$’]+$'
          maxLength: 250
          description: 'ФИО для платежа'
          example: 'И Кван Ё'
        orgName:
          $ref: '#/components/schemas/orgShortNameRuGet'
        inn:
          type: string
          pattern: '^[0-9]{12}$'
          #minLength: 12
          description: 'ИНН ФЛ'
          example: '774352898912'
        ogrnip:
          type: string
          pattern: '^3[0-9]{14}$'
          description: 'ОГРНИП'
          example: '304500116000157'
        snils:
          $ref: '#/components/schemas/snils'
        account:
          $ref: '#/components/schemas/account'
      additionalProperties: false  
    individual:
      type: object
      required:
        - typeCode
        - personName
        - inn
        - account
      description: 'Общий набор данные для ФЛ'
      properties:
        typeCode:
          type: string
          pattern: '^FL$'
          default: 'FL'
          description: 'Тип участника FL'
          example: 'FL'
        personName:
          type: string
          maxLength: 250
          description: 'ФИО для платежа'
          example: 'Коган-Константинопольский Константин Константинович'
        inn:
          type: string
          pattern: '^[0-9]{12}$'
          description: 'ИНН ФЛ'
          example: '074352898912'
        snils:
          $ref: '#/components/schemas/snils'
        account:
          $ref: '#/components/schemas/account'
      additionalProperties: false
    individualPost:
      type: object
      required:
        - typeCode
        - personName
        - inn
        - account
      description: 'Общий набор данные для ФЛ'
      properties:
        typeCode:
          type: string
          pattern: '^FL$'
          default: 'FL'
          description: 'Тип участника FL'
          example: 'FL'
        personName:
          type: string
          pattern: '^(?!.–)[^<>#@&$’]+$'
          maxLength: 250
          description: 'ФИО для платежа'
          example: 'Коган-Константинопольский Константин Константинович'
        inn:
          type: string
          pattern: '^[0-9]{12}$'
          description: 'ИНН ФЛ'
          example: '074352898912'
        snils:
          $ref: '#/components/schemas/snils'
        account:
          $ref: '#/components/schemas/account'
      additionalProperties: false  
    individualBen:
      type: object
      required:
        - typeCode
        - personName
        - inn
        - account
      description: 'Общий набор данные для ФЛ'
      properties:
        typeCode:
          type: string
          pattern: '^FL$'
          default: 'FL'
          description: 'Тип участника FL'
          example: 'FL'
        personName:
          type: string
          pattern: '^[А-ЯЁа-яёA-Za-z -]{3,250}$'
          description: 'ФИО для платежа'
          example: 'Коган-Константинопольский Константин Константинович'
        inn:
          type: string
          pattern: '^[0-9]{12}$'
          description: 'ИНН ФЛ'
          example: '074352898912'
        snils:
          $ref: '#/components/schemas/snils'
        account:
          oneOf:
            - $ref: '#/components/schemas/accountProfile'
            - $ref: '#/components/schemas/sbpRequisites' 
      additionalProperties: false  
    individualForMoneyback:
      type: object
      required:
        - typeCode
        - personName
        - inn
        - account
      description: 'Общий набор данные для ФЛ'
      properties:
        typeCode:
          type: string
          pattern: '^FL$'
          default: 'FL'
          description: 'Тип участника FL'
          example: 'FL'
        personName:
          type: string
          pattern: '^(?!.–)[^<>#@&$’]+$'
          maxLength: 250
          description: 'ФИО для платежа'
          example: 'Коган-Константинопольский Константин Константинович'
        inn:
          type: string
          pattern: '^[0-9]{12}$'
          description: 'ИНН ФЛ'
          example: '074352898912'
        snils:
          $ref: '#/components/schemas/snils'
        account:
          #oneOf:
          $ref: '#/components/schemas/accountForMoneyback'
          #- $ref: '#/components/schemas/sbpRequisitesForMoneyback'
      additionalProperties: false   
    #individualNew:
    #  type: object
    #  required:
    #    - typeCode
    #    - personName
    #    - inn
    #  description: 'Общий набор данные для ФЛ'
    #  properties:
    #    typeCode:
    #      type: string
    #      pattern: '^FL$'
    #      default: 'FL'
    #      description: 'Тип участника FL'
    #      example: 'FL'
    #    personName:
    #      $ref: '#/components/schemas/personName'
    #    inn:
    #      type: string
    #      pattern: '^[0-9]{12}$'
    #      #minLength: 12
    #      description: 'ИНН ФЛ'
    #      example: '074352898912'
    #    snils:
    #      $ref: '#/components/schemas/snils'
    #    phoneSBP:
    #      $ref: '#/components/schemas/receiverPhone'
    #    account:
    #      $ref: '#/components/schemas/account'
    #  additionalProperties: false 
    individualSBP:
      type: object
      required:
        - typeCode
        - phoneSBP
      description: 'Общий набор данные для ФЛ'
      properties:
        typeCode:
          type: string
          pattern: '^FLSBP$'
          default: 'FLSBP'
          description: 'Тип участника FL в рамках СБП'
          example: 'FLSBP'
        personName:
          $ref: '#/components/schemas/personName'
        inn:
          type: string
          pattern: '^[0-9]{12}$'
          description: 'ИНН ФЛ'
          #minLength: 12
          example: '074352898912'
        phoneSBP:
          $ref: '#/components/schemas/receiverPhone'
      additionalProperties: false   
    beneficiaryPayee:
      type: object
      required:
        - typeCode
        - beneficiaryId
      description: 'Общий набор данные для получателя бенефициара'
      properties:
        typeCode:
          type: string
          pattern: '^BEN$'
          default: 'BEN'
          description: 'Тип участника BEN (бенефициар)'
          example: 'BEN'
        beneficiaryId:
          type: string
          format: uuid
          pattern: '^[0-9a-fA-F-]{36}$'
          description: 'Идентификатор бенефициара номинального счета, в пользу кого зачисляются средства'
          example: '99ee301b-8e06-4fd5-88d4-2ca5668294b1'   
      additionalProperties: false    
    receiverPhone:
      description: "Номер телефона получателя ФЛ в рамках перевода СБП В2С. Первые 3 цифры номера - код страны (если код страны менее 3 символов, то его необходимо впереди дополнить нулями (например, '007' для РФ)). Последующие 10 цифр -  номер абонента"
      type: string
      pattern: '^[0-9]{11, 13}$'
      example: "0079051234567"
    receiverPhoneProfile:
      description: "Номер телефона для вывода средств по СБП. Первые 3 цифры номера - код страны (если код страны менее 3 символов, то его необходимо впереди дополнить нулями (например, '007' для РФ)). Последующие 10 цифр -  номер абонента"
      type: string
      pattern: '^[0-9]{11, 13}$'
      example: "0079051234567"  
    personName:
      type: string
      maxLength: 250
      description: 'ФИО для платежа'
      example: 'Коган-Константинопольский Константин Константинович'   
    #subjectBeneficiary:
      #oneOf:
        #- $ref: '#/components/schemas/organization'
        #- $ref: '#/components/schemas/individualEntrepreneur'
        #- $ref: '#/components/schemas/individual'
    subjectBeneficiary:
      oneOf:
        - $ref: '#/components/schemas/organization'
        - $ref: '#/components/schemas/individualEntrepreneurBen'
        - $ref: '#/components/schemas/individualBen'    
    subjectBeneficiaryForMoneyback:
      oneOf:
        - $ref: '#/components/schemas/organization'
        - $ref: '#/components/schemas/individualEntrepreneurPost'
        - $ref: '#/components/schemas/individualForMoneyback'    
    subjectPayeeConfirmstep:
      oneOf:
        - $ref: '#/components/schemas/getIndividualEntrepreneur'
        - $ref: '#/components/schemas/individualPost'
        - $ref: '#/components/schemas/getOrganization'
        - $ref: '#/components/schemas/beneficiaryPayee'
    #subjectContractors:
    #  oneOf:
    #    - $ref: '#/components/schemas/organization'
    #    - $ref: '#/components/schemas/individualEntrepreneur'
    #    - $ref: '#/components/schemas/individualNew'   
    subjectPayeeEvent:
      oneOf:
        - $ref: '#/components/schemas/organization'
        - $ref: '#/components/schemas/individualEntrepreneurGet'
        - $ref: '#/components/schemas/individual'
        - $ref: '#/components/schemas/individualSBP'  
        - $ref: '#/components/schemas/beneficiaryPayee'
    smartContract:
      type: object
      required:
        - id
        - beneficiaryId
        - amount
        - currency
      description: 'Структура с параметрами сделки (смарт-контракта)'
      properties:
        id:
          $ref: '#/components/schemas/id'
        title:
          $ref: '#/components/schemas/smartContractTitle'
        amount:
          $ref: "#/components/schemas/amount"
        currency:
          $ref: "#/components/schemas/currency"
        beneficiaryId:
          $ref: '#/components/schemas/id'
      additionalProperties: false
    smartContractCompletion:
      type: object
      required:
        - id
        - beneficiaryId
      description: 'Структура с параметрами сделки (смарт-контракта)'
      properties:
        id:
          $ref: '#/components/schemas/id'
        title:
          $ref: '#/components/schemas/smartContractTitle'
        beneficiaryId:
          $ref: '#/components/schemas/id'
      additionalProperties: false
    actualSmartContract:
      type: object
      description: 'Структура с параметрами сделки (смарт-контракта)'
      properties:
        id:
          $ref: '#/components/schemas/id'
        title:
          $ref: '#/components/schemas/smartContractTitle'
        expiryDate:
          $ref: '#/components/schemas/expiryDate' 
        status:
          $ref: '#/components/schemas/statusSmartContracts' 
        beneficiaryId:
          $ref: '#/components/schemas/id'
        obligations:
          $ref: '#/components/schemas/obligations'
        currency:
          $ref: '#/components/schemas/currency'
        pending:
          $ref: '#/components/schemas/pending'
      additionalProperties: false
    statusSmartContracts:
      type: string
      pattern: '^[A-Za-z]{1,20}$'
      description: 'Статус сделки (смарт-контракта): RUN (Действующий), DONE (Исполненный), CANCELED (Отмененный), PENDING (В обработке), ERROR (В ошибке)' 
      example: 'RUN'
    actualReceipt:
      type: object
      description: 'Структура с параметрами чека'
      properties:
        id:
          type: string
          format: uuid
          pattern: '^[0-9A-Fa-f-]{36}$'
          description: 'Id чека'
          example: '99ee301b-8e06-4fd5-88d4-2ca5668294b1'
        status:
          type: string
          pattern: '^[A-Za-z]+$'
          maxLength: 20
          description: 'Статус чека: IN PROGRESS (В процессе создания), ERROR (Ошибка), DONE (Сформирован)'
          enum:
            - IN PROGRESS
            - ERROR
            - DONE
          example: 'IN PROGRESS'
        receiptLink:
          type: string
          pattern: '^[ -~]+$'
          maximum: 255
          description: 'Ссылка на чек' 
          example: 'https://lknpd-adp.gnivc.ru/api/v1/receipt/333393516178/22rwhid32h/print'
        error:
          description: 'Заполнена при статусе=ERROR'
          type: object
          properties:
            errorCode:
              description: 'код ошибки'
              type: string
              minimum: 1
              maximum: 30
              example: '1001'
            errorMessage:
              description: 'Описание ошибки'
              type: string
              minimum: 1
              maximum: 255
              example: 'Ошибка при формировании чека'
            
      additionalProperties: false  
    actualSmartContractWithEvents:
      type: object
      description: 'Структура с параметрами сделки (смарт-контракта) и событиями'
      properties:
        id:
          $ref: '#/components/schemas/id'
        title:
          $ref: '#/components/schemas/smartContractTitle'
        expiryDate:
          $ref: '#/components/schemas/expiryDate'
        status:
          $ref: '#/components/schemas/statusSmartContracts'
        beneficiaryId:
          $ref: '#/components/schemas/id'
        obligations:
          $ref: "#/components/schemas/obligations"
        currency:
          $ref: "#/components/schemas/currency"
        pending:
          $ref: "#/components/schemas/pending"
        events:
          type: array
          maxItems: 20
          description: 'Cобытия по сделке (смарт-контракту): транзакции, холдирование, расхолдирование'
          items:
            $ref: '#/components/schemas/eventSmartContract'
      additionalProperties: false
    receiptCreate:
      type: object
      description: 'Структура запроса на создание чека для самозанятого'
      required:
        - receiptAmount
        - receiptName
        - receiptDate
        - selfEmployedData
        - beneficiaryId
      properties:
        receiptAmount:
          $ref: '#/components/schemas/amount'
        receiptName:
          description: 'Наименование товара'
          type: string 
          pattern: '^(?!.*--)[^<>#@&$’*]+$'
          maximum: 1024
          example: 'Оказанная услуга'
        receiptDate:
          description: 'Дата запроса на формирование чека'
          format: date
          example: '2025-05-25'
        beneficiaryId:
          type: string
          format: uuid
          pattern: '^[0-9a-fA-F-]{36}$'
          description: 'Идентификатор бенефициара номинального счета - плательщика'
          example: '99ee301b-8e06-4fd5-88d4-2ca5668294b1'
          #$ref: '#/components/schemas/beneficiaryId'
        selfEmployedData:
          $ref: '#/components/schemas/selfEmployedData'
      additionalProperties: false  
    selfEmployedData:
      oneOf:
        - $ref: '#/components/schemas/selfEmployedAccount'
        - $ref: '#/components/schemas/selfEmployedSBPB2C'
    selfEmployedAccount:
      type: object
      description: 'Реквизиты самозанятого (если платеж был проведен по номеру счета)'
      required:
        - inn
        - fullName
        - bankBIC
        - accountNumber
      properties:
        inn:
          type: string
          pattern: '^[0-9]{12}$'
          description: 'ИНН самозанятого'
          example: '774352898912'
        fullName:
          $ref: '#/components/schemas/fullNameSelfEmployed'
        bankBIC:
          description: БИК банка получателя
          type: string
          maxLength: 9
          pattern: "^[0-9]{9}$" 
        accountNumber:
          $ref: '#/components/schemas/basisAccountNumber'
      additionalProperties: false  
    selfEmployedSBPB2C:
      type: object
      description: 'Реквизиты самозанятого (если платеж был проведен по СБП В2С)'
      required:
        - inn
        - fullName
        - bankBIC
        - phone
      properties:
        inn:
          type: string
          pattern: '^[0-9]{12}$'
          description: 'ИНН самозанятого'
          example: '774352898912'
        fullName:
          $ref: '#/components/schemas/fullNameSelfEmployed'  
        bankBIC:
          description: БИК банка получателя
          type: string
          maxLength: 9
          pattern: "^[0-9]{9}$" 
        phone:
          $ref: '#/components/schemas/receiverPhone'
      additionalProperties: false
    fullNameSelfEmployed:
      type: object
      required:
        - lastName
        - firstName
      description: 'ФИО самозанятого'
      properties:  
        lastName:
          $ref: '#/components/schemas/surnameReceipt'
        firstName:
          $ref: '#/components/schemas/nameReceipt'
        middleName:
          $ref: '#/components/schemas/patronymicReceipt'
      additionalProperties: false   
    stepconfirmation:
      type: object
      description: 'Структура сделки (смарт-контракта)'
      required:
        - smartContractId
        - transactions
      properties:
        smartContractId:
          $ref: '#/components/schemas/id'
        transactions:
          type: array
          maxItems: 10
          description: 'Исполняемые на шаге транзакции'
          items:
            $ref: '#/components/schemas/transaction'
      additionalProperties: false
    transaction:
      type: object
      required:
        - transactionId
        - transactionType
        - payer
        - payee
        - amount
        - currency
        - purpose
      description: 'Перевод средств с номинального счета на р/с получателя'
      properties:
        transactionId:
          type: string
          format: uuid
          pattern: '^[0-9a-fA-F-]{36}$'
          description: 'Id транзакции'
          example: '65757ccd-410b-49a8-8e4e-99b51ab127ea'
        transactionType:
          type: string
          description: 'Тип транзакции'
          enum:
            - PAYMENT
            - FEE
            - TAX
            - INTERNAL
          example: 'PAYMENT'
        payer:
          $ref: '#/components/schemas/subjectPayerConfirmstep'
        payee:
          $ref: '#/components/schemas/subjectPayeeConfirmstep'
        amount:
          $ref: '#/components/schemas/amount'
        currency:
          $ref: '#/components/schemas/currency'
        purpose:
          $ref: '#/components/schemas/purpose'
        kvd:
          $ref: '#/components/schemas/kvd'
        validateSelfEmployed:
            $ref: '#/components/schemas/validateSelfEmployed'
        tax:
          $ref: '#/components/schemas/tax'
      additionalProperties: false

    tax:
      type: object
      description: налоговые реквизиты 
      required: 
        - taxPayerInn
        - tax_101
        - tax_104
        - tax_105
      properties:
        taxPayerInn:
          type: string
          pattern: '^[0-9]{12}$'
          description: 'ИНН самозанятого (налогоплательщика), будет указан в платежном документе разделе "ИНН Плательщика"'
          example: '774352898912'
        tax_101:
          type: string
          pattern: '^[0-9]{2}$'
          description: 'статус составителя расчетного документа (поле 101)'
          example: '01'
        tax_104:
          type: string
          pattern: '^[0-9]{20}$'
          description: 'код бюджетной классификации (поле 104)'
          example: '18201061201010000510'
        tax_105:
          type: string
          pattern: '^[0-9]{1,8}$'
          description: 'код ОКТМО (поле 105)'
          example: '60701000'
        tax_106:
          type: string
          pattern: '^([А-Я]{2}|0)$'
          description: 'основание налогового платежа (поле 106)'
          example: 'ТП'
        tax_107:
          type: string
          pattern: '(^([МС|КВ|ПЛ|ГД]{2})(\.{1})([0-9]{2})(\.{1})([0-9]{4}))$'
          description: 'налоговый период МС.03.2025 или КВ.02.2025, или ПЛ.02.2025 или ГД.00.2025 (поле 107)'
          example: 'МС.03.2025'
        tax_108:
          type: string
          pattern: '^[А-Я0-9]{1,15}$'
          description: 'номер налогового документа (поле 108)'
          example: 'ТР41797'
        tax_109:
          type: string
          pattern: '^20[0-9]{2}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$'
          description: 'дата налогового документа (поле 109)'
          example: '2025-04-15'
        #docType:
        #  type: string
        #  pattern: '^[А-Я0-9]{1,8}$'
        #  description: 'тип налогового документа (поле 110)'
        #  example: 'НС'
        tax_uin:
          type: string
          pattern: '^[0-9]{4,25}$'
          description: 'уникальный идентификатор налогового платежа'
          example: '18209997250163368008'
    purpose:
      type: string
      pattern: '^(?!.--)[^<>#@&$’—\u00A0]+$' 
      maxLength: 210
      description: 'Назначение платежа'
      example: 'Оплата по Договору поставки №23/04-2022 от 01.04.2022, включая НДС 20%'
    getPurpose:
      type: string
      #pattern: |
      #  ^(?!.--)[^<>#@&$’]+$
      maxLength: 210
      description: 'Назначение платежа'
      example: 'Оплата по Договору поставки №23/04-2022 от 01.04.2022, включая НДС 20%'  
    subjectPayerConfirmstep:
      oneOf:
        - $ref: '#/components/schemas/payerUL'
        - $ref: '#/components/schemas/payerIP'
        - $ref: '#/components/schemas/payerFL'
    payerUL:
      type: object
      required:
        - beneficiaryId
        - typeCode
        - orgName
        - inn
        - kpp
        - ogrn
      description: 'Реквизиты плательщика ЮЛ'
      properties:
        beneficiaryId:
          $ref: '#/components/schemas/id'
        typeCode:
          type: string
          pattern: '^UL$'
          default: 'UL'
          description: 'Тип участника UL'
          example: 'UL'
        orgName:
          $ref: '#/components/schemas/orgShortNameRu'
        inn:
          pattern: '^[0-9]{10}$'
          type: string
          description: 'ИНН ЮЛ'
          #minLength: 10
          example: '0743528989'
        kpp:
          $ref: '#/components/schemas/kpp'
        ogrn:
          type: string
          pattern: '^[0-9]{13}$'
          description: 'ОРГН'
          example: '1047796372711'
      additionalProperties: false
    payerIP:
      description: 'Реквизиты плательщика ИП'
      required:
        - beneficiaryId
        - typeCode
        - personName
        - inn
        - ogrnip
      type: object
      properties:
        beneficiaryId:
          $ref: '#/components/schemas/id'
        typeCode:
          type: string
          pattern: '^IP$'
          default: 'IP'
          description: 'Тип участника IP'
          example: 'IP'
        personName:
          type: string
          pattern: '^(?!.–)[^<>#@&$’]+$'
          maxLength: 250
          description: 'ФИО для платежа'
          example: 'И Кван Ё'
        orgName:
          $ref: '#/components/schemas/orgShortNameRuGet'
        inn:
          type: string
          pattern: '^[0-9]{12}$'
          description: 'ИНН ФЛ'
          #minLength: 12
          example: '774352898912'
        ogrnip:
          type: string
          pattern: '^3[0-9]{14}$'
          description: 'ОГРНИП'
          example: '304500116000157'
        snils:
          $ref: '#/components/schemas/snils'
      additionalProperties: false
    payerFL:
      required:
        - beneficiaryId
        - typeCode
        - personName
        - inn
      type: object
      description: 'Реквизиты плательщика ФЛ'
      properties:
        beneficiaryId:
          $ref: '#/components/schemas/id'
        typeCode:
          type: string
          pattern: '^FL$'
          default: 'FL'
          description: 'Тип участника FL'
          example: 'FL'
        personName:
          type: string
          pattern: '^(?!.–)[^<>#@&$’]+$'
          maxLength: 250
          description: 'ФИО для платежа'
          example: 'Коган-Константинопольский Константин Константинович'
        inn:
          type: string
          pattern: '^[0-9]{12}$'
          description: 'ИНН ФЛ'
          #minLength: 12
          example: '074352898912'
        snils:
          $ref: '#/components/schemas/snils'
      additionalProperties: false
    balance:
      type: object
      description: >-
        Детализированный баланс бенефициара.
        Свободный остаток рассчитывается как freeBalance = balance - obligations - pending - blocked - debt. Если debt > 0, то freeBalance может получиться отрицательным значением.
      properties:
        balance:
          type: integer
          minimum: 0
          maximum: 1000000000000
          description: 'Все деньги бенефициара на НС в копейках'
          example: 100100500
        obligations:
          type: integer
          minimum: 0
          maximum: 1000000000000
          description: 'Общий объем обязательств по сделке (смарт-контракту)  в копейках'
          example: 100500
        pending:
          type: integer
          minimum: 0
          maximum: 1000000000000
          description: 'Деньги, находящиеся в обработке банком при выводе средств (moneyback),  в копейках'
          example: 220030
        blocked:
          type: integer
          minimum: 0
          maximum: 1000000000000
          description: 'Деньги, заблокированные ССП, в копейках'
          example: 50000
        debt:
          type: integer
          minimum: 0
          maximum: 1000000000000
          description: 'Текущий долг перед ССП, в копейках'
          example: 0
      additionalProperties: false
    beneficiaryBalanceReport:
      type: object
      description: 'Выписка по балансу бенефициара за период'
      properties:
        startBalance:
          type: object
          description: 'Баланс на начало периода'
          properties:
            balance:
              type: integer
              minimum: 0
              maximum: 1000000000000
              description: 'Общий баланс бенефициара в начале периода в копейках'
              example: 100000
          additionalProperties: false
        endBalance:
          type: object
          description: 'Баланс бенефициара'
          properties:
            balance:
              type: integer
              minimum: 0
              maximum: 1000000000000
              description: 'Общий баланс бенефициара в конце периода в копейках'
              example: 200000
          additionalProperties: false
        totalCredit:
          type: integer
          minimum: 0
          maximum: 1000000000000
          description: 'Общее количество внесенных средств за период в копейках'
          example: 500000
        totalDebit:
          type: integer
          minimum: 0
          maximum: 1000000000000
          description: 'Общее количество выведенных средств за период в копейках'
          example: 400000
        events:
          type: array
          maxItems: 20
          description: 'События и их статусы. Массив отсортирован в порядке убывания editDate'
          items:
            $ref: '#/components/schemas/eventReport'
      additionalProperties: false
    beneficiaryState:
      type: object
      description: 'Актуальное состояние бенефициара: баланс и действующие сделки (смарт-контракты)'
      properties:
        beneficiaryId:
          $ref: '#/components/schemas/id'
        status:
          type: string
          pattern: '^[A-Za-z]{1,20}$'
          description: | 
            Статус бенефициара принимает одно из значений: 
            
              - CREATED (Создан), 
              - ACTIVATED (Активирован), 
              - TOCLOSE (Помечен к закрытию), 
              - DELETED (Исключен из реестра), 
              - BLOCKED (Заблокирован со стороны банка), 
              - ERROR (Ошибка)
          example: 'ACTIVATED'
        balance:
          $ref: '#/components/schemas/balance'
        smartContracts:
          type: array
          description: 'Список актуальных сделок (смарт-контрактов)'
          items:
            $ref: '#/components/schemas/actualSmartContract'
          maxItems: 20
        events:
          type: array
          description: 'События и их статусы'
          items:
            $ref: '#/components/schemas/event'
          maxItems: 20
      additionalProperties: false
    refundEvents:
      type: array
      description: 'Список событий возврата'
      items:
        $ref: '#/components/schemas/refundEvent'
      maxItems: 20
    #refundEventsOld:
    #  type: array
    #  description: 'Список событий возврата'
    #  items:
    #    $ref: '#/components/schemas/refundEventOld'
    #  maxItems: 20   
    
    event:
      type: object
      description: "Событие: транзакция, холдирование, расхолдирование и т.д."
      required:
        - eventId
        - eventType
        - eventValue
        - createDate
      properties:
        eventId:
          $ref: '#/components/schemas/id'
        smartContractId:
          $ref: '#/components/schemas/id'
        eventType:
          type: string
          pattern: '^[A-Za-z]{1,20}$'
          description: 'Тип события может принять одно из значений: "CREDIT", "DEBIT", "HOLD", "UNHOLD"'
          example: 'DEBIT'
        eventValue:
          type: string
          pattern: '^[A-Za-z]{1,20}$'
          description: | 
            Значение события, обычно является его статусом.

            Может принять одно из значений: 
              - "CREATED (Создан)", 
              - "PENDING (В процессе)", 
              - "DONE (Исполнен)", 
              - "ERROR (Ошибка)"
          example: 'DONE'
        errorMessage:
          $ref: '#/components/schemas/errorMessage'
        docNumber:
          type: string
          maxLength: 32
          #pattern: '^[0-9]{1,32}$'
          description: номер платежного поручения
          example: '145578'
        executionDate:
          type: string
          format: date-time
          description: 'Дата обработки операции'
          example: '2025-03-15T00:00:00.999Z'          
        operationId:
          type: string
          description: 'Идентификатор операции'
          example: '12345678901234567890123456789012'
          maxLength: 255
        amount:
          $ref: '#/components/schemas/amount'
        purpose:
          $ref: '#/components/schemas/getPurpose'
        payee:
          $ref: '#/components/schemas/subjectPayeeEvent'
        createDate:
          type: string
          format: date-time
          description: 'Время создания события'
          example: '2025-03-15T23:31:00.999Z'
        editDate:
          type: string
          format: date-time
          description: 'Время изменения статуса события'
          example: '2025-03-15T23:31:00.999Z'
      additionalProperties: false  
    eventSmartContract:
      type: object
      description: "Событие: транзакция, холдирование, расхолдирование и т.д."
      required:
        - eventId
        - eventType
        - eventValue
        - createDate
      properties:
        eventId:
          $ref: '#/components/schemas/id'
        smartContractId:
          $ref: '#/components/schemas/id'
        eventType:
          type: string
          pattern: '^[A-Za-z]{1,20}$'
          description: 'Тип события может принять одно из значений: "CREDIT", "DEBIT", "HOLD", "UNHOLD"'
          example: 'DEBIT'
        eventValue:
          type: string
          pattern: '^[A-Za-z]{1,20}$'
          description: | 
            Значение события, обычно является его статусом.

            Может принять одно из значений: 
              - "CREATED (Создан)", 
              - "PENDING (В процессе)", 
              - "DONE (Исполнен)", 
              - "ERROR (Ошибка)"
          example: 'DONE'
        errorMessage:
          $ref: '#/components/schemas/errorMessage'
        docNumber:
          type: string
          maxLength: 32
          #pattern: '^[0-9]{1,32}$'
          description: номер платежного поручения
          example: '145578'
        executionDate:
          type: string
          format: date-time
          description: 'Дата обработки операции'
          example: '2025-03-15T00:00:00.999Z'          
        operationId:
          type: string
          description: 'Идентификатор операции'
          example: '12345678901234567890123456789012'
          maxLength: 255
        amount:
          $ref: '#/components/schemas/amount'
        purpose:
          $ref: '#/components/schemas/purpose'
        payee:
          $ref: '#/components/schemas/subjectPayeeEvent'
        createDate:
          type: string
          format: date-time
          description: 'Время создания события'
          example: '2025-03-15T23:31:00.999Z'
        editDate:
          type: string
          format: date-time
          description: 'Время изменения статуса события'
          example: '2025-03-15T23:31:00.999Z'
      additionalProperties: false    
    eventReport:
      type: object
      description: "Событие: транзакция, холдирование, расхолдирование и т.д."
      required:
        - eventId
        - eventType
        - eventValue
        - createDate
      properties:
        eventId:
          $ref: '#/components/schemas/id'
        smartContractId:
          $ref: '#/components/schemas/id'
        eventType:
          type: string
          pattern: '^[A-Za-z]{1,20}$'
          description: 'Тип события может принять одно из значений: "CREDIT", "DEBIT", "HOLD", "UNHOLD"'
          example: 'DEBIT'
        eventValue:
          type: string
          pattern: '^[A-Za-z]{1,20}$'
          description: | 
            Значение события, обычно является его статусом.

            Может принять только значение: 
              - "DONE (Исполнен)"
          example: 'DONE'
        docNumber:
          type: string
          maxLength: 32
          #pattern: '^[0-9]{1,32}$'
          description: номер платежного поручения
          example: '145578'
        executionDate:
          type: string
          format: date-time
          description: 'Дата обработки операции'
          example: '2025-03-15T00:00:00.999Z'          
        operationId:
          type: string
          description: 'Идентификатор операции'
          example: '12345678901234567890123456789012'
          maxLength: 255
        amount:
          $ref: '#/components/schemas/amount'
        purpose:
          $ref: '#/components/schemas/getPurpose'
        payee:
          $ref: '#/components/schemas/subjectPayeeEvent'
        createDate:
          type: string
          format: date-time
          description: 'Время создания события'
          example: '2025-03-15T23:31:00.999Z'
        editDate:
          type: string
          format: date-time
          description: 'Время изменения статуса события'
          example: '2025-03-15T23:31:00.999Z'
      additionalProperties: false    
    beneficiaryEvent:
      type: object
      required:
        - eventId
        - eventType
        - eventValue
        - createDate
      description: 'Событие, определяющее статус бенефициара'
      properties:
        eventId:
          $ref: '#/components/schemas/id'
        eventType:
          type: string
          pattern: '^[A-Za-z]{1,20}$'
          description: 'Тип события CREATE, UPDATE, DELETE, BLOCK, UNBLOCK, BANKRUPT'
          example: 'CREATE'
        eventValue:
          type: string
          pattern: '^[A-Za-z]{1,20}$'
          description: 'Статус события CREATED (Создан), PENDING (В процессе), ACTIVATED (Активирован), BLOCKED (Заблокирован), DELETED (Удален), ERROR (Ошибка), DONE (Исполнен)'
          example: 'CREATED'
        errorMessage:
          $ref: '#/components/schemas/errorMessageBen'
        createDate:
          type: string
          format: date-time
          description: 'Время создания события'
          example: '2022-03-15T23:31:00.999Z'
        editDate:
          type: string
          format: date-time
          description: 'Время изменения статуса события'
          example: '2022-03-15T23:31:00.999Z'
      additionalProperties: false
    refundEvent:
      type: object
      description: 'Событие возврата'
      required:
        - beneficiaryId
        - primaryTransactionId
        - refundTransaction
      properties:
        beneficiaryId:
          $ref: '#/components/schemas/id'
        primaryTransactionId:
          $ref: '#/components/schemas/id'
        refundTransaction:
          $ref: '#/components/schemas/refundTransactions'
      additionalProperties: false  
  #  refundEventOld:
  #    type: object
  #    description: 'Событие возврата'
  #    required:
  #      - refundTransactionId
  #      - beneficiaryId
  #      - primaryTransactionId
  #      - createDate
  #      - refundPurpose
  #    properties:
  #      beneficiaryId:
  #        $ref: '#/components/schemas/id'
  #      refundTransactionId:
  #        $ref: '#/components/schemas/id'
  #      primaryTransactionId:
  #        $ref: '#/components/schemas/id'
  #      createDate:
  #        type: string
  #        format: date-time
  #        description: Время создания события
  #        example: '2022-03-15T23:31:00.999Z'
  #      refundPurpose:
  #        $ref: '#/components/schemas/purpose'
  #    additionalProperties: false  
    refundTransactions:
      type: object
      description: 'Транзакция возврата'
      required:
        - id
        - createDate
        - amount
        - purpose
      properties:
        id:
          $ref: '#/components/schemas/id'
        createDate:
          type: string
          format: date-time
          description: Время создания события
          example: '2022-03-15T23:31:00.999Z'
        purpose:
          $ref: '#/components/schemas/getPurpose'
        amount:
          $ref: '#/components/schemas/amount'  
        docNumber:
          $ref: '#/components/schemas/docNumber'  
        operationId:
          $ref: '#/components/schemas/operationId'  
      additionalProperties: false    
    amount:
      type: integer
      minimum: 0
      maximum: 100000000000
      description: 'Cумма средств в копейках'
      example: 20100
    amountQR:
      type: integer
      minimum: 1
      maximum: 100000000
      description: 'Cумма средств в копейках'
      example: 10000000 
    obligations:
      type: integer
      minimum: 0
      maximum: 100000000000
      description: 'Cумма средств в копейках'
      example: 2019900
    pending:
      type: integer
      minimum: 0
      maximum: 1000000000000
      description: 'Средства, находящиеся в обработке платежа банком, в копейках'
      example: 220030
    currency:
      type: string
      enum:
        - RUB
        - RUR
      description: 'Валюта'
      example: 'RUB'
    agreement:
      type: string
      enum:
        - 'Клиент подтверждает, что операция совершается в соответствии с условиями Договора номинального счета'
      description: 'Соглашение'
      example: 'Клиент подтверждает, что операция совершается в соответствии с условиями Договора номинального счета'
    signature:
      type: string
      pattern: '^[A-Za-z0-9+/=]+$'
      maxLength: 16000
      description: 'Подпись над content'
      example: "MIIN9gYJKoZIhvcNAQcCoIIN5zCCDeMCAQExDDAKBggqhQMHAQECAjALBgkqhkiG9w0BBwGgggpKMIIFHDCCBMmgAwIBAgIQOyCK5f1GaIZJoFD6r6iDkzAKBggqhQMHAQEDAjCCAQoxGDAWBgUqhQNkARINMTIzNDU2Nzg5MDEyMzEaMBgGCCqFAwOBAwEBEgwwMDEyMzQ1Njc4OTAxLzAtBgNVBAkMJtGD0LsuINCh0YPRidGR0LLRgdC60LjQuSDQstCw0Lsg0LQuIDE4MQswCQYDVQQGEwJSVTEZMBcGA1UECAwQ0LMuINCc0L7RgdC60LLQsDEVMBMGA1UEBwwM0JzQvtGB0LrQstCwMSUwIwYDVQQKDBzQntCe0J4gItCa0KDQmNCf0KLQni3Qn9Cg0J4iMTswOQYDVQQDDDLQotC10YHRgtC+0LLRi9C5INCj0KYg0J7QntCeICLQmtCg0JjQn9Ci0J4t0J/QoNCeIjAeFw0xODA5MTIxMDE5MzBaFw0yMzA5MTIxMDI4NTVaMIIBCjEYMBYGBSqFA2QBEg0xMjM0NTY3ODkwMTIzMRowGAYIKoUDA4EDAQESDDAwMTIzNDU2Nzg5MDEvMC0GA1UECQwm0YPQuy4g0KHRg9GJ0ZHQstGB0LrQuNC5INCy0LDQuyDQtC4gMTgxCzAJBgNVBAYTAlJVMRkwFwYDVQQIDBDQsy4g0JzQvtGB0LrQstCwMRUwEwYDVQQHDAzQnNC+0YHQutCy0LAxJTAjBgNVBAoMHNCe0J7QniAi0JrQoNCY0J/QotCeLdCf0KDQniIxOzA5BgNVBAMMMtCi0LXRgdGC0L7QstGL0Lkg0KPQpiDQntCe0J4gItCa0KDQmNCf0KLQni3Qn9Cg0J4iMGYwHwYIKoUDBwEBAQEwEwYHKoUDAgIjAQYIKoUDBwEBAgIDQwAEQJgf/alQzSGGMPRZBnKp1j1rwDOCBkY349whSrH4n7dW7KUttYGHtp3CLt/9CTNTnBgyrNdCLgml9DajpcHSIvCjggH+MIIB+jA2BgUqhQNkbwQtDCsi0JrRgNC40L/RgtC+0J/RgNC+IENTUCIgKNCy0LXRgNGB0LjRjyA0LjApMIIBIQYFKoUDZHAEggEWMIIBEgwrItCa0YDQuNC/0YLQvtCf0YDQviBDU1AiICjQstC10YDRgdC40Y8gNC4wKQxB0KPQtNC+0YHRgtC+0LLQtdGA0Y/RjtGJ0LjQuSDRhtC10L3RgtGAICLQmtGA0LjQv9GC0L7Qn9GA0L4g0KPQpiIMT9Ch0LXRgNGC0LjRhNC40LrQsNGCINGB0L7QvtGC0LLQtdGC0YHRgtCy0LjRjyDihJYg0KHQpC8wMDAtMDAwMCDQvtGCIDAwLjAwLjAwMDAMT9Ch0LXRgNGC0LjRhNC40LrQsNGCINGB0L7QvtGC0LLQtdGC0YHRgtCy0LjRjyDihJYg0KHQpC8wMDAtMDAwMCDQvtGCIDAwLjAwLjAwMDAwCwYDVR0PBAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFJuFXvuB3E1ZB1Fjz77f2ix/yUQ8MBIGCSsGAQQBgjcVAQQFAgMBAAEwJQYDVR0gBB4wHDAIBgYqhQNkcQEwCAYGKoUDZHECMAYGBFUdIAAwIwYJKwYBBAGCNxUCBBYEFMjaZsu2l9I+yWcdwltkOqvcu89pMAoGCCqFAwcBAQMCA0EAPpXN2B+VvQmrc4L1BODyZhIygpsrA8xLwLNz+OcN1r2DyCctAcHs72VdrHf93dqdBOK/6AJ/hzYbz6x6KJwh/jCCBSYwggTToAMCAQICE3wAA9tSn+fyWo8tD/sAAQAD21IwCgYIKoUDBwEBAwIwggEKMRgwFgYFKoUDZAESDTEyMzQ1Njc4OTAxMjMxGjAYBggqhQMDgQMBARIMMDAxMjM0NTY3ODkwMS8wLQYDVQQJDCbRg9C7LiDQodGD0YnRkdCy0YHQutC40Lkg0LLQsNC7INC0LiAxODELMAkGA1UEBhMCUlUxGTAXBgNVBAgMENCzLiDQnNC+0YHQutCy0LAxFTATBgNVBAcMDNCc0L7RgdC60LLQsDElMCMGA1UECgwc0J7QntCeICLQmtCg0JjQn9Ci0J4t0J/QoNCeIjE7MDkGA1UEAwwy0KLQtdGB0YLQvtCy0YvQuSDQo9CmINCe0J7QniAi0JrQoNCY0J/QotCeLdCf0KDQniIwHhcNMjExMDAxMTQyNTMxWhcNMjIwMTAxMTQzNTMxWjCBtjEYMBYGCCqFAwOBAwEBEgo2MTY1MTczNDA4MSAwHgYJKoZIhvcNAQkBFhFpaWNvbWV0YUB0ZWN0LmNvbTEvMC0GA1UEAwwm0JrQvtC80LXRgtCwINCY0LLQsNC9INCY0LLQsNC90L7QstC40YcxFTATBgNVBAoMDNCa0L7QvNC10YLQsDEjMCEGA1UEBwwa0KDQvtGB0YLQvtCyLdC90LAt0JTQvtC90YMxCzAJBgNVBAYTAlJVMGYwHwYIKoUDBwEBAQEwEwYHKoUDAgIkAAYIKoUDBwEBAgIDQwAEQFnrKMdW+QUgH8484b8cVBr3LQmikew2ZWUnfXpFzNi0yEfh/JM/autCt/YhmX9bAkYH86jCHq6J2RMk5VRJOPyjggJaMIICVjAPBgNVHQ8BAf8EBQMDB/AAMBMGA1UdJQQMMAoGCCsGAQUFBwMCMB0GA1UdDgQWBBR+BEDU3Eo8o2VJC0hT3Pi7FmBArTAfBgNVHSMEGDAWgBSbhV77gdxNWQdRY8++39osf8lEPDCCAQ8GA1UdHwSCAQYwggECMIH/oIH8oIH5hoG1aHR0cDovL3Rlc3Rnb3N0MjAxMi5jcnlwdG9wcm8ucnUvQ2VydEVucm9sbC8hMDQyMiEwNDM1ITA0NDEhMDQ0MiEwNDNlITA0MzIhMDQ0YiEwNDM5JTIwITA0MjMhMDQyNiUyMCEwNDFlITA0MWUhMDQxZSUyMCEwMDIyITA0MWEhMDQyMCEwNDE4ITA0MWYhMDQyMiEwNDFlLSEwNDFmITA0MjAhMDQxZSEwMDIyKDEpLmNybIY/aHR0cDovL3Rlc3Rnb3N0MjAxMi5jcnlwdG9wcm8ucnUvQ2VydEVucm9sbC90ZXN0Z29zdDIwMTIoMSkuY3JsMIHaBggrBgEFBQcBAQSBzTCByjBEBggrBgEFBQcwAoY4aHR0cDovL3Rlc3Rnb3N0MjAxMi5jcnlwdG9wcm8ucnUvQ2VydEVucm9sbC9yb290MjAxOC5jcnQwPwYIKwYBBQUHMAGGM2h0dHA6Ly90ZXN0Z29zdDIwMTIuY3J5cHRvcHJvLnJ1L29jc3AyMDEyZy9vY3NwLnNyZjBBBggrBgEFBQcwAYY1aHR0cDovL3Rlc3Rnb3N0MjAxMi5jcnlwdG9wcm8ucnUvb2NzcDIwMTJnc3Qvb2NzcC5zcmYwCgYIKoUDBwEBAwIDQQA2aueOfec/1xFA/NOfciGpRGYPr06YaDfZRdx0jbiU2fubJgSjB/MvZMsrOrIPGSK9DBN9pk/cOqDQ3f20TottMYIDczCCA28CAQEwggEjMIIBCjEYMBYGBSqFA2QBEg0xMjM0NTY3ODkwMTIzMRowGAYIKoUDA4EDAQESDDAwMTIzNDU2Nzg5MDEvMC0GA1UECQwm0YPQuy4g0KHRg9GJ0ZHQstGB0LrQuNC5INCy0LDQuyDQtC4gMTgxCzAJBgNVBAYTAlJVMRkwFwYDVQQIDBDQsy4g0JzQvtGB0LrQstCwMRUwEwYDVQQHDAzQnNC+0YHQutCy0LAxJTAjBgNVBAoMHNCe0J7QniAi0JrQoNCY0J/QotCeLdCf0KDQniIxOzA5BgNVBAMMMtCi0LXRgdGC0L7QstGL0Lkg0KPQpiDQntCe0J4gItCa0KDQmNCf0KLQni3Qn9Cg0J4iAhN8AAPbUp/n8lqPLQ/7AAEAA9tSMAoGCCqFAwcBAQICoIIB5zAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0yMTEwMDExNDU4MjZaMC8GCSqGSIb3DQEJBDEiBCA/U5ohPpfIAswinUdMaqMqglo2CyqTOpSf2SUgjZzhuzCCAXoGCyqGSIb3DQEJEAIvMYIBaTCCAWUwggFhMIIBXTAKBggqhQMHAQECAgQg1wk0diRGLZG+oWXUM8cCdDszaDCKQ5onnGCp3uNcAnIwggErMIIBEqSCAQ4wggEKMRgwFgYFKoUDZAESDTEyMzQ1Njc4OTAxMjMxGjAYBggqhQMDgQMBARIMMDAxMjM0NTY3ODkwMS8wLQYDVQQJDCbRg9C7LiDQodGD0YnRkdCy0YHQutC40Lkg0LLQsNC7INC0LiAxODELMAkGA1UEBhMCUlUxGTAXBgNVBAgMENCzLiDQnNC+0YHQutCy0LAxFTATBgNVBAcMDNCc0L7RgdC60LLQsDElMCMGA1UECgwc0J7QntCeICLQmtCg0JjQn9Ci0J4t0J/QoNCeIjE7MDkGA1UEAwwy0KLQtdGB0YLQvtCy0YvQuSDQo9CmINCe0J7QniAi0JrQoNCY0J/QotCeLdCf0KDQniICE3wAA9tSn+fyWo8tD/sAAQAD21IwCgYIKoUDBwEBAQEEQCS2z4wN+cZlvy+49XUpf/K6pO2T/In+4PSC6xO0zJLGpiWIvbijHwaiZ8CpWu7/GlN++fWzkai7lAd4E0g4Qis="
    error:
      type: object
      required:
        - httpCode
        - httpMessage
        - moreInformation
      description: 'Сообщение об ошибке'
      properties:
        httpCode:
          pattern: '^[0-9]{3}$'
          type: string
          description: 'Код ошибки'
          example: '400'
        httpMessage:
          type: string
          pattern: "^[0-9a-zA-Z '.-]+$"
          maxLength: 50
          description: 'Описание ошибки'
          example: 'Error description'
        moreInformation:
          type: string
          pattern: '^[0-9a-zA-ZА-ЯЁа-яё.,@№^)(}{$|\s:_!=?/-]*$'
          maxLength: 254
          description: 'Дополнительная информация об ошибке'
          example: 'Error details'
      additionalProperties: false
    errorMessage:
      type: string
      pattern: '^[0-9а-яёА-ЯЁa-zA-Z._ @()/\№,]+$'
      maxLength: 254
      description: 'Сообщение об ошибке'
      example: 'Доступных средств у бенефициара недостаточно'
    errorMessageBen:
      type: string
      pattern: '^[0-9а-яёА-ЯЁa-zA-Z._ @()/\№,]+$'
      maxLength: 254
      description: 'Сообщение об ошибке'
      example: 'Внутренняя ошибка сервиса'  
    errorSberBusinessAPIBadGateway:
      description: 'Схема ответа канала SberBusinessAPI. Информационное сообщение об ошибке, сбое или предупреждение.'
      type: object
      properties:
        internalErrorCode:
          description: 'Внутренний код, указывающий на место возникновения ошибки.'
          type: string
          minLength: 1
          example: '235.4-1005'
          x-field-extra-annotation: "@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL)"
        cause:
          type: string
          description: 'Причина или основание сообщения.'
          example: 'BAD_GATEWAY'
        referenceId:
          type: string
          format: uuid
          description: 'Уникальный идентификатор ошибки.'
          example: '22a6dd81-103a-4d3a-8e9b-0ba4b527f5f6'
        message:
          type: string
          description: 'Сообщение об ошибке.'
          example: 'При выполнении операции произошла ошибка. Мы уже работаем над её устранением. Повторите попытку позже.'  
      additionalProperties: false    
    errorSberBusinessAPIInternalServerError:
      description: 'Схема ответа канала SberBusinessAPI. Информационное сообщение об ошибке, сбое или предупреждение.'
      type: object
      properties:
        internalErrorCode:
          description: 'Внутренний код, указывающий на место возникновения ошибки.'
          type: string
          minLength: 1
          example: '234.1-1005'
          x-field-extra-annotation: "@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL)"
        cause:
          type: string
          description: 'Причина или основание сообщения.'
          example: 'UNKNOWN_EXCEPTION'
        referenceId:
          type: string
          format: uuid
          description: 'Уникальный идентификатор ошибки.'
          example: '22a6dd81-103a-4d3a-8e9b-0ba4b527f5f6'
        message:
          type: string
          description: 'Сообщение об ошибке.'
          example: 'При выполнении операции произошла ошибка. Мы уже работаем над её устранением. Повторите попытку позже.'  
      additionalProperties: false  
    errorSberBusinessAPITooManyRequests:
      description: 'Схема ответа канала SberBusinessAPI. Информационное сообщение об ошибке, сбое или предупреждение.'
      type: object
      properties:
        internalErrorCode:
          description: 'Внутренний код, указывающий на место возникновения ошибки.'
          type: string
          minLength: 1
          example: '234.1-1004'
          x-field-extra-annotation: "@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL)"
        cause:
          type: string
          description: 'Причина или основание сообщения.'
          example: 'TOO_MANY_REQUESTS'
        referenceId:
          type: string
          format: uuid
          description: 'Уникальный идентификатор ошибки.'
          example: '22a6dd81-103a-4d3a-8e9b-0ba4b527f5f6'
        message:
          type: string
          description: 'Сообщение об ошибке.'
          example: 'Превышен лимит запросов. Повторите операцию позже.'  
      additionalProperties: false   
    errorSberBusinessAPIUnprocessableEntity:
      description: 'Схема ответа канала SberBusinessAPI. Информационное сообщение об ошибке, сбое или предупреждение.'
      type: object
      properties:
        internalErrorCode:
          description: 'Внутренний код, указывающий на место возникновения ошибки.'
          type: string
          minLength: 1
          example: '256.2-1000'
          x-field-extra-annotation: "@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL)"
        cause:
          type: string
          description: 'Причина или основание сообщения.'
          example: 'UNPROCESSABLE_ENTITY'
        referenceId:
          type: string
          format: uuid
          description: 'Уникальный идентификатор ошибки.'
          example: '22a6dd81-103a-4d3a-8e9b-0ba4b527f5f6'
        message:
          type: string
          description: 'Сообщение об ошибке.'
          example: 'Ошибка валидации'  
      additionalProperties: false  
    errorSberBusinessAPIUnauthorized:
      description: 'Схема ответа канала SberBusinessAPI. Информационное сообщение об ошибке, сбое или предупреждение.'
      type: object
      properties:
        internalErrorCode:
          description: 'Внутренний код, указывающий на место возникновения ошибки.'
          type: string
          minLength: 1
          example: '234.1-1003'
          x-field-extra-annotation: "@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL)"
        cause:
          type: string
          description: 'Причина или основание сообщения.'
          example: 'UNAUTHORIZED'
        referenceId:
          type: string
          format: uuid
          description: 'Уникальный идентификатор ошибки.'
          example: '22a6dd81-103a-4d3a-8e9b-0ba4b527f5f6'
        message:
          type: string
          description: 'Сообщение об ошибке.'
          example: 'Ошибка авторизации по Access Token 3513f959-bbd5-490a-9f9f-67fb7380fae5-2'  
      additionalProperties: false      
    errorSberBusinessAPIForbidden:
      description: 'Схема ответа канала SberBusinessAPI. Информационное сообщение об ошибке, сбое или предупреждение.'
      type: object
      properties:
        internalErrorCode:
          description: 'Внутренний код, указывающий на место возникновения ошибки.'
          type: string
          minLength: 1
          example: '235.1-1003'
          x-field-extra-annotation: "@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL)"
        cause:
          type: string
          description: 'Причина или основание сообщения.'
          example: 'CERTIFICATE_ACCESS_EXCEPTION'
        referenceId:
          type: string
          format: uuid
          description: 'Уникальный идентификатор ошибки.'
          example: '22a6dd81-103a-4d3a-8e9b-0ba4b527f5f6'
        message:
          type: string
          description: 'Сообщение об ошибке.'
          example: 'Сертификат (serialNumber = 51E75203172EFD920FAAD907ABA40448668B9210) из входящего запроса не найден в белом списке сертификатов, не истекших на момент проверки'   
      additionalProperties: false    
    errorSberBusinessAPIBadRequest:
      description: 'Схема ответа канала SberBusinessAPI. Данные не соответствуют требованиям валидации. Сведения о некорректных атрибутах request содержатся в массивах fieldNames и checks. Подробные требования к атрибутам описаны в request ресурса, включая типы, форматы и регулярные выражения. Необходимо скорректировать заполнение атрибутов и повторить запрос.'
      type: object
      properties:
        internalErrorCode:
          description: 'Внутренний код, указывающий на место возникновения ошибки.'
          type: string
          minLength: 1
          example: '241.1-1000'
          x-field-extra-annotation: "@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL)"
        cause:
          type: string
          description: 'Причина ошибки.'
          example: 'DESERIALIZATION_FAULT'
        referenceId:
          type: string
          format: uuid
          description: 'Уникальный идентификатор ошибки.'
          example: 'd1bdba36-d0b5-96c9-88ef-44083cf88ef2'
        message:
          type: string
          description: 'Сообщение об ошибке.'
          example: 'Неверный формат запроса'
        checks:
          type: array
          maxItems: 200
          items:
            $ref: '#/components/schemas/Check'
          description: 'Список проверок, приведших к ошибке.'
        fieldNames:
          description: 'Названия полей с некорректным значением.'
          type: array
          maxItems: 200
          items:
            type: string
            example: 'fileIds[0]'
      additionalProperties: false      
    Check:
      description: 'Результат проверки.'
      type: object
      properties:
        level:
          $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
          description: 'Сообщение об ошибке.'
          example: 'Cannot deserialize value of type java.util.UUID from String \"6f5186a3-f40e-4694-b7b7-86433d342649q\": UUID has to be represented by standard 36-char representation'
        fields:
          type: array
          maxItems: 200
          description: 'Названия полей (при наличии связи с моделью).'
          items:
            type: string
            example: 'fileIds[0]'   
      additionalProperties: false      
    ErrorCode:
      description: 'Уровень результата. Возможные результаты - ERROR, WARNING.'
      example: 'ERROR'
      type: string
      maxLength: 20
      enum:
        - ERROR
        - WARNING   
    bankListSBPresp:
      type: object
      properties:
        banks:
          description: Список банков-получателей
          type: array
          maxItems: 500
          items:
            type: object
            description: реквизиты банка
            required:
              - agentId
              - bankBIC
              - bankName
            properties:
              agentId:
                description: Иденификатор банка в СБП
                type: string
                pattern: '^(?!.*--)[^<>#@&$’*]+$'
                minLength: 0
                maxLength: 12
                example: 123456789123
              bankBIC:
                description: БИК банка
                type: string
                pattern: '^[0-9]{9}$'
                minLength: 0
                maxLength: 9
                example: 046015602
              bankName:
                description: Наименование банка
                pattern: '^(?!.*--)[^<>#@&$’*]+$'
                type: string
                minLength: 0
                maxLength: 50
                example: Альфа-банк
      additionalProperties: false 
    executeSBPreq:
        type: object
        description: "Реквизиты запроса для исполения платежа в СБП В2С"
        required:
          - beneficiaryId
          - smartContractId
          - transactions
        properties:
          beneficiaryId:
            $ref: '#/components/schemas/id'
          smartContractId:
            $ref: '#/components/schemas/id'
          transactions:
            type: array
            maxItems: 10
            description: 'Исполняемые на шаге транзакции'
            items:
              $ref: '#/components/schemas/transactionSBP'  
        additionalProperties: false  
    transactionSBP:
        type: object
        description: "Реквизиты транзакции для исполения платежа в СБП В2С"
        required:
          - transactionId
          - amount
          - currency
          - payee
        properties:
          transactionId:
            $ref: '#/components/schemas/id'
          amount:
            $ref: '#/components/schemas/amount'
          currency:
            $ref: '#/components/schemas/currency'  
          kvd:
            $ref: '#/components/schemas/kvd'  
          comment:
            description: "Сообщение получателю"
            type: string
            pattern: '^(?!.--)[^<>#@&$’—\u00A0]+$'
            maxLength: 140
            example: "прочий перевод"  
          validateSelfEmployed:
            $ref: '#/components/schemas/validateSelfEmployed'
          payee:
            $ref: '#/components/schemas/subjectPayeeConfirmstepSBP'
        additionalProperties: false   
    validateSelfEmployed:
      type: boolean
      description: 'Выполнить проверку самозанятого (только для получателя ФЛ)'
      example: false 
    subjectPayeeConfirmstepSBP:
      type: object
      required:
        - phone
        - bankBIC
      description: 'Общий набор данные для ФЛ'
      properties:
        phone:
          $ref: '#/components/schemas/receiverPhone'
        bankBIC:
          description: БИК банка получателя
          type: string
          maxLength: 9
          pattern: "^[0-9]{9}$" 
        fullNameForCheck:
          $ref: '#/components/schemas/fullNameForCheck'  
        inn:
          type: string
          pattern: '^[0-9]{12}$'
          description: 'ИНН ФЛ'
          example: '074352898912'
      additionalProperties: false  
    fullNameForCheck:
      type: object
      required:
        - lastName
        - firstName
      description: 'Общий набор данных для проверки ФИО получателя из запроса с ФИО получателя из НСПК (если объект fullNameForCheck заполнен - осуществлять проверку ФИО, если объект fullNameForCheck не заполнен - не осуществлять проверку ФИО)'
      properties:  
        lastName:
          $ref: '#/components/schemas/surnameReceipt'
        firstName:
          $ref: '#/components/schemas/nameReceipt'
        middleName:
          $ref: '#/components/schemas/patronymicReceipt'
      additionalProperties: false
    kvd:
      description: "Код вида дохода"
      type: string
      pattern: "^[1-5]$"
      example: "1"
    createOrderC2Breq:
      type: object
      description: "Реквизиты запроса для создания и регистрации заказа в рамках интернет-эквайринга"
      required:
        - userName
        - password
        - orderNumber
        - beneficiaryId
        - amount
        - currency
        - returnUrl
      properties:
        userName:
          $ref: '#/components/schemas/userNameSBPC2B'
        password:
          $ref: '#/components/schemas/passwordSBPC2B'
        orderNumber:
          $ref: '#/components/schemas/orderNumberSBPC2B'
        beneficiaryId:
          $ref: '#/components/schemas/id'
        amount:
          $ref: '#/components/schemas/amount'  
        currency:
          $ref: '#/components/schemas/currency'  
        returnUrl:
          $ref: '#/components/schemas/returnUrlSBPC2B'
        failUrl:
          $ref: '#/components/schemas/failUrlSBPC2B'
        createBindingId:
          $ref: '#/components/schemas/clientIdSBPC2B'
        bindingId:
          $ref: '#/components/schemas/id'
        features:
          $ref: '#/components/schemas/features'
        phone:
          description: "Номер телефона Плательщика. Если в телефон включён код страны, номер должен начинаться со знака плюс («+»). Если телефон передаётся без знака плюс («+»), то код страны указывать не следует. В случае использования фискализации обязателен для передачи в формате +79998887700, при отсутствии номера телефона обязателен email"
          type: string
          example: "+79998887700"
          maxLength: 16
          minLength: 1
          pattern: '^(\+?)\d{7,15}$' 
        email:
          description: "Адрес электронной почты Плательщика. В случае использования фискализации обязателен, при отсутствии phone."
          type: string
          format: email
          example: "+info@your-company.ru"
          maxLength: 128
          minLength: 3
      additionalProperties: false
    userNameSBPC2B:
      description: "Логин Партнера, полученный при подключении к ПШ"
      type: string
      example: "test"
      maxLength: 30
      minLength: 1
      pattern: '^[A-Za-z0-9-_ ]+$'  
    passwordSBPC2B:
      description: "Пароль Партнера, полученный при подключении к ПШ"
      type: string
      example: "test"
      maxLength: 36
      minLength: 1
      pattern: '^[ -~]+$'
    orderNumberSBPC2B:
      description: "Уникальный номер (идентификатор) заказа в системе Партнера"
      type: string
      example: "e2574f1785324f1592d9029cb05adbbd"
      maxLength: 36
      minLength: 1
      pattern: '^[ -~А-Яа-яЁёA-Za-z0-9-_№]*$'
    returnUrlSBPC2B:
      description: |
      
        Адрес, на который требуется перенаправить Плательщика в случае успешной оплаты, когда Партнер использует платёжную страницу ПШ 
        
        Обратите внимание! 
        
        1. Если доменное имя содержит кирилические символы, то его необходимо преобразовать по алгоритму ACE. Т.е. строка \"сберпей.рф\" будет выглядеть как \"xn--90aiaq2afe.xn--p1ai\" 
        
        2. Если query параметр содержит символ % - считается, что к данному параметру уже применено экранирование и преобразование не осуществляется (параметр остается \"как есть\")
        
        3. Если query параметр содержит символы, отличные от множества [a-zA-Z0-9.-*_ ], эти символы экранируются через символ %. Строка вида \"сберпей.рф\" будет выглядеть как \"%D1%81%D0%B1%D0%B5%D1%80%D0%BF%D0%B5%D0%B9%2E%D1%80%D1%84\"
      type: string
      example: "https://testmerchant.ru/return"
      maxLength: 2048
      minLength: 12
      pattern: '^[ -~]+$'
    failUrlSBPC2B:
      description: |
        Адрес, на который требуется перенаправить Плательщика в случае неуспешной оплаты, когда Партнер использует платёжную страницу ПШ. Если не указан, используется returnUrl. 
        
        Обратите внимание! 
        
        1. Если доменное имя содержит кирилические символы, то его необходимо преобразовать по алгоритму ACE. Т.е. строка \"сберпей.рф\" будет выглядеть как \"xn--90aiaq2afe.xn--p1ai\" 
        
        2. Если query параметр содержит символ % - считается, что к данному параметру уже применено экранирование и преобразование не осуществляется (параметр остается \"как есть\")
        
        3. Если query параметр содержит символы, отличные от множества [a-zA-Z0-9.-*_ ], эти символы экранируются через символ %. Строка вида \"сберпей.рф\" будет выглядеть как \"%D1%81%D0%B1%D0%B5%D1%80%D0%BF%D0%B5%D0%B9%2E%D1%80%D1%84\"
      type: string
      example: "https://testmerchant.ru/return"
      maxLength: 2048
      minLength: 12
      pattern: '^[ -~]+$'
    clientIdSBPC2B:  
      description: "Номер (идентификатор) Плательщика в системе Партнера. Используется для реализации функционала Связок"
      type: string
      example: "123abc"
      maxLength: 255
      minLength: 1
      pattern: '^[ -~]+$'
    features:
      description: |
        Дополнительные параметры управления сценариями при использовании платёжных реквизитов (можно указать несколько через разделитель \";\"): 
        
        VERIFY = Происходит верификация Плательщика без списания средств с его счёта, поэтому в запросе можно передавать нулевую сумму. Даже если сумма платежа будет передана в запросе, она не будет списана со счёта покупателя. После успешной верификации заказ сразу переводится в статус REVERSED (отменён); 
        
        FORCE_SSL = Принудительное проведение платежа без использования 3-D Secure; 
        
        FORCE_TDS = Принудительное проведение платежа с использованием 3-D Secure. Если карта не поддерживает 3-D Secure, операция будет отклонена; 
        
        FORCE_FULL_TDS = Принудительное проведение платежа только с успешной аутентификацией плательщика 3-D Secure (Y). В противном случае операция будет отклонена.
      type: string
      maxLength: 255
      minLength: 1
      pattern: '^[ -~]+$'
      example: 'VERIFY'  
    createOrderC2Bresp:
      description: 'Структура ответа с данными по заказу'
      type: object
      required: 
        - orderId
        - sbpPayload
        - dayLife
      properties:
        orderId:
          $ref: '#/components/schemas/orderIdC2B'
        formUrl:
          $ref: '#/components/schemas/formUrl'
        sbpPayload:
          $ref: '#/components/schemas/sbpPayload'
        dayLife:
          $ref: '#/components/schemas/dayLifeC2B' 
      additionalProperties: false  
    formUrl:
      type: string
      description: "URL-адрес страницы, на который должен быть перенаправлен браузер Плательщика для дальнейшего проведения операции"
      example: "https://payecom.ru/pay?orderId=1000da9f-615b-511f-1f92-9d695ac2429d"
      maxLength: 255
      minLength: 1
      pattern: '^[ -~]+$' 
    dayLifeC2B:
      description: 'Дата и время окончания жизни заказа на стороне ПШ в формате YYYY-MM-DDThh:mm:ss.sssZ.'
      type: string
      format: date-time    
    sbpPayload:
      type: string
      description: "Зарегистрированная Платежная или Информационная ссылка СБП актуальной версии формата двухмерного QR-кода (ISO/IEC 18004-2015), представляемая в виде URLBased."
      example: "https://qr.nspk.ru/AD100044G8OTINP79SJPL1K2A0GGGIDQ?type=02&bank=100000000111&sum=100&cur=RUB&crc=8000"
      maxLength: 999
      minLength: 1
      pattern: '^[ -~]+$'
    orderIdC2B:
      type: string
      format: uuid
      pattern: '^[0-9a-fA-F-]{36}$'
      description: 'id заказа'
      example: '74550e51-9e81-435d-864c-4b5e07d70e18'  
    infoOrderC2Breq:
      type: object
      description: "Реквизиты запроса информации по ранее созданному заказу"
      required:
        - userName
        - password
        - orderId
      properties:
        orderId:
          $ref: '#/components/schemas/orderIdC2B'
        userName:
          $ref: '#/components/schemas/userNameSBPC2B'
        password:
          $ref: '#/components/schemas/passwordSBPC2B'
      additionalProperties: false
    infoOrderC2Bresp:
      type: object
      description: "Детали ранее созданного заказа"
      properties:
        #merchantOrderParams:
        #  $ref: '#/components/schemas/merchantOrderParams'
        #cardAuthInfo:
        #  $ref: '#/components/schemas/cardAuthInfo'
        bindingInfo:
          $ref: '#/components/schemas/bindingInfo'
        paymentAmountInfo:
          $ref: '#/components/schemas/paymentAmountInfo'
        bankInfo:
          $ref: '#/components/schemas/bankInfo'
        payerData:
          $ref: '#/components/schemas/payerData'
        #transactionAttributes:
        #  $ref: '#/components/schemas/transactionAttributes'
        #attributes:
         # description: Массив объектов, содержащий дополнительные параметры заказа со стороны ПШ (SBPSubscriptionResponse)
        #  type: array
         # items:
        #  anyOf:
        #    - $ref: '#/components/schemas/attributes'
        #    $ref: '#/components/schemas/SBPSubscriptionResponse'
        operations:
          $ref: '#/components/schemas/operations'
        orderNumber:
          $ref: '#/components/schemas/orderNumberSBPC2B'
        orderStatus:
          $ref: '#/components/schemas/orderStatus'
        actionCode:
          $ref: '#/components/schemas/actionCode'
        errorMessage:
          $ref: '#/components/schemas/errorMessage'
        actionCodeDescription:
          $ref: '#/components/schemas/actionCodeDescription'
        amount:
          $ref: '#/components/schemas/amountC2B'
        currency:
          $ref: '#/components/schemas/currencyC2B'
        date:
          $ref: '#/components/schemas/dateC2B'
        depositedDate:
           $ref: '#/components/schemas/depositedDate'
        orderDescription:
          $ref: '#/components/schemas/orderDescription'
        #ip:
        #  $ref: '#/components/schemas/ip'
        authRefNum:
          $ref: '#/components/schemas/authRefNum'
        refundedDate:
          $ref: '#/components/schemas/refundedDate'
        authDateTime:
          $ref: '#/components/schemas/authDateTime'
        terminalId:
          $ref: '#/components/schemas/terminalId'
      additionalProperties: false
    authDateTime:
      description: Дата и время авторизации в Банке-эквайере в формате UNIX-времени (POSIX-времени)
      type: number
      minimum: 0
      maximum: 999999999999999
      example: 1636985192232

    terminalId:
      description: Идентификатор терминала в платёжном шлюзе Банка-эквайера, через который осуществлялась оплата
      type: string
      maxLength: 10
      minLength: 1
      pattern: ^\w+$
      example: "20235777"  
    refundedDate:
      description: Дата и время возврата средств.
      type: string
      format: date-time
      example: 2022-12-31T23:59:59  
    #ip:
    #  description: IP-адрес Плательщика
    #  type: string
    #  maxLength: 39
    #  minLength: 1
    #  pattern: ^[ -~]*$
    #  example: 127.0.0.1  
    orderDescription:
      description: Описание заказа в свободной форме на стороне Партнера.
      type: string
      maxLength: 255
      minLength: 1
      pattern: ^[ -~А-Яа-яЁёA-Za-z0-9-_№]*$
      example: Тестовый заказ
    depositedDate:
      description: Дата и время оплаты/завершения оплаты заказа в формате UNIX-времени (POSIX-времени)
      type: number
      minimum: 0
      maximum: 999999999999999
      example: 1636985192232  
    currencyC2B:
      description: Цифровой код валюты операции ISO-4217
      type: string
      maxLength: 3
      minLength: 3
      pattern: ^\d{3}$
      default: "643"
      example: "643"  
    orderStatus:
      description: |
        По значению этого параметра определяется состояние заказа в платёжном шлюзе. Отсутствует, если заказ не был найден. Возможны следующие значения:
          * `0` = заказ зарегистрирован, но не оплачен;
          * `1` = сумма захолдирована (для двухстадийного сценария);
          * `2` = проведена полная авторизация суммы заказа / создана подписка СБП;
          * `3` = авторизация отменена;
          * `4` = по заказу была проведена операция возврата;
          * `5` = инициирована аутентификация через ACS Банка-эмитента;
          * `6` = авторизация отклонена.
      type: integer
      minimum: 0
      maximum: 9
      example: 2

    actionCodeDescription:
      description: Расшифровка кода ответа на языке, переданном в параметре запроса language
      type: string
      maxLength: 255
      minLength: 0
      pattern: ^[ -~А-Яа-яЁё№]*$
      example: ""  
    operations:
      description: Массив объектов, содержащий информацию по всем платёжным операциям в рамках заказа. Возвращается в ответе, если Партнеру разрешено использование данного функционала
      type: array
      items:
        type: object
        properties:
          date:
            $ref: '#/components/schemas/dateC2B'
          type:
            $ref: '#/components/schemas/operationType'
          amount:
            $ref: '#/components/schemas/amountC2B'
          referenceNumber:
            $ref: '#/components/schemas/authRefNum'
          #externalRefundId:
          #  $ref: '#/components/schemas/externalRefundId'
          approvalCode:
            $ref: '#/components/schemas/approvalCodeC2B'
          actionCode:
            $ref: '#/components/schemas/actionCode'
          #eCertificateBasketId:
          #  $ref: '#/components/schemas/eCertificateBasketId'
        additionalProperties: false
      maxItems: 255  
      example: []  
    actionCode:
      description: Код ответа платёжного шлюза - цифровое обозначение результата, к которому привело обращение со стороны Партнера
      type: integer
      minimum: -9999999
      maximum: 9999999
      example: 0  
    approvalCodeC2B:
      description: Код авторизации платежа
      type: string
      maxLength: 6
      minLength: 1
      pattern: ^\w+$
      example: "433187"  
    authRefNum:
      description: Ссылочный номер авторизации платежа, который присваивается при регистрации платежа на стороне платёжной системы
      type: string
      maxLength: 24
      minLength: 0
      pattern: ^[A-Za-z0-9]+$
      example: "303112098637"  
    amountC2B:
      description: Сумма операции в минимальных единицах валюты
      type: integer
      maximum: 999999999999
      minimum: 0
      example: 19900  
    operationType:
      description: |
        Тип платёжной операции. Возможные значения:
          * `AUTHORIZATION`
          * `PREAUTHORIZATION`
          * `COMPLETION`
          * `REVERSAL`
          * `REFUND`
      type: string
      maxLength: 20
      minLength: 1
      pattern: ^[ -~]*$
      example: AUTHORIZATION  
    dateC2B:
      description: Дата и время регистрации заказа в формате UNIX-времени (POSIX-времени) format
      type: number
      minimum: 0
      maximum: 999999999999999
      example: 1636985192232  
    
    bankInfo:
      description: Блок информации о Банке-эмитенте
      type: object
      properties:
        bankName:
          description: Наименование Банка-эмитента Карты Плательщика
          type: string
          maxLength: 50
          minLength: 1
          pattern: ^[ -~]*$
          example: ПАО Сбербанк
        bankCountryCode:
          description: Код страны Банка-эмитента
          type: string
          maxLength: 4
          minLength: 1
          pattern: ^\w+$
          example: "643"
        bankCountryName:
          description: Наименование страны банка-эмитента на языке, переданном в параметре language в запросе или если не указан, будет использован язык по умолчанию, указанный в настройках Партнера
          type: string
          maxLength: 160
          minLength: 1
          pattern: ^[А-Яа-яЁё\w\s]+$
          example: Россия
      example: {}
      additionalProperties: false  
    paymentAmountInfo:
      description: Блок информации о суммах, участвующих в цикле платежа
      type: object
      properties:
        approvedAmount:
          description: Сумма холдирования для двухстадийного платежа или подтвержденная сумма списания для одностадийного платежа
          type: integer
          maximum: 999999999999
          minimum: 0
          example: 19900
        depositedAmount:
          description: Сумма завершения оплаты для двухстадийного сценария платежа
          type: integer
          maximum: 999999999999
          minimum: 0
          example: 14900
        refundedAmount:
          description: Сумма возвращенных средств
          x-description-i18n:
            eng: Refunded amount
          type: integer
          maximum: 999999999999
          minimum: 0
          example: 0
        feeAmount:
          description: Сумма комиссии в минимальных единицах валюты
          type: integer
          maximum: 999999999999
          minimum: 0
          example: 0
        #approvedAmountCertificate:
        #  description: Сумма оплаты за счет электронного сертификата. Возвращается, если при оплате использовались средства ЭС.
        #  type: integer
        #  maximum: 999999999999
        #  minimum: 0
        #  example: 19900
        #depositedAmountCertificate:
        #  description: Подтвержденная сумма оплаты за счет электронного сертификата. Возвращается, если при оплате использовались средства ЭС.
        #  type: integer
        #  maximum: 999999999999
        #  minimum: 0
        #  example: 14900
        #refundedAmountCertificate:
        #  description: Сумма возвращенных средств по электронному сертификату. Возвращается, если при оплате использовались средства ЭС.
        #  type: integer
        #  maximum: 999999999999
        #  minimum: 0
        #  example: 0
        paymentState:
          description: |
            Состояние платежа. Возможны следующие варианты:
              * `CREATED`
              * `APPROVED`
              * `DEPOSITED`
              * `REVERSED`
              * `REFUNDED`
              * `DECLINED`
          type: string
          maxLength: 10
          minLength: 1
          pattern: ^[A-Za-z]*$
          example: DEPOSITED
      additionalProperties: false      
    bindingInfo:
      description: Блок информации о связке
      type: object
      properties:
        clientId:
          $ref: '#/components/schemas/clientIdSBPC2B'
        bindingId:
          $ref: '#/components/schemas/id'
      additionalProperties: false
    payerData:
      description: Блок информации о Плательщике
      type: object
      properties:
        email:
          description: "Адрес электронной почты Плательщика. В случае использования фискализации обязателен, при отсутствии phone."
          type: string
          format: email
          example: "+info@your-company.ru"
          maxLength: 128
          minLength: 3
      additionalProperties: false
     
    
     
    transactionsFlowResp: 
      type: object
      description: "Данные по денежным операциям"
      properties:
        transactions:
          type: array
          description: "Данные по денежным операциям"
          items:
            $ref: '#/components/schemas/transactionFlowResp'
          maxItems: 200  
    transactionFlowResp: 
      type: object
      description: "Данные по денежной операции"
      required:
        - beneficiaryId
        - createDate
        - amount
        - id
      properties:
        id:
          $ref: '#/components/schemas/id'
        #status:
        #  $ref: '#/components/schemas/paymentStatus'
        #paymentType:
        #  $ref: '#/components/schemas/paymentType'
        #paymentMethod:
        #  $ref: '#/components/schemas/paymentMethod'
        beneficiaryId:
          $ref: '#/components/schemas/id'
        createDate:
          type: string
          format: date-time
          description: 'Время создания события'
          example: '2025-03-15T23:31:00.999Z'
        #editDate:
        #  type: string
        #  format: date-time
        #  description: 'Время изменения статуса события'
        #  example: '2025-03-15T23:31:00.999Z'
        #executionDate:
        #  type: string
        #  format: date-time
        #  description: 'Дата обработки операции'
        #  example: '2025-03-15T00:00:00.999Z'
        #errorMessage:
        #  $ref: '#/components/schemas/errorMessage'
        amount:
          $ref: '#/components/schemas/amount'
        purpose:
          $ref: '#/components/schemas/getPurpose'
        docNumber:
          $ref: '#/components/schemas/docNumber'  
        operationId:
          $ref: '#/components/schemas/operationId'  
      additionalProperties: false      
    #transactionsFlowExpResp: 
    #  type: object
    #  description: "Данные по денежным операциям"
    #  properties:
    #    transactions:
    #      type: array
    #      description: "Данные по денежным операциям"
    #      items:
    #        $ref: '#/components/schemas/transactionFlowExpResp'
    #      maxItems: 200  
    #transactionFlowExpResp: 
    #  type: object
    #  description: "Данные по денежной операции"
    #  required:
    #    - beneficiaryId
    #   - status
    #    - paymentMethod
    #    - createDate
    #    - amount
    #    - id
    #  properties:
    #    id:
    #      $ref: '#/components/schemas/id'
    #    status:
    #      $ref: '#/components/schemas/paymentStatus'
    #    paymentMethod:
    #      $ref: '#/components/schemas/paymentMethod'
    #    beneficiaryId:
    #      $ref: '#/components/schemas/id'
    #    createDate:
    #      type: string
    #      format: date-time
    #      description: 'Время создания события'
    #      example: '2025-03-15T23:31:00.999Z'
    #    editDate:
    #      type: string
    #      format: date-time
    #      description: 'Время изменения статуса события'
    #      example: '2025-03-15T23:31:00.999Z'
    #    executionDate:
    #      type: string
    #      format: date-time
    #      description: 'Дата обработки операции'
    #      example: '2025-03-15T00:00:00.999Z'
    #    errorMessage:
    #      $ref: '#/components/schemas/errorMessage'
    #    amount:
    #      $ref: '#/components/schemas/amount'
    #    purpose:
    #      $ref: '#/components/schemas/getPurpose'
    #    docNumber:
    #      $ref: '#/components/schemas/docNumberPayment'  
    #    operationId:
    #      $ref: '#/components/schemas/operationId' 
    #  additionalProperties: false  
    #docNumberPayment:
    #  type: string
    #  maxLength: 32
    #  description: Номер платежного поручения
    #  example: '145578'  
    #priority:
    #  type: integer
    #  minimum: 1
    #  maximum: 5
    #  description: 'Номер группы очередности платежного документа'
    #  example: 5   
    paymentType:
      type: string
      pattern: '^[A-Za-z]{1,20}$'
      description: 'Тип транзакции может принять одно из значений: "CREDIT", "DEBIT"' 
      example: 'DEBIT' 
    paymentStatus:
      type: string
      pattern: '^[A-Za-z]{1,20}$'
      description: | 
        Статус транзакции.

        Может принять одно из значений: 
          - "CREATED (Создан)", 
          - "PENDING (В процессе)", 
          - "DONE (Исполнен)", 
          - "ERROR (Ошибка)"
      example: 'ERROR'    
    paymentMethod:
      type: string
      pattern: '^[A-Za-z]{1,20}$'
      description: | 
        Метод оплаты

        Может принять одно из значений: 
          - "SBP" (платеж по СБП)
          - "PAYMENT" (платеж по реквизитам счета)
          - "INTERNAL" (перевод между бенефициарами одного номинального счета)
          - "TAX" (налоговый платеж)
          - "EXQLUDE" (при выводе средств с номинального счета по инициативе банка (при банкротстве/ликвидации бенефициара))
          - "COLLECT" (при выводе средств с номинального счета по инициативе исполнительного производства)
      example: 'PAYMENT'    
    transactionResp: 
      type: object
      description: "Данные по денежной операции"
      required:
        - paymentType
        - status
        - beneficiaryId
        - createDate
        - amount
        - id
      properties:
        id:
          $ref: '#/components/schemas/id'
        status:
          $ref: '#/components/schemas/paymentStatus'
        paymentType:
          $ref: '#/components/schemas/paymentType'
        paymentMethod:
          $ref: '#/components/schemas/paymentMethod'
        beneficiaryId:
          $ref: '#/components/schemas/id'
        createDate:
          type: string
          format: date-time
          description: 'Время создания события'
          example: '2025-03-15T23:31:00.999Z'
        editDate:
          type: string
          format: date-time
          description: 'Время изменения статуса события'
          example: '2025-03-15T23:31:00.999Z'
        executionDate:
          type: string
          format: date-time
          description: 'Дата обработки операции'
          example: '2025-03-15T00:00:00.999Z'
        errorMessage:
          $ref: '#/components/schemas/errorMessage'
        amount:
          $ref: '#/components/schemas/amount'
        purpose:
          $ref: '#/components/schemas/getPurpose'
        docNumber:
          $ref: '#/components/schemas/docNumber'  
        operationId:
          $ref: '#/components/schemas/operationId'
      additionalProperties: false      
    operationId:
      type: string
      maxLength: 255
      description: 'Идентификатор документа'
      example: '1234567890' 
    docNumber:
      type: string
      maxLength: 25
      description: 'Номер документа-основания'
      example: '289'  
    transactionsUndefined:
      type: array
      description: 'Массив операций пополнения номинального счета'
      items:
        $ref: '#/components/schemas/transactionUndefined'
      maxItems: 100  
    transactionUndefined: 
      type: object
      description: "Данные по денежной операции"
      required:
        - createDate
        - amount
        - undefinedTransactionId
        - amountUndefined
       
      properties:
        undefinedTransactionId:
            $ref: '#/components/schemas/id'
        createDate:
          type: string
          format: date-time
          description: 'Время создания события'
          example: '2026-03-15T23:31:00.999Z'
        amount:
          $ref: '#/components/schemas/amount'
        amountUndefined:
          $ref: '#/components/schemas/amount'
        purpose:
          $ref: '#/components/schemas/getPurpose'
        docNumber:
          $ref: '#/components/schemas/docNumber'  
        operationId:
          $ref: '#/components/schemas/id'
      additionalProperties: false  
    transactionsIdentify:  
      type: object
      required:
        - transactions
      properties:
        transactions:
          type: array
          maxItems: 50
          items:
            type: object
            required:
              - transactionId
              - amount
              - beneficiaryId
            additionalProperties: false
            properties:
              transactionId:
                $ref: '#/components/schemas/id'
              amount:
                $ref: '#/components/schemas/amount'
              beneficiaryId:
                $ref: '#/components/schemas/id'   
      additionalProperties: false     
    reportDate:
      type: string
      format: date
      example: '2025-03-15' 
      description: 'Дата, за которую необходимо сформировать отчет'     
    transactionsReport:  
      type: array
      maxItems: 250
      items:
        type: object
        additionalProperties: false
        properties:
          orgName:
            type: string
            maxLength: 160
            description: 'Наименование организации'
            example: 'ПАО Ромашка'  
          inn:
            type: string
            pattern: '^[0-9]{10,12}$'
            maxLength: 12
            description: 'ИНН организации'
            example: 'ПАО Ромашка' 
          kpp:
            $ref: '#/components/schemas/kpp'
          currentAccount:
            $ref: '#/components/schemas/nominalAccountNumber'
          merchantName:
            type: string
            maxLength: 50
            description: 'Наименование ТСТ'
            example: 'ИП Иванов Антон'  
          merchantAddress:
            type: string
            maxLength: 255
            description: 'Адрес ТСТ'
            example: 'ИП Иванов Антон'  
          mid:
            type: string
            maxLength: 30
            description: 'Номер мерчанта'
            example: '781002689255' 
          tid:
            type: string
            maxLength: 30
            description: 'Номер терминала'
            example: '39385311' 
          mcc:
            type: string
            maxLength: 15
            description: 'Mcc мерчанта'
            example: '7261' 
          parentTerminalMid:
            type: string
            maxLength: 30
            description: 'MID головного терминала'
            example: '781002689255' 
          parentTerminalTid:
            type: string
            maxLength: 30
            description: 'TID головного терминала'
            example: '39385311' 
          addData1:
            type: string
            maxLength: 255
            description: 'Доп. информация 1'
            example: 'Бенефициар Иванов Иван Иванович, ДКП202-01/2025' 
          addData2:
            type: string
            maxLength: 255
            description: 'Доп. информация 2'
            example: '1555351811032' 
          transactionStatus:
            type: string
            maxLength: 40
            description: 'Статус транзакции на кириллице'
            example: 'В обработке'
          transactionDate:
            type: string
            format: date-time
            description: 'Дата транзакции'
            example: '2025-03-15T23:31:00.999Z'
          operationType:
            type: string
            maxLength: 255
            description: 'Тип операции'
            example: 'Покупка'
          rrn:
            type: string
            maxLength: 25
            description: 'RRN'
            example: '530202613186'
          authCode:
            type: string
            maxLength: 25
            description: 'Код авторизации'
            example: '575387'
          paymentSystemType:
            type: string
            maxLength: 255
            description: 'Платежная система на кириллице'
            example: 'МИР'
          cardNumber:
            type: string
            maxLength: 255
            description: 'Номер карты в маскированном виде'
            example: '220220******0461'
          transactionAmount:
            type: integer
            maximum: 1000000000000
            description: 'Сумма транзакции в копейках'
            example: '12321'
          comissionPercent:
            type: string
            maxLength: 25
            description: 'Процент комиссии банка с учетом НДС'
            example: '2,3000'
          comissionAmount:
            type: integer
            maximum: 1000000000000
            description: 'Сумма комиссии банка в копейках с учетом НДС'
            example: '23'
          paymentAmount:
            type: integer
            maximum: 1000000000000
            description: 'Сумма расчета в копейках (transactionAmount - comissionAmount)'
            example: '1039'
          bankRecepient:
            type: string
            maxLength: 255
            description: 'Банк-получатель'
            example: 'ПАО Сбербанк'
          compensationDate:
            type: string
            format: date
            description: 'Дата платежного поручения'
            example: '2025-03-15'
          paymentNumber:
            type: string
            maxLength: 20
            description: 'Номер платежного поручения'
            example: '512928'
          compensationAmount:
            type: integer
            maximum: 1000000000000
            description: 'Сумма платежного поручения в копейках'
            example: '512928'
      
  # securitySchemes:
  #   OAuth2:
  #     type: oauth2
  #     description: '[Инструкция по получению токена](ru/sber-api/start/connect#poluchit-access-token)'
  #     flows:
  #       clientCredentials:
  #         tokenUrl: 'https://mc.api.sberbank.ru/prod/tokens/v3/oauth'
  #         scopes:
  #           auth://sbersmartcabinet/nominal-account: 'Общий скоуп для доступа ко всем методам'
# security:
#   - OAuth2:
#     - auth://nominal-account

# Powered by APIStudio