openapi: 3.1.0
info:
  name: Business Banking API documentation
  version: ''
  title: Business Banking API documentation
  contact:
    email: contact@narvi.com
    url: https://narvi.com/contact-us
servers:
  - url: https://api.narvi.com
    description: Production API
tags:
  - name: Authorization
    description: |
      We use cryptographic signature to authorize API requests.<br> To configure your API keys for selected entity please login to our banking app [Developer Section](https://my.narvi.com/app/developers/config/api-keys).<br> You have to configure your whitelisted IPs and public key which will be used for request signature verification.<br> <b>Do not share your private key with anybody. We never asks you for private key.</b><br>
      ## API HOSTNAME
      Please note that we use <b>api.narvi.com</b> fully qualified domain to interact with your integration. All your api requests should use this domain to communicate with our REST API.
      ## Request Authorization
      Each request needs to have the following headers:<br> - API-KEY-ID - api key id gathered from configured api key [Developer Section](https://my.narvi.com/app/developers/config/api-keys)<br> - API-REQUEST-ID - valid UUID or timestamp, can't be duplicated across requests <br> - API-REQUEST-SIGNATURE - request signature<br>

      <b>API-REQUEST-ID</b> (Request ID)<br> - valid UUID or timestamp, <br> - it can't be duplicated across requests <br>

      <b>API-REQUEST-SIGNATURE</b> (Request signature)</br> Request signature is the signature of sha256 of the concatenated following items (request descriptor)<br> - the absolute request url without query params (e.g. `http://api.narvi.com/rest/v1.0/transactions/create`)<br> - the uppercase request method (e.g. POST, GET, PUT, DELETE)<br> - request ID - valid UUID, can't be duplicated across requests<br> - query params encoded in JSON canonical form - RFC 7159 JSON (The order of JSON key-value pairs is very important. Please double-check that it is in the correct canonical form. All query parameters keys and values must have the string type. Use an empty string instead if there are no query parameters).<br> - payload encoded in JSON canonical form - RFC 7159 JSON (The order of JSON key-value pairs is very important. Please double-check that it is in the correct canonical form. Use an empty string instead if there is no payload).<br> - if payload contains file object use sha256 of the file content to create payload canonical form for request descriptor

      <b>Signature example</b></br> For <b>GET</b> request `https://api.narvi.com/?account_pid=KFGKJ5L27ASGTZAO&kind=CREDIT` the signature should be created as follow:<br> - generate a request ID: e.g. da43520e-800b-41c5-a4a9-7287a64c87fa (valid UUID, can't be duplicated across requests)<br> - generate request descriptor: <code>https&#58;//api.narvi.com/rest/v1.0/transactions/listGET1693416230449{\"\account_pid\":\"KFGKJ5L27ASGTZAO\",\"kind\":\"CREDIT\"}</code><br> - generate sha256 of the request descriptor<br> - generate signature with hashing algorithm sha256 of the generated sha256 above<br> - encode the signature with base64<br>

      For <b>POST</b> request `https://api.narvi.com/rest/v1.0/transactions/create` with the payload </br> <code>{\"account_pid\": \"KFGKJ5L27ASGTZAO\" ,\"recipient\": {\"name\": \"John Doe\", \"number\": \"FI8379600186405354\" ,\"bic\": \"NARIFXX\", \"country\": \"FI\"}, \"currency\": \"EUR\",\"amount\": 100, \"remittance_information\":\{\"ustrd\": \"test transfer\"}}</code></br> the signature should be created as follow:<br> - generate a request ID: e.g. da43520e-800b-41c5-a4a9-7287a64c87fa (valid UUID, can't be duplicated across requests)<br> - generate request descriptor: <code>https&#58;//api.narvi.com/rest/v1.0/transactions/createPOST1693416796324{\"account_pid\":\"KFGKJ5L27ASGTZAO\",\"amount\":\"100\",\"currency\":\"EUR\",\"recipient\":{\"bic\":\"NARIFXX\",\"country\":\"FI\",\"name\":\"John Doe\",\"number\":\"FI8379600186405354\"},\"remittance_information\":{\"ustrd\":\"test transfer\"}}</code><br> - generate sha256 of the request descriptor<br> - generate signature with hashing algorithm sha256 of the generated sha256 above<br> - encode the signature with base64<br>
  - name: Webhooks
    description: |
      To enable webhooks, please login to [Developer Section](https://my.narvi.com/app/settings/update/webhook-create) and configure webhook endpoints for selected entity. After you enable them, we will push real-time event data to your application's webhook endpoint when events happen in your banking account. We use HTTPS to send webhook events to your app as a JSON payload that includes an Event object.

      ## Webhooks IPs

      The full list of IP addresses that api.narvi.com may resolve to is:<br> <b>3.76.153.24</b>


      ## Delivery behaviours

      We attempt to deliver the event to your webhook endpoint for up to 3 days with an exponential back off. In the log section of the Dashboard, you can view when the next retry will occur. If your endpoint has been disabled or deleted when we attempt a retry, future retries are cancelled. <br>

      Your endpoint must quickly return a successful status code (2xx) prior to any complex logic that could cause a timeout. For example, you must return a 200 response before updating a customer’s balance.


      ## Delivery headers

      HTTP payloads that are delivered to your webhook's configured URL endpoint will contain several special headers:<br> - USER-AGENT - always equal 'webhook'<br> - WEBHOOK-REQUEST-TIMESTAMP - timestamp in millisecond when webhook action occured<br> - WEBHOOK-REQUEST-EVENT-TYPE - the event type<br> - WEBHOOK-REQUEST-EVENT-PID - event public id<br> - WEBHOOK-REQUEST-SIGNATURE - This is the sha256 hex digest of the request body and parameters<br>


      ## Webhook signature


      Webhook signature must be checked by integrated application before processing the webhook data. <br> Webhook signature is the sha256 hex digest of the concatenated following items (request descriptor)<br> - the absolute webhook endpoint without query params (e.g. https://example.com/webhook/handler)<br> - the uppercase request method (e.g. POST, GET, PUT, DELETE)<br> - current timestamp in microseconds (taken from request header WEBHOOK-REQUEST-TIMESTAMP)<br> - event type (taken from request header WEBHOOK-REQUEST-EVENT-TYPE)<br> - event public id (taken from request header WEBHOOK-REQUEST-EVENT-PID)<br> - query params encoded in JSON canonical form - RFC 7159 JSON (The order of JSON key-value pairs is very important. Please double-check that it is in the correct canonical form. All query parameters keys and values must have the string type. Use an empty string instead if there are no query parameters).<br> - payload encoded in JSON canonical form - RFC 7159 JSON (The order of JSON key-value pairs is very important. Please double-check that it is in the correct canonical form. Use an empty string instead if there is no payload).<br> - webhook secret taken from developer panel<br>


      ## VOP Webhook Response & Signature

      Verification of Payee (VOP) is a mechanism that checks if the recipient's name on a SEPA transfer matches the details held by the recipient's bank. This helps prevent payment fraud and misdirected payments by verifying the account holder's name before the transaction is processed.

      The VOP scheme and its technical specifications are defined by the European Payments Council (EPC). The official scheme documentation can be found here: [Verification Of Payee Scheme Inter-PSP API Specifications](https://www.europeanpaymentscouncil.eu/document-library/implementation-guidelines/verification-payee-scheme-inter-psp-api-specifications).

      ### VOP Transaction Flow

      When you initiate a SEPA transaction (e.g., via POST `https://api.narvi.com/rest/v1.0/transactions/create`), a VOP check is performed. Transaction object
      now has `vop` field which contains the result of the check:

      * **`null`**: VOP was not applicable to this transaction (e.g., non-SEPA transfers).
      * **Object**: When VOP is applicable, the object contains:
          * **`match_type`** (required): One of the following values:
              * `"MTCH"`: (Match) The recipient name exactly matches the bank's records.
              * `"NMTC"`: (No Match) The recipient name does not match.
              * `"CMTC"`: (Close Match) The recipient name is similar but not identical.
              * `"NOAP"`: (Not Applicable) VOP could not be performed by the recipient's bank.
          * **`recipient_matching_name`** (optional): For `CMTC` status, this field may contain the suggested correct recipient name from the bank's records.

      **Example `vop` object:**
      ```json
      {
        "vop": {
          "match_type": "CMTC",
          "recipient_matching_name": "John Smith"
        }
      }
      ```

      If the result is a perfect match (`"MTCH"`), the transaction proceeds to `CONFIRMED` status as normal.

      However, if the VOP result is **not** a match (`"NMTC"`, `"CMTC"`, or `"NOAP"`), the flow is interrupted and requires your action:

      1. The transaction is created with a **`CREATED`** status (not `CONFIRMED`).
      2. The transaction **will not be processed** until it is confirmed or canceled.
      3. A **`vop.created`** webhook event is sent to your configured endpoint.
      4. Your system must then approve or reject the transaction using one of two methods described below.

      ---

      #### Method 1: Respond to the `vop.created` Webhook (Recommended)

      This is the primary method for handling VOP-pending transactions. You must respond directly to the webhook request with a `200 OK` status and a specific, signed JSON body.

      ##### Configuration
      To use this method, you must first upload your **public key** in the [Developer Section](https://my.narvi.com/app/developers/config/api-keys). We will use this key to verify the signature of your response.

      **Note:** This is different from the standard *webhook signature verification*.
      * You verify *our* incoming webhooks using the `WEBHOOK-REQUEST-SIGNATURE` header and your **Webhook Secret**.
      * You sign *your* response to the `vop.created` webhook using your **private key**.

      ##### Response Body
      Your response **must** be a JSON object containing `accept_vop`, `nonce`, and `signature`.

      * `accept_vop` (boolean): `true` to accept the VOP findings and proceed with the transaction. `false` to cancel the transaction.
      * `nonce` (string): A unique identifier for this response (e.g., a timestamp or UUID) to prevent replay attacks.
      * `signature` (string): The Base64-encoded RSA-SHA256 signature.

      **Important:** If your response body is empty, improperly formatted, or has an invalid signature, **it will be ignored**. The transaction will remain in `CREATED` status.

      ##### Response Signature Generation
      To generate the `signature`:

      1.  Create the JSON payload **without** the signature field:
          ```json
          {
            "accept_vop": true,
            "nonce": "1678886400000"
          }
          ```
      2.  Convert this object to its canonical JSON string representation (RFC 7159, keys sorted alphabetically).
      3.  Generate a SHA-256 hash of the canonical JSON string.
      4.  Sign the resulting hash using your **private key** with the **RSA-SHA256** algorithm.
      5.  Base64-encode the binary signature.
      6.  Add this Base64-encoded string as the `signature` value to your JSON payload.

      **Final JSON Response Body:**
      ```json
      {
        "accept_vop": true,
        "nonce": "1678886400000",
        "signature": "YOUR_BASE64_ENCODED_SIGNATURE_HERE"
      }
      ```

      ---

      #### Method 2: Use the Update Transaction API Endpoint

      As an alternative, or if your webhook response fails, you can programmatically approve or reject the transaction by calling:

      `PATCH /rest/v1.0/transactions/update/{pid}`

      This endpoint uses **standard API authentication** (as described in the [Authorization](#tag/Authorization) tag).

      To confirm or cancel the transaction, send the following payload:
      ```json
      {
        "accept_vop": true
      }
      ```
      * `accept_vop` (boolean): `true` to approve, `false` to cancel.
      * This operation is only valid while the transaction is in the `CREATED` status.
  - name: Account API Account
    x-displayName: Accounts
  - name: Account API Transaction
    x-displayName: Transactions
  - name: Account API Webhooks
    x-displayName: Webhooks
  - name: BaaS API Files
    x-displayName: Files
  - name: BaaS API Privates
    x-displayName: Privates
  - name: BaaS API Businesses
    x-displayName: Businesses
  - name: Baas API Challenges
    x-displayName: Challenges
    description: |
      We store customer authorization data such as <b>email</b> and <b>phone number</b> in order to authenticate requests submitted by the partner's BaaS. Wherever the REST API returns a 2fa challenge object, the final client must confirm the requested action by entering the correct OTP code in the interface.
      To enable this, the BaaS partner must display an iframe to the end user as described in the [FORM ELEMENTS documentation](/docs/web-elements).
      Challenge signature should be generated in the following way: <br> - concatenate challenge_pid, target (email or phone numer) and private public id<br> - signature is the encoded base64 signature of challenge descriptor <br>
      Example: <br> - BaaS partner received challenge object for the private with pid \"68156984\" and email address example@example.com<br> <code>{\"pid\": \"T83H6LH48MMYS497\", \"kind\": \"EMAIL\", \"number\": 5, \"added\": \"1720954148.018724\", \"target\": \"e******@example.com"\, \"expired\": \"1720954448.018724\", \"resent\": \"1720954148.018748\"}</code><br> - BaaS partner generates challenge descriptor as follow: <br> <code>T83H6LH48MMYS497example\@example.com68156984</code><br> - The secret is the base64 encoded signature of the following challenge descriptor.
  - name: Baas API Accounts
    x-displayName: Accounts
  - name: Baas API Transactions
    x-displayName: Transactions
  - name: BaaS API Webhooks
    x-displayName: Webhooks
x-tagGroups:
  - name: General
    tags:
      - Authorization
      - Webhooks
  - name: Account API
    tags:
      - Account API Account
      - Account API Transaction
      - Account API Webhooks
paths:
  /rest/v1.0/account/retrieve/{pid}:
    get:
      operationId: Retrieve Account Details
      description: Retrieves Account details
      parameters:
        - name: pid
          in: path
          required: true
          description: A unique value identifying this sepa account.
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SEPAAccountSchema'
          description: ''
      tags:
        - Account API Account
  /rest/v1.0/account/list:
    get:
      operationId: List User Accounts
      description: Returns paginated list of user accounts.
      parameters:
        - name: cursor
          required: false
          in: query
          description: The pagination cursor value.
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  next:
                    type: string
                    nullable: true
                  previous:
                    type: string
                    nullable: true
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/SEPAAccountSchema'
          description: ''
      tags:
        - Account API Account
  /rest/v1.0/transactions/create:
    post:
      operationId: Create Transaction
      description: Create User Transaction. If the transaction is for a SEPA payment and results in a Verification of Payee (VOP) status other than 'MTCH', the transaction will be created with a 'CREATED' status and await confirmation via the `vop.created` webhook or the `PATCH /rest/v1.0/transactions/update/{pid}` endpoint. Otherwise, it will proceed to 'CONFIRMED' status as usual.
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTransactionSchema'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/CreateTransactionSchema'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/CreateTransactionSchema'
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatedTransactionSchema'
          description: ''
      tags:
        - Account API Transaction
  /rest/v1.0/transactions/retrieve/{pid}:
    get:
      operationId: Retrieve Transaction Details
      description: Returns transaction details.
      parameters:
        - name: pid
          in: path
          required: true
          description: ''
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseTransactionSchema'
          description: ''
      tags:
        - Account API Transaction
  /rest/v1.0/transactions/list:
    get:
      operationId: List Account Transactions
      description: Returns paginated list of transactions for specific account with account_pid.
      parameters:
        - name: cursor
          required: false
          in: query
          description: The pagination cursor value.
          schema:
            type: string
        - name: account_pid
          required: true
          in: query
          description: Account public id.
          schema:
            type: string
        - name: kind
          required: false
          in: query
          description: kind
          schema:
            type: string
            enum:
              - CREDIT
              - DEBIT
              - FEE
        - name: added__lte
          required: false
          in: query
          description: Transaction added timestamp filter (in milliseconds).
          schema:
            type: string
        - name: added__gte
          required: false
          in: query
          description: Transaction added timestamp filter (in milliseconds).
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  next:
                    type: string
                    nullable: true
                  previous:
                    type: string
                    nullable: true
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/BaseTransactionSchema'
          description: ''
      tags:
        - Account API Transaction
  /rest/v1.0/transactions/update/{pid}:
    patch:
      operationId: Update Transaction
      description: |
        Update properties of a transaction.
        This endpoint can be used to programmatically accept or reject a transaction pending VOP confirmation.
        This action is only possible if the transaction is in 'CREATED' status and has a VOP match_type other than 'MTCH'.
      parameters:
        - name: pid
          in: path
          required: true
          description: The public ID of the transaction to update.
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                accept_vop:
                  type: boolean
                  description: Set to 'true' to accept the VOP result and proceed with the transaction, or 'false' to cancel it.
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseTransactionSchema'
          description: Transaction updated successfully.
      tags:
        - Account API Transaction
webhooks:
  transaction.created:
    post:
      tags:
        - Account API Webhooks
        - BaaS API Webhooks
      requestBody:
        summary: transaction.created
        description: Occurs when transaction is created in the system.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BaseTransactionSchema'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
  transaction.updated:
    post:
      tags:
        - Account API Webhooks
        - BaaS API Webhooks
      requestBody:
        summary: transaction.updated
        description: Occurs when a transaction status updated.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BaseTransactionSchema'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
  vop.created:
    post:
      tags:
        - Account API Webhooks
        - BaaS API Webhooks
      requestBody:
        summary: vop.created
        description: Occurs when a transaction is created and requires Verification of Payee (VOP) confirmation.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BaseTransactionSchema'
      responses:
        '200':
          description: |
            A successful response to this webhook requires a JSON body with a signature.
            This signature confirms whether to accept (true) or reject (false) the VOP result and proceed with/cancel the transaction.
          content:
            application/json:
              schema:
                type: object
                properties:
                  accept_vop:
                    type: boolean
                    description: true to accept the VOP result and proceed, false to cancel the transaction.
                  nonce:
                    type: string
                    description: A unique value (e.g., timestamp or UUID) to prevent replay attacks.
                  signature:
                    type: string
                    description: The base64-encoded SHA-256 signature of the canonical JSON representation of this response payload (excluding the signature field itself), signed with your private key.
                required:
                  - accept_vop
                  - nonce
                  - signature
components:
  schemas:
    SEPAAccountSchema:
      type: object
      properties:
        pid:
          type: string
          example: KFGKJ5L27ASGTZAO
          readOnly: true
        number:
          type: string
          example: FI2279600000000000
          readOnly: true
        balance:
          type: integer
          example: 9997246
          readOnly: true
        currency:
          type: string
          example: EUR
          readOnly: true
        name:
          type: string
          example: EUR Account
          nullable: true
          maxLength: 64
        kind:
          enum:
            - PRIVATE
            - BUSINESS
          example: PRIVATE
      required:
        - pid
        - number
        - balance
        - currency
        - name
        - kind
    BaseTransactionSchema:
      type: object
      properties:
        pid:
          type: string
          example: UXNZ6IWJ2JESLXP3
          readOnly: true
        account_pid:
          type: string
          example: KFGKJ5L27ASGTZAO
          description: Account public id.
        amount:
          type: integer
          example: 1485
          description: Transaction amount in cents.
          minimum: 0
        fee:
          type: integer
          example: 15
          readOnly: true
        currency:
          enum:
            - EUR
          example: EUR
          type: string
        added:
          type: string
          format: date-time
          example: '1698062541.845098'
          description: null
          readOnly: true
        sender:
          type: object
          nullable: true
          description: May be null for returned or fee transactions.
          properties:
            number:
              type: string
              example: PL69291000060000000000039586
              description: Account number.
              maxLength: 32
            name:
              type: string
              example: John Doe
              description: Counterparty name.
              maxLength: 120
            address:
              type: string
              example: Przylaszczkowa 148
              description: Counterparty address.
              maxLength: 120
            city:
              type: string
              example: Warsaw
              description: Counterparty city.
              maxLength: 320
            zip_code:
              type: string
              exmaple: 02-403
              description: Counterparty zip code.
              maxLength: 12
            country:
              allOf:
                - $ref: '#/components/schemas/CountrySchema'
                - example: PL
                - description: Counterparty country code.
          required:
            - number
            - name
        recipient:
          type: object
          nullable: true
          description: May be null for fee transactions.
          properties:
            number:
              type: string
              example: FI2279600000000000
              description: Account number.
              maxLength: 32
            name:
              type: string
              example: Sara Conor
              description: Counterparty name.
              maxLength: 120
            address:
              type: string
              example: ''
              description: Counterparty address.
              maxLength: 120
            city:
              type: string
              example: ''
              description: Counterparty city.
              maxLength: 320
            zip_code:
              type: string
              example: ''
              description: Counterparty zip code.
              maxLength: 12
            country:
              allOf:
                - $ref: '#/components/schemas/CountrySchema'
                - example: FI
                - description: Counterparty country code.
          required:
            - number
            - name
        remittance_information:
          type: object
          properties:
            ustrd:
              type: string
              example: INV202350
              description: Transaction title.
              maxLength: 256
          required:
            - ustrd
          description: Remittance information object.
        source:
          enum:
            - WEB
            - APP
            - ACCOUNT_API
            - BAAS_API
            - CARD
          example: WEB
          type: string
          readOnly: true
        kind:
          enum:
            - CREDIT
            - DEBIT
            - FEE
          example: CREDIT
          type: string
          readOnly: true
        status:
          enum:
            - PENDING
            - DONE
            - REJECTED
            - CANCELLED
          type: string
          example: DONE
          readOnly: true
        vop:
          type: object
          nullable: true
          description: Verification of Payee (VOP) check result. Null if VOP is not applicable.
          properties:
            match_type:
              type: string
              enum:
                - MTCH
                - NMTC
                - CMTC
                - NOAP
              description: 'VOP match status: MTCH (Match), NMTC (No Match), CMTC (Close Match), NOAP (Not Applicable).'
            recipient_matching_name:
              type: string
              description: Suggested recipient name in case of a close match (CMTC).
          required:
            - match_type
        orgnl_tx:
          type: object
          nullable: true
          description: Information about original transaction in case this is a returned/rejected transaction. Null if not applicable.
          properties:
            rjct_reason_cd:
              allOf:
                - $ref: '#/components/schemas/RejectReasonCodeSchema'
                - description: SEPA return reason code indicating why the original transaction was rejected.
              example: AC04
            rjct_reason:
              type: string
              description: Human-readable description of the rejection reason.
              example: Account number specified has been closed
            pid:
              type: string
              description: Public ID of the original transaction that was returned.
              example: UXNZ6IWJ2JESLXP3
          required:
            - rjct_reason_cd
            - rjct_reason
            - pid
      required:
        - pid
        - account_pid
        - amount
        - fee
        - currency
        - added
        - remittance_information
        - source
        - kind
        - status
    CreateTransactionSchema:
      type: object
      properties:
        account_pid:
          type: string
          example: KFGKJ5L27ASGTZAO
          description: Account public id.
        amount:
          type: integer
          example: 100
          description: Transaction amount in cents.
          minimum: 0
        currency:
          enum:
            - EUR
          example: EUR
          type: string
        recipient:
          type: object
          properties:
            number:
              type: string
              example: DK5000400440116243
              description: Account number.
              maxLength: 32
            name:
              type: string
              example: Thoma Navn
              description: Counterparty name.
              maxLength: 120
            address:
              type: string
              example: Byvej 2A, 1. tv 0012
              description: Counterparty address.
              maxLength: 120
            city:
              type: string
              example: Tune
              description: Counterparty city.
              maxLength: 320
            zip_code:
              type: string
              example: '4000'
              description: Counterparty zip code.
              maxLength: 12
            country:
              allOf:
                - $ref: '#/components/schemas/CountrySchema'
                - example: DK
                - description: Counterparty country code.
          required:
            - number
            - name
        remittance_information:
          type: object
          properties:
            ustrd:
              type: string
              example: Testing transaction
              description: Transaction title.
              maxLength: 256
          required:
            - ustrd
          description: Remittance information object.
      required:
        - account_pid
        - amount
        - currency
        - recipient
        - remittance_information
    CreatedTransactionSchema:
      allOf:
        - $ref: '#/components/schemas/BaseTransactionSchema'
        - required:
            - pid
            - account_pid
            - amount
            - fee
            - currency
            - added
            - recipient
            - remittance_information
            - sender
            - source
            - kind
            - status
    RejectReasonCodeSchema:
      type: string
      enum:
        - AB05
        - AB06
        - AB07
        - AB08
        - AB09
        - AB10
        - AC01
        - AC03
        - AC04
        - AC06
        - AG01
        - AG02
        - AG09
        - AG10
        - AG11
        - AM02
        - AM04
        - AM05
        - AM09
        - AM23
        - ARDT
        - BE04
        - CUST
        - CERI
        - CNOR
        - DNOR
        - DS14
        - DUPL
        - E001
        - E002
        - E003
        - E004
        - E005
        - E006
        - E007
        - E008
        - E009
        - FOCR
        - FRAD
        - LEGL
        - MD07
        - MS01
        - MS02
        - MS03
        - NOAS
        - NOOR
        - PY01
        - PY03
        - RC01
        - RR01
        - RR02
        - RR03
        - RR04
        - TBL1
        - TBL2
        - TECH
        - TM01
        - XD19
        - XD20
        - XD21
        - XD22
        - XT04
        - XT05
        - XT06
        - XT10
        - XT13
        - XT33
        - XT73
        - XT74
        - XT75
        - XT77
        - XT79
        - XT80
        - XT81
        - XT83
        - XT85
        - XT86
        - XT87
        - XT90
        - XT91
        - XT92
        - ED05
        - ERIN
        - FF01
        - NERI
        - DT01
        - CANC
        - RCLL
        - VALIDATION-BLOCK
        - RECALL
      description: |
        SEPA return codes:
        - `AB05`: Clearing process aborted due to timeout at the Beneficiary PSP (Creditor Agent)
        - `AB06`: Clearing process aborted due to timeout at Intermediary PSP or CSM (the Instructed Agent). Rejected by the CSM to Originator Bank upon Timeout condition
        - `AB07`: Agent of message is not online/available. Generic usage if it cannot be determined who exactly is unavailable
        - `AB08`: Beneficiary PSP (Creditor Agent) is not online/available
        - `AB09`: Clearing process aborted due to error at the Beneficiary PSP (Creditor Agent).
        - `AB10`: Clearing process aborted due to error at the Intermediary PSP or CSM (the Instructed Agent)
        - `AC01`: Incorrect account number
        - `AC03`: Wrong IBAN
        - `AC04`: Closed account number
        - `AC06`: Blocked account
        - `AG01`: Credit transfer forbidden on this account
        - `AG02`: Invalid bank operation code
        - `AG09`: Original payment never received
        - `AG10`: Agent of message is suspended from the Real Time Payment system. Generic usage if it cannot be determined who exactly is suspended
        - `AG11`: Beneficiary PSP (Creditor Agent) of message is suspended from the Real Time Payment system
        - `AM02`: Not Allowed Amount
        - `AM04`: Insufficient fund
        - `AM05`: Duplication
        - `AM09`: Wrong Amount
        - `AM23`: Transaction amount exceeds settlement limit
        - `ARDT`: Already Returned Transaction
        - `BE04`: Missing creditor address
        - `CUST`: Requested By Customer
        - `CERI`: The credit transfer is not tagged as an Extended Remittance Information (ERI) transaction but contains ERI
        - `CNOR`: Creditor bank is not registered
        - `DNOR`: Debtor Bank is not registered
        - `DS14`: Invalid user (technical)
        - `DUPL`: Duplicate Payment
        - `E001`: Duplication in identity ID is not allowed
        - `E002`: Overlap of un-availability periods not allowed for same BIC
        - `E003`: Unknown BIC
        - `E004`: Wrong Time
        - `E005`: Un-availability too far
        - `E006`: Daily threshold passed
        - `E007`: No matching available
        - `E008`: Cancel not allowed in the past
        - `E009`: Invalid value
        - `FOCR`: Following Cancellation Request
        - `FRAD`: Fraudulent Original SCT (INST) Transaction
        - `LEGL`: Legal Decision
        - `MD07`: Beneficiary deceased
        - `MS01`: Not specified reason
        - `MS02`: By order of the Beneficiary
        - `MS03`: Not Specified Reason Agent Generated
        - `NOAS`: No Answer From Customer
        - `NOOR`: Original Credit Transfer Never Received
        - `PY01`: Unknown BIC in routing table
        - `PY03`: Unknown BIC in TIPS directory
        - `RC01`: Bank identifier incorrect
        - `RR01`: Missing debtor account or identification
        - `RR02`: Missing debtor's name or address
        - `RR03`: Missing creditor's name or address
        - `RR04`: Regulatory reason
        - `TBL1`: Account blocked, Debtor side
        - `TBL2`: Account blocked, Creditor side
        - `TECH`: Technical problem
        - `TM01`: Invalid Cut Off Time. Rejected by the CSM to Beneficiary Bank upon Timeout condition
        - `XD19`: Invalid IBAN format
        - `XD20`: Invalid Account Number
        - `XD21`: Invalid Account Owner
        - `XD22`: Invalid settlement method for either Debtor Agent or Creditor Agent
        - `XT04`: Insufficient liquidity for processing the transaction on the System
        - `XT05`: Resubmitted to a subsequent settlement cycle
        - `XT06`: Invalid AccptTime, Rejected by CSM to Originator Banku pon exceeding tolerance period for the Acceptance Date&Time
        - `XT10`: Transaction inflight
        - `XT13`: Unsupported XML field
        - `XT33`: Invalid Data Format
        - `XT73`: Invalid Country Code
        - `XT74`: Invalid original transaction status, action required
        - `XT75`: Invalid Original Transaction Status, action not required
        - `XT77`: Original Amount Mismatch
        - `XT79`: The Debtor Agent is not allowed to send IP (pacs.008) and consequently to send Investigation (pacs.028) and Recalls (camt.056). It is also not allowed to receive NRR and PRR
        - `XT80`: The Creditor Agent is not allowed to receive IP (pacs.008) and consequently to receive Investigation (pacs.028) and Recalls (camt.056). It is also not allowed to send NRR and PRR
        - `XT81`: Field not permitted in SCT service
        - `XT83`: Participant not allowed to use the Product Id specified
        - `XT85`: Invalid Settlement Cycle
        - `XT86`: Expired Time limit for PCR
        - `XT87`: Inconsistent Instructing Agent
        - `XT90`: Invalid use of a Technical BIC
        - `XT91`: Not Allowed in SEPACOM
        - `XT92`: Instructed Agent not allowed for Non-Target Day AOS
        - `ED05`: Settlement failed
        - `ERIN`: ERI option not supported
        - `FF01`: Invalid file format
        - `NERI`: The SEPA Credit Transfer is tagged as an Extended Remittance Information (ERI) transaction but does not contain ERI
        - `DT01`: Invalid Date
        - `CANC`: Used in PCF file. The PCR was processed before the beginning of the settlement process of the original Credit Transfer. The original CT was not settled
        - `RCLL`: The PCR was processed after the settlement of the original Credit Transfer. The CT has been settled/cancelled by the ESM and the Recall Request was forwarded to the Beneficiary Bank of the original CT
        - `VALIDATION-BLOCK`: Rejected by intermediary bank
        - `RECALL`: Accepted SEPA transaction recall
    CountrySchema:
      enum:
        - AF
        - AX
        - AL
        - DZ
        - AS
        - AD
        - AO
        - AI
        - AQ
        - AG
        - AR
        - AM
        - AW
        - AU
        - AT
        - AZ
        - BS
        - BH
        - BD
        - BB
        - BY
        - BE
        - BZ
        - BJ
        - BM
        - BT
        - BO
        - BQ
        - BA
        - BW
        - BV
        - BR
        - IO
        - BN
        - BG
        - BF
        - BI
        - CV
        - KH
        - CM
        - CA
        - KY
        - CF
        - TD
        - CL
        - CN
        - CX
        - CC
        - CO
        - KM
        - CG
        - CD
        - CK
        - CR
        - CI
        - HR
        - CU
        - CW
        - CY
        - CZ
        - DK
        - DJ
        - DM
        - DO
        - EC
        - EG
        - SV
        - GQ
        - ER
        - EE
        - SZ
        - ET
        - FK
        - FO
        - FJ
        - FI
        - FR
        - GF
        - PF
        - TF
        - GA
        - GM
        - GE
        - DE
        - GH
        - GI
        - GR
        - GL
        - GD
        - GP
        - GU
        - GT
        - GG
        - GN
        - GW
        - GY
        - HT
        - HM
        - VA
        - HN
        - HK
        - HU
        - IS
        - IN
        - ID
        - IR
        - IQ
        - IE
        - IM
        - IL
        - IT
        - JM
        - JP
        - JE
        - JO
        - KZ
        - KE
        - KI
        - KW
        - KG
        - LA
        - LV
        - LB
        - LS
        - LR
        - LY
        - LI
        - LT
        - LU
        - MO
        - MG
        - MW
        - MY
        - MV
        - ML
        - MT
        - MH
        - MQ
        - MR
        - MU
        - YT
        - MX
        - FM
        - MD
        - MC
        - MN
        - ME
        - MS
        - MA
        - MZ
        - MM
        - NA
        - NR
        - NP
        - NL
        - NC
        - NZ
        - NI
        - NE
        - NG
        - NU
        - NF
        - KP
        - MK
        - MP
        - 'NO'
        - OM
        - PK
        - PW
        - PS
        - PA
        - PG
        - PY
        - PE
        - PH
        - PN
        - PL
        - PT
        - PR
        - QA
        - RE
        - RO
        - RU
        - RW
        - BL
        - SH
        - KN
        - LC
        - MF
        - PM
        - VC
        - WS
        - SM
        - ST
        - SA
        - SN
        - RS
        - SC
        - SL
        - SG
        - SX
        - SK
        - SI
        - SB
        - SO
        - ZA
        - GS
        - KR
        - SS
        - ES
        - LK
        - SD
        - SR
        - SJ
        - SE
        - CH
        - SY
        - TW
        - TJ
        - TZ
        - TH
        - TL
        - TG
        - TK
        - TO
        - TT
        - TN
        - TR
        - TM
        - TC
        - TV
        - UG
        - UA
        - AE
        - GB
        - UM
        - US
        - UY
        - UZ
        - VU
        - VE
        - VN
        - VG
        - VI
        - WF
        - EH
        - YE
        - ZM
        - ZW
      type: string
      example: FI
