openapi: 3.0.1
info:
  version: 1.0.3
  title: TeslaPay Api Specification
  description: |

    # Core API V1

    Api version 2 with Legal entity support [here](../v2/mabhost.html)

    ## Changelog

    You can follow and get to know the latest API changes and improvements [here](./changelog.html).

    ## LHS Brackets filtering support
    For example,
    `GET /clients/?filter=age[gte]21 or (email[eq]"a@a.com" and CreateDate[eq]2019-01-31)` would find all
    the items where the `age` is greater than or equals to `21` or `email` equals `a@a.com`
    and `CreateDate` equals `31 Jan 2019`. Default the logical operator `and`.
    `LIKE` operator with SQL pattern supported, but `ESCAPE` option NOT supported.
    For available filter fields, and their types see endpoint description

    ### Notations
      | Operator | Bracket Notation |
      |:--------:|:----------------:|
      |   N/A    |     \[range]     |
      |   N/A    |     \[like]      |
      |    =     |      \[eq]       |
      |    !=    |      \[ne]       |
      |    >     |      \[gt]       |
      |    >=    |      \[gte]      |
      |    <     |      \[lt]       |
      |    <=    |      \[lte]      |
      |   and    |       and        |
      |    or    |        or        |

    ### Datatypes
      |  Type  | format                                          |
      |:------:|:------------------------------------------------|
      | string | Value in double quotes. ex: email\[like]"%.com" |
      |  date  | Date as defined by yyyy-mm-dd                   |
      | number | Integer number with no thousand delimiters      |

    ## Response codes
      | HTTP Code | Description                                                  |
      | :-------: | :----------------------------------------------------------- |
      |    200    | Request completed successfully                               |
      |    400    | Invalid request. Show message box with "OK" button. Message text from response field `failure_message` and concatenate with text "Error: `detail.error_id`". Title should be filled from `detail.title` |
      |    408    | Execution timeout. Retry same request later                  |
      |   Other   | Show message box with "OK" button. Message text: "We apologize for any inconveniences caused, please contact TeslaPay Customer Support via 'Messaging' section. Error code: `detail.error_id` ". Title should be filled from `detail.title` |
servers:
  - url: https://localhost/v1
    description: TeslaPay Api Host
tags:
  - name: Client
    description: |
      Client operations.  __Work in progress (WIP)__
  - name: Webhooks
    description: |
      TeslaPay pushes events to an HTTPS endpoint you register with us, so you do not have to poll
      for changes. Everything below applies to every delivery; the events themselves are documented
      under **Webhooks** at the end of this page.

      Registration is done by TeslaPay on your behalf -- there is no self-service API for it. Tell
      us the URL, which events you want, and (if you want to verify signatures) collect our public
      key. All events you subscribe to arrive at that one URL.

      ## Event catalogue

      Every event type is `{resource}.{action}`.

      | `event_type`                 | Fired when                                            |
      | :--------------------------- | :---------------------------------------------------- |
      | `corp_reg.status_changed`    | Company registration moved to a different status       |
      | `private_reg.status_changed` | Private person registration moved to a different status |

      The catalogue is configuration-driven and grows without a change to this specification, so
      **accept unknown `event_type` values gracefully** -- log and acknowledge them rather than
      failing. Your subscription filter decides which of them you receive; it matches exact types
      (`private_reg.status_changed`), a whole resource (`private_reg.*`), an action across resources
      (`*.status_changed`), or everything (`*`).

      ## Delivery request

      `POST` to your URL with `Content-Type: application/json; charset=utf-8` and these headers:

      | Header                    | Description                                                |
      | :------------------------ | :--------------------------------------------------------- |
      | `X-Webhook-Event-Type`    | Same value as the `event_type` body property               |
      | `X-Webhook-Message-Id`    | Same value as the `event_id` body property                |
      | `X-Webhook-Event-Version` | Payload contract version. Always `1` today                |
      | `X-Webhook-Timestamp`     | Queueing time, 7 fractional digits, **no** `Z` or offset   |
      | `X-Webhook-Signature`     | Body signature, base64. Absent if signing is not configured |
      | `Nonce`                   | Random 63-bit integer, per attempt. Note: not `X-Webhook-Nonce` |
      | `User-Agent`              | `MAB-Webhooks/1.0`                                        |

      ## Verifying the signature

      `X-Webhook-Signature` is an **RSASSA-PKCS1-v1_5 signature over SHA-256**, base64-encoded with
      the standard alphabet. The signed input is the **raw request body bytes, and nothing else** --
      no timestamp, nonce, method or URL is mixed in. So verification is:

      1. Read the raw body **before** any JSON parsing or re-serialization. Re-serializing changes
         bytes and breaks the signature.
      2. Base64-decode `X-Webhook-Signature`.
      3. Verify against SHA-256 of those bytes using the TeslaPay public key.

      Because the timestamp and nonce are outside the signature, a captured request stays valid
      forever. Signature verification proves *origin*, not freshness -- rely on `event_id`
      deduplication for replay safety.

      ## Retries and your response

      Any `2xx` acknowledges the event and the response body is discarded. `408`, `429` and any
      `5xx`, plus network errors and read timeouts, are retried with exponential backoff
      (`base * exponent^attempt`) until the configured attempt limit, after which the delivery is
      abandoned. **Every other `4xx` is permanent and never retried.**

      Acknowledge as soon as the event is durably stored and process it afterwards: a slow receiver
      hits the delivery timeout and gets retried, which shows up as duplicates.

      ## Idempotency and ordering

      Deduplicate on `event_id`, which is stable across retries of the same event. It is a UUID v7,
      so sorting event ids from the same source reproduces emission order.

      Delivery is per subscription: if two endpoints subscribe to the same event, each gets its own
      message with its own `event_id`. Order is not guaranteed across resources, and a retried
      event can arrive after a later one -- use `occurred_at` to reconcile, and treat handlers as
      idempotent.

      ## What the payload does and does not contain

      The payload identifies *what changed*, not the new state: there are no amounts, currencies,
      accounts or names in it. Read the resource back through this API when you need its content.

      `data.id` is the external identifier registered for the document through the partner API, and
      is omitted when there is none.
paths:
  /clients:
    post:
      tags:
        - Client
      operationId: createClient
      description: This operation create client.
      summary: Create client
      x-scopes:
        - customer
      security:
        - basicMab: []
      parameters:
        - $ref: '#/components/parameters/requestId'
        - $ref: '#/components/parameters/partnerCode'
      requestBody:
        description: Create client
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClientModel'
            examples:
              ClientCreated:
                $ref: '#/components/examples/ClientCreateRequest'
      responses:
        '200':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientModel'
              examples:
                ClientCreateResponse200:
                  $ref: '#/components/examples/ClientCreateResponse200'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '408':
          $ref: '#/components/responses/Timeout'
        '500':
          $ref: '#/components/responses/InternalError'
    get:
      tags:
        - Client
      operationId: listClients
      summary: List clients
      description: |
        This operation retrieves list of the partner clients.

        ###### Filter fields
        | Field                 |  Type  |
        |:----------------------|:------:|
        | email                 | string |
        | contact_mobile_number | string |
        | external_id           | string |

        Filter example with limit/offset:

        `GET /v1/clients/?limit=300&offset=0&filter=contact_mobile_number[eq]"%2B37129207562";create_date[gte]2019-07-13;create_date[lte]2019-07-16`
      x-scopes:
        - customer
      security:
        - basicMab: []
      parameters:
        - $ref: '#/components/parameters/partnerCode'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/filter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ClientModel'
              examples:
                ClientGetResponse200:
                  $ref: '#/components/examples/ClientGetResponse200'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '408':
          $ref: '#/components/responses/Timeout'
        '500':
          $ref: '#/components/responses/InternalError'
  /clients/{clientId}:
    put:
      tags:
        - Client
      operationId: updateClient
      summary: Update client data
      description: |
        This operation update client info
      x-scopes:
        - customer
      security:
        - basicMab: []
      parameters:
        - $ref: '#/components/parameters/clientId'
        - $ref: '#/components/parameters/requestId'
        - $ref: '#/components/parameters/partnerCode'
      requestBody:
        required: true
        description: Update client.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClientUpdateModel'
            examples:
              UpdatePhone:
                value:
                  client_type: PERSON
                  client:
                    contact_mobile_number: '+370123456'
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientModel'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '408':
          $ref: '#/components/responses/Timeout'
        '500':
          $ref: '#/components/responses/InternalError'
  /clients/{clientId}/accounts:
    post:
      tags:
        - Client account
      operationId: createClientAccount
      summary: Create account
      description: This operation create client account
      x-scopes:
        - customer
      security:
        - basicMab: []
      parameters:
        - $ref: '#/components/parameters/requestId'
        - $ref: '#/components/parameters/partnerCode'
        - $ref: '#/components/parameters/clientId'
      responses:
        '200':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountModel'
              example:
                id: LT023190000201000613
                type: payment
                iban: LT023190000201000613
                bic: TEUALT22XXX
                status: active
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '408':
          $ref: '#/components/responses/Timeout'
        '500':
          $ref: '#/components/responses/InternalError'
    get:
      tags:
        - Client account
      operationId: listClientAccounts
      summary: Accounts
      description: List client accounts
      x-scopes:
        - customer
      security:
        - basicMab: []
      parameters:
        - $ref: '#/components/parameters/partnerCode'
        - $ref: '#/components/parameters/clientId'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AccountModel'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '408':
          $ref: '#/components/responses/Timeout'
        '500':
          $ref: '#/components/responses/InternalError'
  /clients/{clientId}/accounts/{accountId}:
    get:
      tags:
        - Client account
      operationId: getClientAccount
      summary: Account
      description: Get client account
      x-scopes:
        - customer
      security:
        - basicMab: []
      parameters:
        - $ref: '#/components/parameters/partnerCode'
        - $ref: '#/components/parameters/clientId'
        - in: path
          name: accountId
          description: Unique identifier of the account
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountModel'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '408':
          $ref: '#/components/responses/Timeout'
        '500':
          $ref: '#/components/responses/InternalError'
  /clients/{clientId}/accounts/{accountId}/balance:
    get:
      tags:
        - Client account
      operationId: getClientAccountBalance
      summary: Account balance
      description: Get client account balance
      x-scopes:
        - customer
      security:
        - basicMab: []
      parameters:
        - $ref: '#/components/parameters/partnerCode'
        - $ref: '#/components/parameters/clientId'
        - in: path
          name: accountId
          description: Unique identifier of the account
          required: true
          schema:
            type: string
        - in: query
          name: date
          description: Balance date
          required: false
          schema:
            type: string
            format: date
        - in: query
          name: currency
          description: Balance currency
          required: false
          schema:
            $ref: '#/components/schemas/currencyType'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AccountBalanceModel'
              examples:
                AccountBalanceAllResponse:
                  $ref: '#/components/examples/AccountBalanceAllResponse'
                AccountBalanceEur:
                  $ref: '#/components/examples/AccountBalanceEur'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '408':
          $ref: '#/components/responses/Timeout'
        '500':
          $ref: '#/components/responses/InternalError'
  /clients/{clientId}/accounts/{accountId}/statement:
    get:
      tags:
        - Client account
      operationId: getClientAccountStatement
      summary: Account statement
      description: Get client account statement
      x-scopes:
        - customer
      security:
        - basicMab: []
      parameters:
        - $ref: '#/components/parameters/partnerCode'
        - $ref: '#/components/parameters/clientId'
        - in: path
          name: accountId
          description: Unique identifier of the account
          required: true
          schema:
            type: string
        - in: query
          name: date_from
          description: Statement begin date
          required: true
          schema:
            type: string
            format: date
        - in: query
          name: date_to
          description: Statement end date
          required: true
          schema:
            type: string
            format: date
        - in: query
          name: currency
          description: Statement currency
          required: false
          schema:
            $ref: '#/components/schemas/currencyType'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AccountStatementModel'
              examples:
                AccountStatementEur:
                  $ref: '#/components/examples/AccountStatementEur'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '408':
          $ref: '#/components/responses/Timeout'
        '500':
          $ref: '#/components/responses/InternalError'
  /clients/{clientId}/accounts/{accountId}/{operation}:
    post:
      tags:
        - Client account
      operationId: manageClientAccount
      summary: Manage account
      description: Manage client account
      x-scopes:
        - customer
      security:
        - basicMab: []
      parameters:
        - $ref: '#/components/parameters/partnerCode'
        - $ref: '#/components/parameters/clientId'
        - in: path
          name: accountId
          description: Unique identifier of the account
          required: true
          schema:
            type: string
        - in: path
          name: operation
          description: Account operation
          required: true
          schema:
            $ref: '#/components/schemas/AccountOperationModel'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseStringModel'
              example:
                result: OK
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '408':
          $ref: '#/components/responses/Timeout'
        '500':
          $ref: '#/components/responses/InternalError'
  /accounts/{accountId}/transfers/sepa/fee:
    post:
      tags:
        - Transfer
      operationId: transferFeeSepa
      summary: SEPA fee
      description: Calculate SEPA transfer fee.
      x-scopes:
        - transfer
      security:
        - basicMab: []
      parameters:
        - $ref: '#/components/parameters/partnerCode'
        - in: path
          name: accountId
          description: The unique identifier of the account
          required: true
          schema:
            type: string
      requestBody:
        description: Fee calculate parameters
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SepaTransferFeeCalculateModel'
            example:
              parameters:
                amount: 1500
                recipient_iban: GB33BUKB20201555555555
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SepaTransferFeeCalculateModel'
              example:
                fee:
                  amount: 50
                  currency: EUR
                parameters:
                  amount: 1500
                  priority: standard
                  recipient_iban: GB33BUKB20201555555555
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '408':
          $ref: '#/components/responses/Timeout'
        '500':
          $ref: '#/components/responses/InternalError'
  /accounts/{accountId}/transfers/sepa:
    post:
      tags:
        - Transfer
      operationId: createTransferSepa
      summary: Create SEPA
      description: Create SEPA transfer
      x-scopes:
        - transfer
      security:
        - basicMab: []
      parameters:
        - $ref: '#/components/parameters/requestId'
        - $ref: '#/components/parameters/partnerCode'
        - in: path
          name: accountId
          description: Unique identifier of the account
          required: true
          schema:
            type: string
      requestBody:
        description: Account transfer
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SepaModel'
            example:
              id: A-a10903fb-f67d-49ca-af15-dd3748a791d9
              amount: 203
              description: A. Test 2020-12-21T17:40:12.458Z
              recipient_name: Ellis Grant PhD
              recipient_iban: GB33BUKB20201555555555
              recipient_country: LV
              recipient_address: 7410 VonRueden Turnpike
              ip: 109.110.0.1
      responses:
        '200':
          description: OK
          content:
            application/json:
              examples:
                payment_created:
                  description: Payment created
                  value:
                    id: A-a10903fb-f67d-49ca-af15-dd3748a791d9
                    amount: 203
                    fee:
                      amount: 50
                      currency: EUR
                    description: A. Test 2020-12-21T17:40:12.458Z
                    recipient_name: Ellis Grant PhD
                    recipient_iban: GB33BUKB20201555555555
                    recipient_country: LV
                    recipient_address: 7410 VonRueden Turnpike
                    beneficiary_bank:
                      bic: BUKBGB22XXX
                      bank: BARCLAYS BANK UK PLC
                      address: United Kingdom, Leicester
                      country: GB
                      sepa: true
                    status: inprogress
                    processing_date: '2020-12-21T17:40:21Z'
                    ip: 109.110.0.1
              schema:
                $ref: '#/components/schemas/SepaModel'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '408':
          $ref: '#/components/responses/Timeout'
        '500':
          $ref: '#/components/responses/InternalError'
    get:
      tags:
        - Transfer
      operationId: listTransfersSepa
      summary: SEPA transfers
      description: |
        List SEPA transfers.

        #### Filter fields

        |  Field                 | Type   |
        |:--------               |:-----: |
        | processing_date        | date   |

        #### Filter example with limit/offset:

        `GET /v1/accounts/LT773190000201000136/transfers/sepa?limit=50&offset=2&filter=processing_date[gte]2020-12-21%20and%20processing_date[lt]2020-12-22`
      x-scopes:
        - transfer
      security:
        - basicMab: []
      parameters:
        - $ref: '#/components/parameters/partnerCode'
        - in: path
          name: accountId
          description: Unique identifier of the account
          required: true
          schema:
            type: string
        - in: query
          name: id
          description: Unique identifier of the transfer
          schema:
            type: string
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/filter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              examples:
                with-id-parameter:
                  description: Transaction information
                  value:
                    - id: A-e4d9c2a2-e824-4118-ace5-1bfb4d5da298
                      amount: 202
                      fee:
                        amount: 50
                        currency: EUR
                      description: A. Test 2020-12-21T16:18:39.322Z
                      recipient_name: Veronica Sauer
                      recipient_iban: GB33BUKB20201555555555
                      recipient_country: LV
                      recipient_address: 036 Mohr Walks
                      beneficiary_bank:
                        bic: BUKBGB22XXX
                        bank: BARCLAYS BANK UK PLC
                        address: United Kingdom, Leicester
                        country: GB
                        sepa: true
                      status: inprogress
                      processing_date: '2020-12-21T18:18:39Z'
                      ip: 109.110.0.1
                last-100-transactions:
                  description: Last 100 transactions
                  value:
                    - id: A-e4d9c2a2-e824-4118-ace5-1bfb4d5da298
                      amount: 202
                      fee:
                        amount: 50
                        currency: EUR
                      description: A. Test 2020-12-21T16:18:39.322Z
                      recipient_name: Veronica Sauer
                      recipient_iban: GB33BUKB20201555555555
                      recipient_country: LV
                      recipient_address: 036 Mohr Walks
                      beneficiary_bank:
                        bic: BUKBGB22XXX
                        bank: BARCLAYS BANK UK PLC
                        address: United Kingdom, Leicester
                        country: GB
                        sepa: true
                      status: inprogress
                      processing_date: '2020-12-21T18:18:39Z'
                      ip: 109.110.0.1
                    - id: A-cbd70999-0520-4695-98a2-c8277565d55a
                      amount: 203
                      fee:
                        amount: 50
                        currency: EUR
                      description: A. Test 2020-12-21T17:28:39.715Z
                      recipient_name: Woodrow Torp
                      recipient_iban: GB33BUKB20201555555555
                      recipient_country: LV
                      recipient_address: 788 Kara Manors
                      beneficiary_bank:
                        bic: BUKBGB22XXX
                        bank: BARCLAYS BANK UK PLC
                        address: United Kingdom, Leicester
                        country: GB
                        sepa: true
                      status: inprogress
                      processing_date: '2020-12-21T19:28:39Z'
                      ip: 109.110.0.1
                    - id: A-a10903fb-f67d-49ca-af15-dd3748a791d9
                      amount: 203
                      fee:
                        amount: 50
                        currency: EUR
                      description: A. Test 2020-12-21T17:40:12.458Z
                      recipient_name: Ellis Grant PhD
                      recipient_iban: GB33BUKB20201555555555
                      recipient_country: LV
                      recipient_address: 7410 VonRueden Turnpike
                      beneficiary_bank:
                        bic: BUKBGB22XXX
                        bank: BARCLAYS BANK UK PLC
                        address: United Kingdom, Leicester
                        country: GB
                        sepa: true
                      status: inprogress
                      processing_date: '2020-12-21T19:40:11Z'
                      ip: 109.110.0.1
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SepaModel'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '408':
          $ref: '#/components/responses/Timeout'
        '500':
          $ref: '#/components/responses/InternalError'
  /accounts/{accountId}/transfers/world/currencies:
    get:
      tags:
        - Transfer
      operationId: currencyListWorld
      summary: Currency list World
      description: Get available transfer currency list
      x-scopes:
        - transfer
      security:
        - basicMab: []
      parameters:
        - $ref: '#/components/parameters/partnerCode'
        - $ref: '#/components/parameters/accountId'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CurrencyListModel'
              example:
                currencies:
                  - EUR
                  - RUB
                  - GBP
                  - PLN
                  - CHF
                  - USD
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '408':
          $ref: '#/components/responses/Timeout'
        '500':
          $ref: '#/components/responses/InternalError'
  /accounts/{accountId}/transfers/world/fee:
    post:
      tags:
        - Transfer
      operationId: transferFeeWorld
      summary: World fee
      description: Calculate World transfer fee
      x-scopes:
        - transfer
      security:
        - basicMab: []
      parameters:
        - $ref: '#/components/parameters/partnerCode'
        - in: path
          name: accountId
          description: The unique identifier of the account
          required: true
          schema:
            type: string
      requestBody:
        description: Fee calculate parameters
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorldTransferFeeCalculateModel'
            example:
              parameters:
                amount: 100
                currency: USD
                charges_type: our
                priority: standard
                recipient_account: '40702810'
                bank_country: ru
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorldTransferFeeCalculateModel'
              example:
                fee:
                  amount: 3678
                  currency: USD
                parameters:
                  amount: 100
                  currency: USD
                  charges_type: our
                  priority: standard
                  recipient_account: '40702810'
                  bank_country: ru
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '408':
          $ref: '#/components/responses/Timeout'
        '500':
          $ref: '#/components/responses/InternalError'
  /accounts/{accountId}/transfers/world:
    post:
      tags:
        - Transfer
      operationId: createTransferWorld
      summary: Create World
      description: Create World transfer
      x-scopes:
        - transfer
      security:
        - basicMab: []
      parameters:
        - $ref: '#/components/parameters/requestId'
        - $ref: '#/components/parameters/partnerCode'
        - in: path
          name: accountId
          description: Unique identifier of the account
          required: true
          schema:
            type: string
      requestBody:
        description: Transfer
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorldModel'
            example:
              id: A-df3788ff-9465-4089-976c-1d3cd43295ce
              amount: 202
              currency: EUR
              charges_type: sha
              priority: standard
              description: A. Test 2020-12-19T18:57:06.025Z
              recipient_name: Clayton Hills
              recipient_account: GB33BUKB20201555555555
              recipient_country: LV
              recipient_address: 3726 King Fall
              beneficiary_bank:
                bic: SOGEDEFF
                bank: Societe Generale
                address: 60311, Frankfurt am Main, Neue mainzer strasse 46-50
                country: DE
              ip: 109.110.0.1
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorldModel'
              example:
                id: A-df3788ff-9465-4089-976c-1d3cd43295ce
                amount: 202
                currency: EUR
                fee:
                  amount: 3000
                  currency: EUR
                priority: standard
                charges_type: sha
                description: A. Test 2020-12-19T18:57:06.025Z
                recipient_name: Clayton Hills
                recipient_account: GB33BUKB20201555555555
                recipient_country: LV
                recipient_address: 3726 King Fall
                beneficiary_bank:
                  bic: SOGEDEFF
                  bank: Societe Generale
                  address: 60311, Frankfurt am Main, Neue mainzer strasse 46-50
                  country: DE
                status: inprogress
                processing_date: '2020-12-19T18:58:58Z'
                ip: 109.110.0.1
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '408':
          $ref: '#/components/responses/Timeout'
        '500':
          $ref: '#/components/responses/InternalError'
    get:
      tags:
        - Transfer
      operationId: listTransfersWorld
      summary: World transfers
      description: |
        List world transfers

        #### Filter fields

         |  Field                 | Type   |
         |:--------               |:-----: |
         | processing_date        | date   |

        #### Filter example with limit/offset:
        `GET /v1/accounts/LT773190000201000136/transfers/world?limit=50&offset=2&filter=processing_date[gte]2020-12-21%20and%20processing_date[lt]2020-12-22`
      x-scopes:
        - transfer
      security:
        - basicMab: []
      parameters:
        - $ref: '#/components/parameters/partnerCode'
        - in: path
          name: accountId
          description: Unique identifier of the account
          required: true
          schema:
            type: string
        - in: query
          name: id
          description: Unique identifier of the transfer
          schema:
            type: string
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/filter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/WorldModel'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '408':
          $ref: '#/components/responses/Timeout'
        '500':
          $ref: '#/components/responses/InternalError'
  /accounts/{accountId}/transfers/internal/fee:
    post:
      tags:
        - Transfer
      operationId: transferFeeInternal
      summary: Internal fee
      description: Calculate Internal transfer fee.
      x-scopes:
        - transfer
      security:
        - basicMab: []
      parameters:
        - $ref: '#/components/parameters/partnerCode'
        - in: path
          name: accountId
          description: The unique identifier of the account
          required: true
          schema:
            type: string
      requestBody:
        description: Fee calculate parameters
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InternalTransferFeeCalculateModel'
            example:
              parameters:
                amount: 1500
                currency: EUR
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalTransferFeeCalculateModel'
              example:
                fee:
                  amount: 50
                  currency: EUR
                parameters:
                  amount: 1500
                  currency: EUR
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '408':
          $ref: '#/components/responses/Timeout'
        '500':
          $ref: '#/components/responses/InternalError'
  /accounts/{accountId}/transfers/internal:
    post:
      tags:
        - Transfer
      operationId: createTransferInternal
      summary: Create internal
      description: Create Internal transfer
      x-scopes:
        - transfer
      security:
        - basicMab: []
      parameters:
        - $ref: '#/components/parameters/requestId'
        - $ref: '#/components/parameters/partnerCode'
        - in: path
          name: accountId
          description: Unique identifier of the account
          required: true
          schema:
            type: string
      requestBody:
        description: Account transfer
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InternalModel'
            example:
              id: A-{{$guid}}
              amount: 500004
              currency: EUR
              description: A. Test {{$isoTimestamp}}
              recipient_name: '{{$randomFullName}}'
              recipient_iban: LT503190000201000137
              ip: 109.110.0.1
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalModel'
              examples:
                done:
                  description: Transfer created and processed
                  value:
                    id: A-408bacca-22ac-45e7-9296-7fae7403ba8b
                    amount: 504
                    currency: EUR
                    description: A. Test 2021-01-29T13:26:39.096Z
                    recipient_name: Wilbur Prosacco
                    recipient_iban: LT503190000201000137
                    status: done
                    processing_date: '2021-01-29T13:26:45Z'
                    ip: 109.110.0.1
                inprogress:
                  description: Transfer created and waiting for process
                  value:
                    id: A-408bacca-22ac-45e7-9296-7fae7403ba8b
                    amount: 500004
                    currency: EUR
                    description: A. Test 2021-01-29T13:26:39.096Z
                    recipient_name: Wilbur Prosacco
                    recipient_iban: LT503190000201000137
                    status: inprogress
                    processing_date: '2021-01-29T13:26:45Z'
                    ip: 109.110.0.1
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '408':
          $ref: '#/components/responses/Timeout'
        '500':
          $ref: '#/components/responses/InternalError'
    get:
      tags:
        - Transfer
      operationId: listTransfersInternal
      summary: Internal transfers
      description: |
        List Internal transfers.

        #### Filter fields

        |  Field                 | Type   |
        |:--------               |:-----: |
        | processing_date        | date   |

        #### Filter example with limit/offset:

        `GET /v1/accounts/LT773190000201000136/transfers/internal?limit=50&offset=2&filter=processing_date[gte]2020-12-21%20and%20processing_date[lt]2020-12-22`
      x-scopes:
        - transfer
      security:
        - basicMab: []
      parameters:
        - $ref: '#/components/parameters/partnerCode'
        - in: path
          name: accountId
          description: Unique identifier of the account
          required: true
          schema:
            type: string
        - in: query
          name: id
          description: Unique identifier of the transfer
          schema:
            type: string
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/filter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/InternalModel'
              examples:
                empty:
                  description: No transfers found
                  value: []
                list:
                  description: List of transfers
                  value:
                    - id: A-7866870f-625d-4517-bd1a-05171f560194
                      amount: 503
                      currency: EUR
                      description: A. Test 2021-01-29T13:26:06.363Z
                      recipient_name: Mr. Erma Stiedemann
                      recipient_iban: LT503190000201000137
                      status: done
                      processing_date: '2021-01-29T15:26:02Z'
                      ip: 109.110.0.1
                    - id: A-593d3e53-4341-4e6f-9032-ec334acafd14
                      amount: 50004
                      currency: EUR
                      description: A. Test 2021-01-29T13:26:31.708Z
                      recipient_name: Wesley Miller
                      recipient_iban: LT503190000201000137
                      status: done
                      processing_date: '2021-01-29T15:26:27Z'
                      ip: 109.110.0.1
                    - id: A-408bacca-22ac-45e7-9296-7fae7403ba8b
                      amount: 500004
                      currency: EUR
                      description: A. Test 2021-01-29T13:26:39.096Z
                      recipient_name: Wilbur Prosacco
                      recipient_iban: LT503190000201000137
                      status: error
                      processing_date: '2021-01-29T15:26:35Z'
                      ip: 109.110.0.1
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '408':
          $ref: '#/components/responses/Timeout'
        '500':
          $ref: '#/components/responses/InternalError'
  /attachments:
    post:
      tags:
        - Services
      operationId: createAttachment
      description: Attachment end point __WIP__
      summary: Create attachment
      security:
        - basicMab: []
      parameters:
        - $ref: '#/components/parameters/requestId'
        - $ref: '#/components/parameters/partnerCode'
      requestBody:
        description: |-
          Add object attachment.
          Sample request:
          ```
            POST /v1/attachments/ HTTP/1.1

            x-request-id: ce19969a-fd00-46cc-8870-5b2209c61fa0
            Content-Type: multipart/form-data; boundary=--------------------------037086576027847505154119
            Content-Length: 13873950
            ----------------------------037086576027847505154119
            Content-Disposition: form-data; name="file"; filename="attachment.pdf"

            <.....>
            ----------------------------037086576027847505154119
            Content-Disposition: form-data; name="metadata"

            {
              "document_type": "PASSPORT",
              "document_number": "1XA43652",
              "country": "LV",
              "issued_at": "2020-12-31",
              "expired_at": "2030-12-31",
              "additional": "Some data"
            }
            ----------------------------037086576027847505154119--
          ```
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AttachmentModel'
            encoding:
              metadata:
                contentType: application/json
              file:
                contentType: application/octet-stream
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AttachmentCreatedModel'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '408':
          $ref: '#/components/responses/Timeout'
        '500':
          $ref: '#/components/responses/InternalError'
  /service/iban/{iban}:
    get:
      tags:
        - Services
      operationId: checkIban
      summary: Check IBAN
      description: IBAN validation
      security: []
      parameters:
        - in: path
          name: iban
          description: IBAN for validation
          example: GB33BUKB20201555555555
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IbanBankDataModel'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '408':
          $ref: '#/components/responses/Timeout'
        '500':
          $ref: '#/components/responses/InternalError'
  /healthcheck:
    get:
      tags:
        - System
      operationId: checkSystemHealth
      summary: Healthcheck
      description: Healthcheck
      security: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseStringModel'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '408':
          $ref: '#/components/responses/Timeout'
        '500':
          $ref: '#/components/responses/InternalError'
x-webhooks:
  registrationStatusEvent:
    post:
      tags:
        - Webhooks
      operationId: receiveRegistrationStatusEvent
      summary: Client registration status changed
      description: |
        Delivered when a client registration application moves to a different status.

        Current resources in this family:

        | `resource`    | Meaning                     | `action` values   |
        | :------------ | :-------------------------- | :---------------- |
        | `corp_reg`    | Company registration        | `status_changed`  |
        | `private_reg` | Private person registration | `status_changed`  |

        Only genuine status transitions are delivered: an update that leaves the mapped status
        unchanged produces no event, and there are no `created` / `updated` / `deleted` events for
        this family. `data.status` is the status **after** the change; the previous status is not
        carried, so keep the last value you saw if you need the transition.
      security: []
      parameters:
        - $ref: '#/components/parameters/webhookEventType'
        - $ref: '#/components/parameters/webhookMessageId'
        - $ref: '#/components/parameters/webhookEventVersion'
        - $ref: '#/components/parameters/webhookTimestamp'
        - $ref: '#/components/parameters/webhookSignature'
        - $ref: '#/components/parameters/webhookNonce'
      requestBody:
        required: true
        description: The registration status event.
        content:
          application/json:
            schema:
              type: object
              description: Registration status transition event.
              required:
                - event_id
                - event_type
                - resource
                - action
                - occurred_at
                - data
              properties:
                event_id:
                  description: |
                    Unique identifier of this event, also sent as `X-Webhook-Message-Id`. Use it as
                    the idempotency key. It is a UUID v7, so lexicographic order matches emission
                    order for events from the same source.
                  type: string
                  format: uuid
                  nullable: false
                event_type:
                  description: Event type, always `{resource}.{action}`.
                  type: string
                  nullable: false
                  maxLength: 100
                resource:
                  description: 'Resource segment of `event_type`: `corp_reg` or `private_reg`.'
                  type: string
                  nullable: false
                  maxLength: 100
                action:
                  description: Action segment of `event_type`.
                  type: string
                  nullable: false
                  enum:
                    - status_changed
                occurred_at:
                  description: |
                    Time the change was committed, ISO-8601 UTC with exactly three fractional digits
                    and a literal `Z`.
                  type: string
                  format: date-time
                  nullable: false
                data:
                  description: Event data.
                  type: object
                  required:
                    - status
                  properties:
                    id:
                      description: |
                        External identifier of the registration application, as returned when it was
                        created through the partner API. Omitted when the application has no external
                        identifier.
                      type: string
                      maxLength: 64
                    status:
                      description: |
                        Registration status after the change.

                        | Code         | Description                                    |
                        | :----------- | :--------------------------------------------- |
                        | `inprogress` | Under review. Also the fallback for a status that has no external mapping |
                        | `done`       | Review finished successfully                    |
                        | `active`     | Client is active                                |
                        | `inactive`   | Client is no longer active                      |
                        | `rejected`   | Application rejected                            |
                      type: string
                      nullable: false
                      enum:
                        - inprogress
                        - done
                        - active
                        - inactive
                        - rejected
            examples:
              private_reg_status_changed:
                description: Private person registration finished review.
                value:
                  event_id: F8BB710B-F047-DA81-7000-019FA534494E
                  event_type: private_reg.status_changed
                  resource: private_reg
                  action: status_changed
                  occurred_at: '2026-07-27T19:52:58.943Z'
                  data:
                    id: 5EAE8368-11B8-4A4C-B12E-6C26BC44B6C9
                    status: done
              corp_reg_status_changed:
                description: Company registration moved into review.
                value:
                  event_id: F8BB7119-63A2-DA81-7000-019FA5344A20
                  event_type: corp_reg.status_changed
                  resource: corp_reg
                  action: status_changed
                  occurred_at: '2026-07-27T20:04:11.286Z'
                  data:
                    id: 35223EA7-C879-49AB-B50B-C8BA289F1807
                    status: inprogress
              private_reg_rejected_without_external_id:
                description: |
                  Registration rejected, for an application that was not created through the partner
                  API and therefore has no external identifier -- `data.id` is omitted, but `status`
                  is always there.
                value:
                  event_id: F8BB7122-84D0-DA81-7000-019FA5344AB9
                  event_type: private_reg.status_changed
                  resource: private_reg
                  action: status_changed
                  occurred_at: '2026-07-27T20:11:37.512Z'
                  data:
                    status: rejected
      responses:
        '200':
          $ref: '#/components/responses/WebhookAccepted'
        '408':
          $ref: '#/components/responses/WebhookRetryTimeout'
        '429':
          $ref: '#/components/responses/WebhookRetryTooManyRequests'
        4XX:
          $ref: '#/components/responses/WebhookRejected'
        5XX:
          $ref: '#/components/responses/WebhookRetry'
components:
  responses:
    BadRequest:
      description: BadRequest
      content:
        application/json:
          examples:
            invalid_argument:
              value:
                failure_type: error
                failure_message: Invalid partner code
                detail:
                  error_id: c8535148-6cab-4968-9b97-db398ea32772
                  error_source: Hooks
                  status: '400'
                  code: invalid_argument
                  title: Invalid Argument
                  detail: Invalid partner code
            client_country_error:
              description: Client create validation error sample
              value:
                failure_type: error
                failure_message: Client is not a citizen/resident of EU/EEA/EFTA countries
                detail:
                  error_id: 16f2a80f-c6f4-40ed-8537-8ad8bace4609
                  error_source: Hooks
                  status: '400'
                  code: invalid_data
                  title: Invalid Data
                  detail: Client is not a citizen/resident of EU/EEA/EFTA countries
            sepa_transfer_invalid_iban:
              description: SEPA transfer. Invalid IBAN sample.
              value:
                failure_type: error
                failure_message: 'IBAN validation error: Account Number check digit not correct. IBAN structure is not correct'
                detail:
                  error_id: 0f22eb46-fed0-4d0a-9d9b-96da4a370a59
                  error_source: Hooks
                  status: '400'
                  code: invalid_data
                  title: Invalid Data
                  detail: 'IBAN validation error: Account Number check digit not correct. IBAN structure is not correct'
          schema:
            $ref: '#/components/schemas/ErrorMabModel'
    NotFound:
      description: NotFound
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorMabModel'
    Timeout:
      description: Timeout
      content:
        application/json:
          example:
            failure_type: error
            failure_message: Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
            detail:
              error_id: a1431101-8e88-4f29-b019-6aa004071ae1
              error_source: Hooks
              status: '408'
              code: timeout_api_error
              title: API timeout error
              detail: Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
          schema:
            $ref: '#/components/schemas/ErrorMabModel'
    InternalError:
      description: InternalError
      content:
        application/json:
          example:
            failure_type: error
            failure_message: Internal error
            detail:
              error_id: 5e0e5c15-e077-47d5-9915-fc3737765e64
              error_source: Hooks
              status: '500'
              code: internal_error
              title: Internal error
              detail: Internal error
          schema:
            $ref: '#/components/schemas/ErrorMabModel'
    Unauthorized:
      description: Unauthorized
    WebhookAccepted:
      description: |
        Event accepted. Any `2xx` status counts as success and the body is discarded; return `200` with
        an empty body unless response signing was agreed.

        Acknowledge as soon as you have durably stored the event, and do your processing afterwards --
        the delivery times out on the TeslaPay side and a slow receiver is retried, producing duplicate
        deliveries of the same `event_id`.
      headers:
        X-Webhook-Signature:
          description: |
            Optional, and only if response signing was agreed for your endpoint. Signature of your
            response body, produced with your private key. TeslaPay verifies it with the public key
            registered for the endpoint, and a verification failure marks the delivery permanently
            failed **even though the status was 2xx** -- so omit this header unless it was agreed.
          required: false
          schema:
            type: string
        Nonce:
          description: |
            Optional echo of the request `Nonce`. When present it must equal the value sent, otherwise
            the delivery is marked permanently failed.
          required: false
          schema:
            type: integer
            format: int64
    WebhookRetryTimeout:
      description: |
        Temporary failure. Retried with exponential backoff, then abandoned once the configured attempt
        limit is reached.
    WebhookRetryTooManyRequests:
      description: |
        Rate limited. Treated exactly like `408` -- retried with exponential backoff. There is no
        `Retry-After` support; the backoff schedule is fixed per installation.
    WebhookRejected:
      description: |
        Permanent rejection. The delivery is marked failed and is **never** retried, so do not use a
        `4xx` for a condition that would succeed later -- return `5xx` for that. Applies to every `4xx`
        except `408` and `429`.
    WebhookRetry:
      description: |
        Temporary failure. Retried with exponential backoff, then abandoned once the configured attempt
        limit is reached. Network errors and read timeouts are handled the same way.
  securitySchemes:
    basicMab:
      type: http
      scheme: basic
      description: |
        <span type="warning" class="sc-bqGGPW eSYQnm"> Deprecated </span> ~~This API uses Basic Authentication~~
  parameters:
    partnerCode:
      in: header
      name: x-partner-code
      description: The unique identifier of the external system
      required: true
      deprecated: true
      schema:
        type: string
        nullable: false
        maxLength: 255
    offset:
      in: query
      name: offset
      description: The number of items to skip before starting to collect the result set.
      required: false
      schema:
        $ref: '#/components/schemas/offsetType'
    limit:
      in: query
      name: limit
      description: The numbers of items to return.
      required: false
      schema:
        $ref: '#/components/schemas/limitType'
    filter:
      in: query
      name: filter
      description: LHS [filter](#section/Macrobank-core-API/LHS-Brackets-filtering-support) expression.
      required: false
      schema:
        type: string
    requestId:
      in: header
      name: x-request-id
      description: Request id. Will act as an idempotency key
      required: true
      schema:
        type: string
        nullable: false
        maxLength: 64
    clientId:
      in: path
      name: clientId
      description: The unique identifier of the client
      required: true
      schema:
        type: string
        maxLength: 64
    accountId:
      in: path
      name: accountId
      description: The unique identifier of the account
      required: true
      schema:
        type: string
        maxLength: 64
    webhookEventType:
      in: header
      name: X-Webhook-Event-Type
      description: Event type of the delivered event. Always equal to the `event_type` body property.
      example: private_reg.status_changed
      required: true
      schema:
        type: string
        nullable: false
        maxLength: 100
    webhookMessageId:
      in: header
      name: X-Webhook-Message-Id
      description: |
        Unique identifier of this delivery. Always equal to the `event_id` body property -- use it as
        the idempotency key. One source change produces one message per subscribed endpoint, so the
        same change reaches two receivers under two different ids.
      example: f8bb710b-f047-da81-7000-019fa534494e
      required: true
      schema:
        type: string
        format: uuid
        nullable: false
    webhookEventVersion:
      in: header
      name: X-Webhook-Event-Version
      description: Payload contract version. Always `1` for the shape described here.
      example: 1
      required: true
      schema:
        type: integer
        format: int32
        nullable: false
    webhookTimestamp:
      in: header
      name: X-Webhook-Timestamp
      description: |
        Time the message was queued, with 7 fractional digits. Two caveats: it is the queueing time,
        not the change time -- use the `occurred_at` body property for that; and it carries **no** `Z`
        suffix or UTC offset, unlike `occurred_at`.
      example: '2026-07-27T19:52:59.1234567'
      required: true
      schema:
        type: string
        nullable: false
    webhookSignature:
      in: header
      name: X-Webhook-Signature
      description: |
        Signature of the raw request body. Absent when no signing key is configured for the
        installation. Verification recipe in the Webhooks tag description.
      required: false
      schema:
        type: string
    webhookNonce:
      in: header
      name: Nonce
      description: |
        Random 63-bit integer, regenerated per delivery attempt. Note the header is named `Nonce`, not
        `X-Webhook-Nonce`. It is **not** covered by `X-Webhook-Signature` and is not remembered between
        attempts, so it cannot be used for replay detection -- deduplicate on `event_id` instead.
      example: 4821739065512340000
      required: true
      schema:
        type: integer
        format: int64
        nullable: false
  schemas:
    offsetType:
      description: The number of items to skip before starting to collect the result set.
      type: integer
      format: int64
      minimum: 0
      maximum: 2147483647
    limitType:
      description: The numbers of items to return.
      type: integer
      format: int64
      minimum: 1
      maximum: 100
    AddressDetailsModel:
      type: object
      description: Object containing the address details
      x-no-response-model: true
      required:
        - country
        - city
        - line
        - postal_code
      properties:
        line:
          type: string
          maxLength: 255
        postal_code:
          type: string
          maxLength: 10
        city:
          type: string
          maxLength: 35
        country:
          description: Country of the home address, uses ISO 3661 alpha-2 Codes
          type: string
          minLength: 2
          maxLength: 2
    taxIdModel:
      description: The Tax ID object. Required for clients
      type: object
      required:
        - number
        - country
      properties:
        number:
          description: |
            Value of the tax ID
          type: string
          minLength: 4
          maxLength: 32
        country:
          description: Two-letter ISO 3661 code representing the country of the tax ID
          type: string
          maxLength: 2
        main:
          description: |
            Flag indicating whether this is the main tax ID for the person or company
          type: boolean
    PepModel:
      type: object
      description: PEP details. Required if PEP status code `PEP` or `PEPC`
      x-no-response-model: true
      required:
        - country
        - position
      properties:
        country:
          description: Of which country PEP, uses ISO 3661 alpha-2 Codes
          type: string
          maxLength: 2
          nullable: false
        position:
          description: PEP position
          type: string
          maxLength: 255
          nullable: false
        name:
          description: PEP name. Required if PEP status code `PEPC`
          type: string
          maxLength: 255
        relation:
          description: |
            Please specify the relationship with a PEP. Required if PEP status code `PEPC`

            |  Code  | Description      |
            |:------:|:-----------------|
            | PEPREL | Relative         |
            | PEPBUS | Business contact |
          type: string
    OccupationModel:
      type: object
      description: Occupation details. Required for person with kind=client
      x-no-response-model: true
      required:
        - position
        - specific_position
        - criminal
        - tesla_funds
        - crypto_currency
      properties:
        position:
          description: |
            Position

            | Code       | Description              |
            |:-----------|:-------------------------|
            | EMPLOYEE   | Employee                 |
            | OWNER      | Business owner           |
            | OTHER      | Other                    |
          type: string
        other:
          description: Used if position code 'OTHER'.
          type: string
          maxLength: 255
        company:
          description: Used if position code 'EMPLOYEE'.
          type: string
          maxLength: 255
        name_of_own_business:
          description: Required if position code 'OWNER'.
          type: string
          maxLength: 255
        specific_position:
          description: |
            "Is your profession on the list below?"
              - Accountant
              - Advocate/Solicitor
              - Bailiff
              - Builder
              - Diplomat
              - Doctor
              - Estate Agent
              - Financial Services Consultant
              - Judge
              - Lawyer
              - Notary
              - Politician
              - Ship Owner
              - Tax advisor
              - Jeweller
          type: boolean
        criminal:
          description: Do you have a criminal record?
          type: boolean
        tesla_funds:
          description: I confirm that I am the owner of the funds
          type: boolean
        crypto_currency:
          description: Selling/buying virtual currencies
          type: boolean
    IdDocumentModel:
      x-no-response-model: true
      description: Identification document information
      type: object
      required:
        - type
        - number
        - expire_date
      properties:
        type:
          description: |
            Identification document type

            | Code | Value            |
            |:---- |:-----------------|
            | CCPT | PASSPORT         |
            | RPMT | RESIDENCE_PERMIT |
            | NIDN | ID_CARD          |
          type: string
        number:
          description: Identification document number
          type: string
          maxLength: 32
        expire_date:
          description: Identification document expiration date as defined by RFC 3339, section 5.6
          type: string
          format: date
    SourceOfIncome:
      type: object
      description: Source of income details
      x-no-response-model: true
      properties:
        savings:
          description: Savings
          type: boolean
        salary:
          description: Salary
          type: boolean
        property_sale:
          description: Property sale
          type: boolean
        receivable_dividends:
          description: Divorce Settlement
          type: boolean
        inheritance_gifts:
          description: Inheritance/Gifts
          type: boolean
        other:
          description: Other
          type: boolean
        other_comment:
          description: Other source comment
          type: string
          maxLength: 255
    ipType:
      description: A string containing the IP address of the client from whom the request was received.
      type: string
      maxLength: 15
      minLength: 7
    PersonModel:
      type: object
      description: Person attributes
      required:
        - gender
        - first_name
        - last_name
        - birth_date
        - contact_mobile_number
        - email
        - address
        - nationality
        - national_id_number
        - tax_id
        - us_person
        - pep_person
        - occupation
        - source_of_income
        - ip
      properties:
        id:
          description: The unique identifier of the person.
          type: string
          minLength: 3
          maxLength: 64
          readOnly: true
        status:
          description: Person status. Statuses will be discussed later.
          type: string
          readOnly: true
        gender:
          description: |
            Person gender

            | Code | Description |
            |:-----|:------------|
            |  U   | Other       |
            |  F   | Female      |
            |  M   | Male        |
          type: string
        first_name:
          description: First name of the person
          type: string
          minLength: 2
          maxLength: 50
        last_name:
          description: Last name of the person
          type: string
          minLength: 2
          maxLength: 50
        address:
          $ref: '#/components/schemas/AddressDetailsModel'
        email:
          description: Email address of the person
          type: string
          maxLength: 255
        contact_mobile_number:
          description: Contact Mobile Number with country code (E.164 recommendation).
          pattern: ^\+\d{4,15}$
          type: string
          maxLength: 16
        birth_date:
          description: Birth date of the person (Any date from 1900-01-01 onward as defined by RFC 3339, section 5.6)
          type: string
          format: date
        nationality:
          description: Nationality of the person, uses ISO 3661 alpha-2 Codes
          type: string
          maxLength: 2
        residence:
          description: Residence country of the person, uses ISO 3661 alpha-2 Codes
          type: string
          maxLength: 2
        national_id_number:
          description: |
            Personal number/code from an identity document. If there is no personal number/code, use the date of birth in the following format: YYYY.MM.DD
          type: string
          maxLength: 32
        tax_id:
          $ref: '#/components/schemas/taxIdModel'
        marketing_flag:
          description: Agree to be contacted for direct marketing purposes
          type: boolean
        referral_code:
          description: Referral program code
          type: string
          maxLength: 255
        us_person:
          description: U.S. person status
          type: boolean
        pep_person:
          description: |
            PEP status

            | Code  | Description                                      |
            |:------|:-------------------------------------------------|
            | NOPEP | No, not a PEP                                    |
            | PEP   | YES                                              |
            | PEPC  | YES, a family member or close associate of a PEP |
          type: string
        pep_details:
          $ref: '#/components/schemas/PepModel'
        occupation:
          $ref: '#/components/schemas/OccupationModel'
        document:
          $ref: '#/components/schemas/IdDocumentModel'
        source_of_income:
          $ref: '#/components/schemas/SourceOfIncome'
        site_info:
          description: WEB link to the current status of onboarding application or additional information request.
          type: string
          readOnly: true
        remote_client_id:
          description: Remote system client identifier
          type: string
          maxLength: 255
        ip:
          $ref: '#/components/schemas/ipType'
        additional_data:
          description: |
            Optional object that contains additional information submission for processing.

            Available objects:

            #### Sumsub applicant object. 

              | Property      | Type   | Required | Description   |
              | :------------ | ------ | -------- | :------------ |
              | id            | String | Yes      | Applicant Id  |
              | inspection_id | String | Yes      | Inspection Id |

            ##### Example:

              ```json
            "sumsub": {
              "id": "5f80e6b7155a6336271e4677",
              "inspection_id": "123456b7155a6336271e6789"
            }
              ```

            #### Veriff session id object

              | Property   | Type   | Required | Description       |
              | :--------- | ------ | -------- | :---------------- |
              | session_id | String | Yes      | Veriff session Id |

            ##### Example:

              ```json
            "veriff": {
              "session_id": "c6f5b969-f672-45d3-9334-4413d6469c11"
            }
              ```
          type: object
    ClientModel:
      type: object
      description: Client attributes
      required:
        - client_type
        - client
      properties:
        client_type:
          description: Client type
          type: string
          enum:
            - PERSON
        client:
          $ref: '#/components/schemas/PersonModel'
    ErrorFieldModel:
      x-no-response-model: true
      description: If a model is involved, this object contains information on which attribute the error occurred - optional
      properties:
        uri:
          description: The model's attribute that raised the error
          type: string
        message:
          description: A human readable error message that describes the error
          type: string
    ErrorObjectModel:
      type: object
      description: Error object
      example:
        error_id: f7295cf9-7ec9-43b0-8961-156ab6eac092
        error_source: Hooks
        status: '500'
        code: internal_error
        title: Internal error
      properties:
        error_id:
          description: Unique ID for the error
          type: string
        error_source:
          description: Source of error
          type: string
        status:
          description: HTTP status code
          type: string
        code:
          description: Computer readable code for error handling
          type: string
        title:
          description: Human readable generic error message
          type: string
        detail:
          description: Human readable error message containing all details available
          type: string
    ErrorMabModel:
      type: object
      description: |
        Macrobank error object.
      example:
        failure_type: error
        failure_message: Invalid partner code
        detail:
          error_id: c8535148-6cab-4968-9b97-db398ea32772
          error_source: Hooks
          status: '400'
          code: invalid_argument
          title: Invalid Argument
          detail: Invalid partner code
      properties:
        failure_type:
          description: Failure type
          type: string
          enum:
            - error
            - validation
        failure_message:
          type: string
          description: Human readable message
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ErrorFieldModel'
        detail:
          $ref: '#/components/schemas/ErrorObjectModel'
    PersonUpdateModel:
      type: object
      description: Person update model
      properties:
        contact_mobile_number:
          description: Contact Mobile Number with country code (E.164 recommendation). No spaces allowed.
          type: string
          pattern: ^\+\d{4,15}$
          maxLength: 16
    ClientUpdateModel:
      type: object
      description: Update client attributes
      required:
        - client_type
        - client
      properties:
        client_type:
          description: Client type
          type: string
          enum:
            - PERSON
        client:
          $ref: '#/components/schemas/PersonUpdateModel'
    AccountModel:
      type: object
      description: Account details
      properties:
        id:
          description: Unique identifier of the account (IBAN)
          type: string
          minLength: 3
          readOnly: true
        type:
          description: Account type
          type: string
          enum:
            - payment
            - other
          readOnly: true
        iban:
          description: IBAN of the account
          type: string
          maxLength: 32
          readOnly: true
        bic:
          description: BIC of the bank's account
          type: string
          maxLength: 11
          readOnly: true
        status:
          description: Read-only account status indicating whether the account is active or inactive (i.e. closed)
          type: string
          enum:
            - active
            - inactive
            - closed
          readOnly: true
    currencyType:
      description: Currency in ISO 4217 alpha-3 format
      type: string
      minLength: 3
      maxLength: 3
    balanceAmountType:
      description: Balance amount specified in minor units of currency
      nullable: false
      type: integer
      format: int64
      minimum: 0
      maximum: 2147483647
    AccountBalanceDetailsModel:
      type: object
      description: Account balance details
      x-no-response-model: true
      properties:
        iban:
          description: IBAN of the account
          type: string
          maxLength: 32
        currency:
          $ref: '#/components/schemas/currencyType'
        opening:
          type: object
          description: Balance opening
          properties:
            date:
              description: Date
              type: string
              format: date
            balance:
              $ref: '#/components/schemas/balanceAmountType'
        closing:
          type: object
          description: Balance closing
          properties:
            date:
              description: Date
              type: string
              format: date
            balance:
              $ref: '#/components/schemas/balanceAmountType'
    AccountBalanceModel:
      type: object
      description: Account balance
      properties:
        issue_date:
          description: Balance calculation date-time. The date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z
          type: string
          format: date-time
          x-format-iso: 'yes'
        balances:
          description: Balances
          type: array
          items:
            $ref: '#/components/schemas/AccountBalanceDetailsModel'
    statementAmountType:
      description: Statement amount specified in minor units of currency
      nullable: false
      type: integer
      format: int64
      minimum: -2147483646
      maximum: 2147483647
    AccountStatementRecordModel:
      type: object
      description: Statement records
      x-no-response-model: true
      properties:
        document_reference:
          description: Document reference in core system
          type: string
        external_id:
          description: Document external id
          type: string
        transaction_reference:
          description: Transaction reference in core system
          type: string
          maxLength: 8
        date:
          description: Transaction date
          type: string
          format: date
        type:
          description: |-
            Transaction type

            | Type        | Description                           |
            | :---------- | :------------------------------------ |
            | FEE         | Fee transaction                       |
            | EXTERNAL_I  | Incoming external payment             |
            | EXTERNAL_O  | Outgoing external payment             |
            | INTERNAL    | Internal payment incoming or outgoing |
            | EXCHANGE    | FX operation                          |
            | TRANSACTION | Another transaction                   |
          type: string
        amount:
          $ref: '#/components/schemas/statementAmountType'
        currency:
          $ref: '#/components/schemas/currencyType'
        details:
          description: Transaction details
          type: string
        recipient_bic:
          description: Recipient BIC
          type: string
        recipient_account:
          description: Recipient account
          type: string
        recipient_name:
          description: Recipient name
          type: string
        sender_bic:
          description: Sender BIC
          type: string
        sender_account:
          description: Sender account
          type: string
        sender_name:
          description: Sender name
          type: string
    AccountStatementModel:
      description: Statement of account
      type: object
      properties:
        issue_date:
          description: Statement calculation date-time. The date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z
          type: string
          format: date-time
          x-format-iso: 'yes'
        balance:
          $ref: '#/components/schemas/AccountBalanceDetailsModel'
        records:
          type: array
          items:
            $ref: '#/components/schemas/AccountStatementRecordModel'
    AccountOperationModel:
      type: string
      x-no-response-model: true
      description: Account operation
      enum:
        - enable
        - disable
        - close
    ResponseStringModel:
      type: object
      description: Simple string result
      properties:
        result:
          description: Request result
          type: string
    FeeModel:
      type: object
      x-no-response-model: true
      description: Transfer fee
      readOnly: true
      properties:
        amount:
          description: Amount of per-operation fee specified in minor units of the fee currency
          type: integer
          format: int64
          minimum: 1
          maximum: 2147483647
          readOnly: true
          nullable: false
        currency:
          description: Currency of per-operation fee, in ISO 4217 alpha-3 format
          type: string
          minLength: 3
          maxLength: 3
          readOnly: true
    amountType:
      description: Amount specified in minor units of currency
      nullable: false
      type: integer
      format: int64
      minimum: 1
      maximum: 2147483647
    SepaTransferFeeCalculateModel:
      type: object
      description: SEPA transfer fee calculate.
      required:
        - parameters
      properties:
        fee:
          $ref: '#/components/schemas/FeeModel'
        parameters:
          description: Parameters of operation, used to calculate fee
          type: object
          required:
            - amount
            - recipient_iban
          properties:
            amount:
              $ref: '#/components/schemas/amountType'
            priority:
              description: Transfer priority
              type: string
              default: standard
              enum:
                - standard
            recipient_iban:
              description: IBAN of the fund recipient
              type: string
              maxLength: 32
    IbanBankDataModel:
      type: object
      description: Bank data
      example:
        bic: BUKBGB22XXX
        bank: BARCLAYS BANK UK PLC
        address: United Kingdom, Leicester
        country: GB
        sepa: true
      readOnly: true
      properties:
        bic:
          description: The BIC code of the issuing bank/branch or institution.
          type: string
          maxLength: 11
        bank:
          description: The name of the bank/institution that issued the IBAN
          type: string
          maxLength: 256
        address:
          description: The issuing bank address.
          type: string
          maxLength: 128
        country:
          description: Country of the home address, uses ISO 3661 alpha-2 Codes
          type: string
          maxLength: 2
        sepa:
          description: SEPA available
          type: boolean
    transferStatusType:
      description: Transfer status type
      type: string
      enum:
        - inprogress
        - done
        - error
      readOnly: true
    SepaModel:
      type: object
      description: SEPA Credit Transfer
      example:
        id: A-fd8f1055-7be3-4c9f-8222-ea1ca0c76259
        amount: 202
        description: Invoice payment NOZ-5432
        recipient_name: Drew Ferry
        recipient_iban: GB33BUKB20201555555555
        recipient_country: GB
        recipient_address: 46254 Winifred Parkway
        ip: 109.110.0.1
      required:
        - id
        - amount
        - recipient_name
        - recipient_iban
        - recipient_country
        - recipient_address
      properties:
        id:
          description: Unique identifier of the transfer
          type: string
          maxLength: 64
        amount:
          $ref: '#/components/schemas/amountType'
        fee:
          $ref: '#/components/schemas/FeeModel'
        description:
          description: Transfer reference the recipient will see
          type: string
          maxLength: 140
        recipient_name:
          description: Name of the fund recipient
          type: string
          maxLength: 70
        recipient_iban:
          description: IBAN of the fund recipient
          type: string
          maxLength: 32
        recipient_country:
          description: Country of the fund recipient, uses ISO 3661 alpha-2 Codes
          type: string
          maxLength: 2
        recipient_address:
          description: Address of the fund recipient
          type: string
          maxLength: 140
        beneficiary_bank:
          $ref: '#/components/schemas/IbanBankDataModel'
        status:
          $ref: '#/components/schemas/transferStatusType'
        processing_date:
          description: Timestamp of the payment's creation in our database. The date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z
          readOnly: true
          type: string
          format: date-time
          x-format-iso: 'yes'
        ip:
          $ref: '#/components/schemas/ipType'
    CurrencyListModel:
      type: object
      description: Currency list
      properties:
        currencies:
          type: array
          items:
            $ref: '#/components/schemas/currencyType'
    chargesType:
      description: Transfer charges type
      type: string
      enum:
        - ben
        - our
        - sha
    priorityType:
      description: Transfer priority
      type: string
      default: standard
      enum:
        - standard
        - urgent
    WorldTransferFeeCalculateModel:
      type: object
      description: World transfer fee calculate
      properties:
        fee:
          $ref: '#/components/schemas/FeeModel'
        parameters:
          description: Parameters of operation, used to calculate fee
          type: object
          required:
            - amount
            - currency
            - charges_type
            - priority
            - recipient_account
            - bank_country
          properties:
            amount:
              $ref: '#/components/schemas/amountType'
            currency:
              $ref: '#/components/schemas/currencyType'
            charges_type:
              $ref: '#/components/schemas/chargesType'
            priority:
              $ref: '#/components/schemas/priorityType'
            recipient_account:
              description: Account of the fund recipient
              type: string
              maxLength: 32
            bank_country:
              description: Country of the beneficiary bank address, uses ISO 3661 alpha-2 Codes
              type: string
              maxLength: 2
    BicBankDataModel:
      type: object
      description: Bank data
      example:
        bic: BUKBGB22XXX
        bank: BARCLAYS BANK UK PLC
        address: United Kingdom, Leicester
        country: GB
      required:
        - bic
        - bank
        - address
        - country
      properties:
        bic:
          description: The BIC code of the issuing bank/branch or institution.
          type: string
          maxLength: 11
        bank:
          description: The legal name of the bank/institution
          type: string
          maxLength: 256
        address:
          description: The bank address.
          type: string
          maxLength: 128
        country:
          description: Country of the bank address, uses ISO 3661 alpha-2 Codes
          type: string
          maxLength: 2
    WorldModel:
      type: object
      description: International non SEPA Credit Transfer
      required:
        - id
        - amount
        - currency
        - charges_type
        - description
        - recipient_name
        - recipient_account
        - recipient_country
        - recipient_address
        - beneficiary_bank
      properties:
        id:
          description: Unique identifier of the transfer
          type: string
          maxLength: 64
        amount:
          $ref: '#/components/schemas/amountType'
        currency:
          $ref: '#/components/schemas/currencyType'
        fee:
          $ref: '#/components/schemas/FeeModel'
        priority:
          $ref: '#/components/schemas/priorityType'
        charges_type:
          $ref: '#/components/schemas/chargesType'
        description:
          description: Transfer reference the recipient will see
          type: string
          maxLength: 140
        recipient_name:
          description: Name of the fund recipient
          type: string
          maxLength: 70
        recipient_account:
          description: Account of the fund recipient
          type: string
          maxLength: 32
        recipient_country:
          description: Country of the fund recipient, uses ISO 3661 alpha-2 Codes
          type: string
          maxLength: 2
        recipient_address:
          description: Address of the fund recipient
          type: string
          maxLength: 140
        beneficiary_bank:
          $ref: '#/components/schemas/BicBankDataModel'
        status:
          $ref: '#/components/schemas/transferStatusType'
        processing_date:
          description: Timestamp of the payment's creation in our database. The date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z
          readOnly: true
          type: string
          format: date-time
          x-format-iso: 'yes'
        ip:
          $ref: '#/components/schemas/ipType'
    InternalTransferFeeCalculateModel:
      type: object
      description: Internal transfer fee calculate.
      required:
        - parameters
      properties:
        fee:
          $ref: '#/components/schemas/FeeModel'
        parameters:
          description: Parameters of operation, used to calculate fee
          type: object
          required:
            - amount
            - currency
          properties:
            amount:
              $ref: '#/components/schemas/amountType'
            currency:
              $ref: '#/components/schemas/currencyType'
    InternalModel:
      type: object
      description: Internal Credit Transfer
      example:
        id: A-fd8f1055-7be3-4c9f-8222-ea1ca0c76259
        amount: 202
        description: Invoice payment NOZ-5432
        recipient_name: Drew Ferry
        recipient_iban: GB33BUKB20201555555555
        ip: 109.110.0.1
      required:
        - id
        - amount
        - currency
        - recipient_iban
      properties:
        id:
          description: Unique identifier of the transfer
          type: string
          maxLength: 64
        amount:
          $ref: '#/components/schemas/amountType'
        currency:
          $ref: '#/components/schemas/currencyType'
        fee:
          $ref: '#/components/schemas/FeeModel'
        description:
          description: Transfer reference the recipient will see. Ignored for transfers between own accounts.
          type: string
          maxLength: 140
        recipient_name:
          description: Name of the fund recipient
          type: string
          maxLength: 70
        recipient_iban:
          description: IBAN of the fund recipient
          type: string
          maxLength: 32
        status:
          $ref: '#/components/schemas/transferStatusType'
        processing_date:
          description: Timestamp of the payment's creation in our database. The date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z
          readOnly: true
          type: string
          format: date-time
          x-format-iso: 'yes'
        ip:
          $ref: '#/components/schemas/ipType'
    AttachmentMetadataModel:
      type: object
      description: Attachment metadata
      required:
        - country
      properties:
        document_type:
          type: string
          maxLength: 64
          description: |
            **Document types**

            | Value            | Description       |
            |------------------|-------------------|
            | PASSPORT         | Passport          |
            | RESIDENCE_PERMIT | Residence permit  |
            | ID_CARD          | ID Card           |
            | POA              | Power of attorney |
            | PROOF_OF_ADDRESS | Proof of address  |
            | OTHER            | Other document    |
        document_description:
          description: Document description. Mandatory if `document_type` value is `OTHER`
          type: string
          maxLength: 255
        document_number:
          type: string
          description: Document number, if applicable. Mandatory for personal documents
          maxLength: 64
        country:
          description: Two-letter ISO 3661 code representing the issuing country of personal documents
          type: string
          maxLength: 2
        issued_at:
          description: Document issue date. (Any date from 1900-01-01 as defined in RFC 3339, section 5.6)
          type: string
          format: date
        expired_at:
          description: Document expiry date. (Any date from 1900-01-01 as defined in RFC 3339, section 5.6)
          type: string
          format: date
        additional:
          description: Stores additional information about an attachment.
          type: string
          maxLength: 1024
    AttachmentModel:
      type: object
      description: File attachment
      required:
        - metadata
        - file
      properties:
        metadata:
          $ref: '#/components/schemas/AttachmentMetadataModel'
        file:
          description: File
          type: string
          format: binary
    AttachmentCreatedModel:
      type: object
      description: File attachment model
      properties:
        id:
          description: Unique identifier of the attachment
          type: string
          maxLength: 64
        expired_at:
          description: Attachment expiration DateTime in UTC
          type: string
          format: date-time
        metadata:
          $ref: '#/components/schemas/AttachmentMetadataModel'
  examples:
    ClientGetResponse200:
      summary: List clients response
      value:
        - client_type: PERSON
          client:
            id: 7A88C1E2-6892-4839-94AD-39B5721D297E
            status: inprogress
            gender: M
            first_name: Ivan20
            last_name: Ivanov20
            address:
              line: 41 Peshkov Street
              postal_code: PSZ1070
              city: Moscow
              country: RU
            email: ivan.ivanov@gmail.com20
            contact_mobile_number: '+994505351920'
            nationality: LV
            residence: LV
            national_id_number: '22033344'
            tax_id:
              number: '123456'
              country: LV
            marketing_flag: false
            referral_code: '0001'
            us_person: false
            pep_person: NOPEP
            occupation:
              position: Employee
              company: Sample company
              specific_position: false
              criminal: false
              tesla_funds: true
              crypto_currency: false
            document:
              type: CCPT
              number: '54321'
              expire_date: '2031-06-10'
            source_of_income:
              savings: false
              salary: true
              property_sale: true
              receivable_dividends: false
              inheritance_gifts: true
              other: true
              other_comment: Comment
            site_info: https://my-test.teslapay.eu/site/info/4XAz8FVKfxSXwbfMGbGY78KNN29uDAEvKG6FjNMH7p64bsvdk
            ip: 109.110.0.1
            birth_date: '1980-07-22'
            additional_data:
              sumsub:
                id: 5f80e6b7155a6336271e4677
                inspection_id: 123456b7155a6336271e6789
    ClientCreateRequest:
      summary: Create client
      value:
        client_type: PERSON
        client:
          gender: M
          ip: 109.110.0.1
          first_name: Ivan20
          last_name: Ivanov20
          email: ivan.ivanov@gmail.com20
          contact_mobile_number: '+994505351920'
          address:
            line: 41 Peshkov Street
            postal_code: PSZ1070
            city: Moscow
            country: RU
          birth_date: '1980-07-22'
          nationality: LV
          residence: LV
          national_id_number: '22033344'
          tax_id:
            number: '123456'
            country: LV
          marketing_flag: false
          referral_code: '0001'
          us_person: false
          occupation:
            position: Employee
            company: Sample company
            specific_position: false
            criminal: false
            tesla_funds: true
            crypto_currency: false
          document:
            type: CCPT
            number: '54321'
            expire_date: '2031-06-10'
          source_of_income:
            savings: false
            salary: true
            property_sale: true
            receivable_dividends: false
            inheritance_gifts: true
            other: true
            other_comment: Comment
          pep_person: NOPEP
          additional_data:
            sumsub:
              id: 5f80e6b7155a6336271e4677
              inspection_id: 123456b7155a6336271e6789
    ClientCreateResponse200:
      summary: Create client response
      value:
        client_type: PERSON
        client:
          id: 7A88C1E2-6892-4839-94AD-39B5721D297E
          status: inprogress
          gender: M
          first_name: Ivan20
          last_name: Ivanov20
          address:
            line: 41 Peshkov Street
            postal_code: PSZ1070
            city: Moscow
            country: RU
          email: ivan.ivanov@gmail.com20
          contact_mobile_number: '+994505351920'
          nationality: LV
          residence: LV
          national_id_number: '22033344'
          tax_id:
            number: '123456'
            country: LV
          marketing_flag: false
          referral_code: '0001'
          us_person: false
          pep_person: NOPEP
          occupation:
            position: Employee
            company: Sample company
            specific_position: false
            criminal: false
            tesla_funds: true
            crypto_currency: false
          document:
            type: CCPT
            number: '54321'
            expire_date: '2031-06-10'
          source_of_income:
            savings: false
            salary: true
            property_sale: true
            receivable_dividends: false
            inheritance_gifts: true
            other: true
            other_comment: Comment
          site_info: https://my-test.teslapay.eu/site/info/4XAz8FVKfxSXwbfMGbGY78KNN29uDAEvKG6FjNMH7p64bsvdk
          ip: 109.110.0.1
          birth_date: '1980-07-22'
          additional_data:
            sumsub:
              id: 5f80e6b7155a6336271e4677
              inspection_id: 123456b7155a6336271e6789
    AccountBalanceAllResponse:
      summary: Accounts balance
      value:
        - issue_date: '2021-12-09T13:04:07Z'
          balances:
            - iban: LT693190000201000668
              currency: EUR
              opening:
                date: '2021-12-09'
                balance: 9493
              closing:
                date: '2021-12-09'
                balance: 9493
            - iban: LT693190000201000668
              currency: BGN
              opening:
                date: '2021-12-09'
                balance: 0
              closing:
                date: '2021-12-09'
                balance: 0
            - iban: LT693190000201000668
              currency: GBP
              opening:
                date: '2021-12-09'
                balance: 25884
              closing:
                date: '2021-12-09'
                balance: 25884
            - iban: LT693190000201000668
              currency: HUF
              opening:
                date: '2021-12-09'
                balance: 0
              closing:
                date: '2021-12-09'
                balance: 0
            - iban: LT693190000201000668
              currency: DKK
              opening:
                date: '2021-12-09'
                balance: 4447
              closing:
                date: '2021-12-09'
                balance: 4447
            - iban: LT693190000201000668
              currency: NOK
              opening:
                date: '2021-12-09'
                balance: 0
              closing:
                date: '2021-12-09'
                balance: 0
            - iban: LT693190000201000668
              currency: PLN
              opening:
                date: '2021-12-09'
                balance: 48779
              closing:
                date: '2021-12-09'
                balance: 48779
            - iban: LT693190000201000668
              currency: RON
              opening:
                date: '2021-12-09'
                balance: 0
              closing:
                date: '2021-12-09'
                balance: 0
            - iban: LT693190000201000668
              currency: HRK
              opening:
                date: '2021-12-09'
                balance: 0
              closing:
                date: '2021-12-09'
                balance: 0
            - iban: LT693190000201000668
              currency: CZK
              opening:
                date: '2021-12-09'
                balance: 0
              closing:
                date: '2021-12-09'
                balance: 0
            - iban: LT693190000201000668
              currency: CHF
              opening:
                date: '2021-12-09'
                balance: 0
              closing:
                date: '2021-12-09'
                balance: 0
            - iban: LT693190000201000668
              currency: SEK
              opening:
                date: '2021-12-09'
                balance: 0
              closing:
                date: '2021-12-09'
                balance: 0
            - iban: LT693190000201000668
              currency: USD
              opening:
                date: '2021-12-09'
                balance: 1177
              closing:
                date: '2021-12-09'
                balance: 1177
            - iban: LT693190000201000668
              currency: RUB
              opening:
                date: '2021-12-09'
                balance: 0
              closing:
                date: '2021-12-09'
                balance: 0
    AccountBalanceEur:
      summary: Account balance in EUR
      value:
        - issue_date: '2021-12-09T13:05:09Z'
          balances:
            - iban: LT693190000201000668
              currency: EUR
              opening:
                date: '2021-12-09'
                balance: 9493
              closing:
                date: '2021-12-09'
                balance: 9493
    AccountStatementEur:
      summary: Single currency statement
      value:
        - issue_date: '2021-12-09T13:17:25Z'
          balance:
            iban: LT423190000201000669
            currency: EUR
            opening:
              date: '2021-07-26'
              balance: 0
            closing:
              date: '2021-08-28'
              balance: 1578
          records:
            - document_reference: 5KR5L2
              external_id: LADL07260000001
              transaction_reference: 1Z9V4K
              date: '2021-07-26'
              type: INTERNAL
              amount: 100
              currency: EUR
              details: Test
              recipient_bic: TEUALT22XXX
              recipient_account: LT423190000201000669
              recipient_name: Approve  Cora
              sender_bic: TEUALT22XXX
              sender_account: LT693190000201000668
              sender_name: Approve  Cora
            - document_reference: 5KR5NM
              external_id: LADL07270000022
              transaction_reference: 1Z9MYG
              date: '2021-07-27'
              type: INTERNAL
              amount: 101
              currency: EUR
              details: Gfggf
              recipient_bic: TEUALT22XXX
              recipient_account: LT423190000201000669
              recipient_name: Approve  Cora
              sender_bic: TEUALT22XXX
              sender_account: LT693190000201000668
              sender_name: Approve  Cora
            - document_reference: GVQZM7
              transaction_reference: E110QD
              date: '2021-08-27'
              type: INTERNAL
              amount: 1236
              currency: EUR
              details: Own funds transfer
              recipient_bic: TEUALT22XXX
              recipient_account: LT423190000201000669
              recipient_name: Approve  Cora
              sender_bic: TEUALT22XXX
              sender_account: LT693190000201000668
              sender_name: Approve  Cora
            - document_reference: YGLOK4
              transaction_reference: N22NK5
              date: '2021-08-27'
              type: INTERNAL
              amount: 1691
              currency: EUR
              details: Own funds transfer
              recipient_bic: TEUALT22XXX
              recipient_account: LT423190000201000669
              recipient_name: Approve  Cora
              sender_bic: TEUALT22XXX
              sender_account: LT693190000201000668
              sender_name: Approve  Cora
            - document_reference: M8WRP8
              transaction_reference: MLL7KY
              date: '2021-08-27'
              type: FEE
              amount: -50
              currency: EUR
              details: Transfer Fee
              recipient_bic: TEUALT22XXX
              recipient_name: UAB TeslaPay
              sender_bic: TEUALT22XXX
              sender_account: LT423190000201000669
              sender_name: Approve  Cora
            - document_reference: M8WRP8
              transaction_reference: 8MMLYO
              date: '2021-08-27'
              type: EXTERNAL_O
              amount: -1500
              currency: EUR
              details: 'PPR 2   '
              recipient_bic: RIKOLV2XXXX
              recipient_account: LV63RIKO0002013197596
              recipient_name: 'RNP '
              sender_bic: TEUALT22XXX
              sender_account: LT423190000201000669
              sender_name: Approve  Cora
