openapi: 3.1.0
info:
  title: Memo Bank API
  description: |
    **Welcome!** You can use our [Premium Bank API](https://memo.bank/produit/api/)  to check your company’s accounts, fetch your transactions, make SEPA transfers,  initiate SEPA direct debit collections, create virtual IBANs, and access most of Memo Bank features.
    > info
    > If you are a **third-party payment service provider** complying with PSD2, you may be more interested in our [NextGenPSD2 API](https://docs-nextgenpsd2.api.memo.bank).
  version: "2.0"
servers:
- url: https://api.memo.bank
  description: Production
- url: https://api.sandbox.memo.bank
  description: Sandbox
tags:
- name: Accounts
  description: |
    Accounts are any bank account that your company owns: current account, ring-fenced account,  settlement account, specially dedicated account, trust account, meal voucher account,  booster account, etc. They boil down to a list of [transactions](#endpoint-transactions) and a balance.
- name: IBANs
  description: |
    IBANs are identifiers for bank accounts. There are two types of IBANs at Memo Bank:
    * Main IBANs, which act as primary identifiers for a bank account.  There is exactly one main IBAN per bank account. You cannot delete it. When an account is closed, its main IBAN remains active only for  incoming transactions, which will be automatically rerouted to the  main account.
    * Virtual IBANs, which are aliases for the main IBAN. They can be created, deactivated, and reactivated at will. When the account they are attached to  is closed, they get reattached to the main account.

    All operations on IBANs are synchronous and effective immediately,  meaning that you can use a new IBAN to send or receive money right  after its creation.
- name: Account assessments
  description: |
    Account assessments allow you to assess SEPA counterparty accounts before initiating transactions with them. An assessment provides:

    * **Risk indicators**: Detection of fraudulent activity, suspicious patterns, and other risk signals.
    * **Identification matching**: Verify that the account name or other identifiers match the value known by the account holder.
    * **Account reachability**: Information about which payment schemes are supported by the account holder.

    Account assessments are processed asynchronously: you need to listen to `account_assessment_completed` and `account_assessment_failed` webhook  events to know when its time to retrieve the assessment results.

    This feature is subject to specific pricing, please reach out to your banker to get more information.
- name: Transactions
  description: |
    Transactions are any debit and credit operations on an account.

    ![Transactions lifecycle](https://assets.memo.bank/memobankapi/transactions-lifecycle-api-v2.png "Transactions lifecycle" =750px)

    Note that the status of the transaction indicates whether or not it affects the account’s available balance. `debit` transactions impact the balance as soon as they reach the `authorized` state. `credit` transactions impact it only when their status turns to `confirmed`.
- name: Transfers
  description: |
    Transfers are SEPA transfers, including SEPA standard transfers  and SEPA instant transfers.

    They can be initiated asynchronously, one by one or in bulk.

    They have a similar lifecycle compared to [transactions](#endpoint-transactions)  but note that there are some minor differences for the `canceled`  and `failed` states.

    ![Transfers lifecycle](https://assets.memo.bank/memobankapi/transfers-lifecycle-api-v3.png "Transfers lifecycle" =750px)
- name: Wire Transfers
  description: "Wire transfers are transfers going through Swift. They allow you to\
    \ send funds outside the SEPA network and to transfer money in foreign currencies.\n\
    \nInitiating a wire transfer may require you to upload a supporting document.\
    \ In such case the transfer will have a `pending_attachment_required` status and\
    \ you'll receive an event `wire_transfer_attachment_required` on your webhook.\
    \ \n\nIf no document is required but you still want to attach one to your transaction,\
    \ use the [attachments](#endpoint-attachments) endpoints.\n\n![Wire transfers\
    \ lifecycle](https://assets.memo.bank/memobankapi/wire-transfers-lifecycle-api-v1.png\
    \ \"Wire transfers lifecycle\" =750px)\n"
- name: Collections
  description: "Collections are SEPA direct debit collections, including SEPA CORE\
    \ direct debits and SEPA B2B direct debits. \n\nTo initiate a direct debit, a\
    \ **mandate** signed by the debtor is required.  You have the option to use our\
    \ [signature request](endpoint-mandate-signature-requests)  workflow, which handles\
    \ this signature, or you can choose to manage it  yourself. Whichever method you\
    \ select, you will only need to provide  the mandate information when setting\
    \ up the direct debit, not the signed  document itself.\n\nThey can be initiated\
    \ asynchronously, one by one or in bulk. \n\nUnlike [transfers](#endpoint-transfers),\
    \ collections can only be scheduled for a date in the future.  As a result, their\
    \ lifecycle is also simplified.\n\n![Collections lifecycle](https://assets.memo.bank/memobankapi/collections-lifecycle-api-v3.png\
    \ \"Collections lifecycle\" =750px)\n"
- name: Mandate signature requests
  description: |
    Mandate signature requests are a way to prepare and send collection mandates for signature. The mandate debtor  receives an email with a link so they can complete and sign the mandate. Once it has been signed, the resulting  mandate becomes immediately available for making [collections](#endpoint-collections). Dedicated  [webhook events](#webhook-webhook) can be used to track mandate signature requests state changes.
- name: Attachments
  description: |
    Documents attached to transactions.
- name: Webhook
  description: |
    # Events

    When something interesting happens on your Memo Bank workspace, such as a new transaction being created, Memo Bank can reach out to your application so that you can take action (such as sending an e-mail alert about the transaction to your user) automatically.

    The first step is to add a webhook to your application in the [`API`](https://client.memo.bank/api) section of your Memo Bank workspace. As part of this, you will have to provide a URL on your own servers. Memo Bank will then send HTTPS requests to that URL when there is an activity on your Memo Bank workspace.

    Note that even if webhooks are setup within an application, events will  be received even when they result from actions triggered on the Memo Bank  webapp or any other application.
    # Consuming events
    Individual events do not contain very much information on their own. This is by design, as the API structure can remain extremely stable and avoid difficult webhook migrations in the future as the Memo Bank API changes. If you need additional metadata, such as the amount of the transaction in the above example, make a `GET` request to the API for that information. You can use the `resource_type` and `resource_id` to determine what resource to fetch from the API.
    # Failures and retries
    If your application returns anything other than a 2xx HTTP status code,  if we do not receive a response before timing out or in the case of  a network failure, we will retry the event up to 8 times with exponentially increasing backoffs.  In your webhook endpoint implementation,  we recommend you place  inbound Events into your application's own queuing system  (such as Kafka, Resque, etc) for asynchronous event processing,  and returning a 200 response from your endpoint as quickly as possible.

    Since retries may occur, your webhook endpoint must be idempotent. You should handle the possibility of receiving the same event multiple times. We recommend using the event `id` field to detect and ignore duplicate events on your side.
    # Securing your webhook endpoint (recommended)
    Memo Bank will include an `Authorization` header in each webhook request. Inside of it, you will find `Bearer <token>` with the authentication token we provided when you created the webhook on the web interface. We recommend that you check this header and reject requests with invalid token, indicating a malicious request that would not have been issued by Memo Bank.

    We also recommend that you restrict which IP addresses can call your  webhook. Here is the list of our IPv4 addresses:
    * Memo Bank Premium API (i.e. `api.memo.bank`):
      * `34.38.96.206`
      * `35.189.206.171`
      * `35.241.129.224`
      * `34.155.214.185`
      * `34.155.206.98`
      * `34.163.14.38`

    * Memo Bank Premium Sandbox API (i.e. `api.sandbox.memo.bank`):
      * `34.155.60.111`
      * `34.163.27.39`
- name: Sandbox
  description: |
    Sandbox only endpoints.
paths:
  /v2/account_assessments:
    post:
      tags:
      - Account assessments
      summary: Create an account assessment
      description: "This endpoint allows you to assess a SEPA counterparty account\
        \ by retrieving risk and fraud indicators, account capabilities and by performing\
        \ IBAN and name/identification matching."
      operationId: createAccountAssessment
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateAccountAssessment"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PendingAccountAssessment"
      security:
      - JWT: []
  /v2/account_assessments/{id}:
    get:
      tags:
      - Account assessments
      summary: Get an account assessment
      operationId: getAccountAssessment
      parameters:
      - name: id
        in: path
        description: ID of the account assessment.
        required: true
        schema:
          type: string
          format: uuid
        example: 61ccd037-8d95-4856-89e7-b043fb84ca26
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                discriminator:
                  propertyName: status
                  mapping:
                    pending: "#/components/schemas/PendingAccountAssessment"
                    completed: "#/components/schemas/CompletedAccountAssessment"
                    failed: "#/components/schemas/FailedAccountAssessment"
                oneOf:
                - $ref: "#/components/schemas/PendingAccountAssessment"
                - $ref: "#/components/schemas/CompletedAccountAssessment"
                - $ref: "#/components/schemas/FailedAccountAssessment"
      security:
      - JWT: []
  /v2/accounts/{id}:
    get:
      tags:
      - Accounts
      summary: Get an account
      operationId: getAccount
      parameters:
      - name: id
        in: path
        description: ID of the account.
        required: true
        schema:
          type: string
          format: uuid
        example: c70bd7bc-58e0-4fdb-8c1f-70186e0de587
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Account"
      security:
      - JWT: []
  /v2/accounts:
    get:
      tags:
      - Accounts
      summary: List all accounts
      operationId: listAccounts
      parameters:
      - name: page
        in: query
        description: Index of the requested page.
        schema:
          minimum: 1
          type: integer
          format: int32
          default: 1
      - name: size
        in: query
        description: Number of elements per page in response.
        schema:
          maximum: 100
          minimum: 1
          type: integer
          format: int32
          default: 10
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AccountPage"
      security:
      - JWT: []
  /v2/attachments:
    get:
      tags:
      - Attachments
      summary: List all attachments
      operationId: listAttachments
      parameters:
      - name: transaction_id
        in: query
        description: Filter attachments by transaction.
        schema:
          type: string
          format: uuid
        example: 29883c3d-0b11-4c38-91b0-af9018cc5b14
      - name: include_deleted
        in: query
        description: "When set to true, results will include attachments that have\
          \ been deleted."
        schema:
          type: boolean
          default: false
      - name: page
        in: query
        description: Index of the requested page.
        schema:
          minimum: 1
          type: integer
          format: int32
          default: 1
      - name: size
        in: query
        description: Number of elements per page in response.
        schema:
          maximum: 100
          minimum: 1
          type: integer
          format: int32
          default: 10
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AttachmentPage"
      security:
      - JWT: []
    post:
      tags:
      - Attachments
      summary: Create an attachment
      description: This operation allows you to upload and attach a document to a
        transaction.
      operationId: createAttachment
      requestBody:
        content:
          multipart/form-data:
            schema:
              required:
              - document
              - transaction_id
              type: object
              properties:
                document:
                  type: string
                  format: binary
                transaction_id:
                  type: string
                  description: ID of the transaction the document will be attached
                    to.
                  format: uuid
                  example: 3439bd9a-077a-4c02-8bd7-f14eadf8975b
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Attachment"
      security:
      - JWT: []
  /v2/attachments/{id}:
    get:
      tags:
      - Attachments
      summary: Get an attachment
      description: "This operation uses content negotiation to request either a JSON\
        \ representation of the attachment, or the actual document. Check the OpenAPI\
        \ specification for more details."
      operationId: getAttachment
      parameters:
      - name: id
        in: path
        description: ID of the attachment.
        required: true
        schema:
          type: string
          format: uuid
        example: c70bd7bc-58e0-4fdb-8c1f-70186e0de587
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Attachment"
            application/octet-stream:
              schema:
                type: string
                format: binary
      security:
      - JWT: []
    delete:
      tags:
      - Attachments
      summary: Delete an attachment
      operationId: deleteAttachment
      parameters:
      - name: id
        in: path
        description: ID of the attachment.
        required: true
        schema:
          type: string
          format: uuid
        example: c70bd7bc-58e0-4fdb-8c1f-70186e0de587
      responses:
        "204":
          description: No content
      security:
      - JWT: []
  /v2/collections/{id}:
    get:
      tags:
      - Collections
      summary: Get a collection
      operationId: getCollection
      parameters:
      - name: id
        in: path
        description: ID of the collection.
        required: true
        schema:
          type: string
          format: uuid
        example: 45195a6f-daa8-4bc1-9ac4-3979e72bd89d
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Collection"
      security:
      - JWT: []
    delete:
      tags:
      - Collections
      summary: Cancel a SEPA Direct Debit collection
      description: |-
        This endpoint allows you to cancel a SEPA Direct Debit collection before it has been submitted.

        Concretely a collection can only be canceled while in `scheduled` state.
      operationId: cancelCollection
      parameters:
      - name: id
        in: path
        description: ID of the collection.
        required: true
        schema:
          type: string
          format: uuid
        example: 45195a6f-daa8-4bc1-9ac4-3979e72bd89d
      responses:
        "200":
          description: OK
      security:
      - JWT: []
  /v2/collections:
    post:
      tags:
      - Collections
      summary: Schedule a SEPA Direct Debit collection
      description: This endpoint allows you to schedule a SEPA Direct Debit collection
        to be credited on one of your accounts.
      operationId: createCollection
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateCollection"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Collection"
      security:
      - JWT: []
  /v2/collections/bulks:
    post:
      tags:
      - Collections
      summary: Create bulk collections
      description: |-
        This endpoint allows to create up to 5000 collections with a single call. It acts exactly as if you called the `POST /v2/collections` endpoint 5000 times yourself, except you don't need to worry about rate limiting. It also allows you to get an aggregated state for this bulk.

        This endpoint does not perform the collections synchronously, a `200 OK` response means the bulk will be handled in the near future. You can either poll the `GET` endpoint or use the webhooks to follow its progress.

        Note that the completion of a bulk does not mean all collections are settled, it only means the collections were initiated (the equivalent of a call to `POST /v2/collections`).
      operationId: createCollectionsBulk
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateBulkCollections"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BulkCollections"
      security:
      - JWT: []
  /v2/collections/bulks/{id}:
    get:
      tags:
      - Collections
      summary: Get a bulk and its current progress
      operationId: getCollectionsBulk
      parameters:
      - name: id
        in: path
        description: ID of the bulk.
        required: true
        schema:
          type: string
          format: uuid
        example: 6ba07619-24ff-43f3-b1f0-cdc9b06bf8a7
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BulkCollections"
      security:
      - JWT: []
  /v2/collections/bulks/{id}/collections:
    get:
      tags:
      - Collections
      summary: Get the status of individual collection in a bulk
      operationId: getCollectionsBulkItems
      parameters:
      - name: id
        in: path
        description: ID of the bulk.
        required: true
        schema:
          type: string
          format: uuid
        example: 6ba07619-24ff-43f3-b1f0-cdc9b06bf8a7
      - name: status
        in: query
        description: Filter collections by status.
        schema:
          uniqueItems: true
          type: array
          items:
            type: string
            enum:
            - pending
            - scheduled
            - confirmed
            - returned
            - canceled
            - failed
      - name: page
        in: query
        description: Index of the requested page.
        schema:
          minimum: 1
          type: integer
          format: int32
          default: 1
      - name: size
        in: query
        description: Number of elements per page in response.
        schema:
          maximum: 100
          minimum: 1
          type: integer
          format: int32
          default: 10
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CollectionPage"
      security:
      - JWT: []
  /v2/ibans:
    get:
      tags:
      - IBANs
      summary: List all IBANs
      operationId: listIbans
      parameters:
      - name: account_id
        in: query
        description: ID of the account.
        schema:
          type: string
          format: uuid
        example: 29883c3d-0b11-4c38-91b0-af9018cc5b14
      - name: include_deleted
        in: query
        description: "When set to true, results will include IBANs that have been\
          \ deleted."
        schema:
          type: boolean
          default: false
      - name: page
        in: query
        description: Index of the requested page.
        schema:
          minimum: 1
          type: integer
          format: int32
          default: 1
      - name: size
        in: query
        description: Number of elements per page in response.
        schema:
          maximum: 100
          minimum: 1
          type: integer
          format: int32
          default: 10
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/IbanPage"
      security:
      - JWT: []
    post:
      tags:
      - IBANs
      summary: Create a virtual IBAN
      operationId: createIban
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateIban"
        required: true
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Iban"
      security:
      - JWT: []
  /v2/ibans/{id}:
    get:
      tags:
      - IBANs
      summary: Get an IBAN
      operationId: getIban
      parameters:
      - name: id
        in: path
        description: ID of the IBAN.
        required: true
        schema:
          type: string
          format: uuid
        example: c70bd7bc-58e0-4fdb-8c1f-70186e0de587
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Iban"
      security:
      - JWT: []
    delete:
      tags:
      - IBANs
      summary: Delete an IBAN
      description: This operation permanently deletes an IBAN from your account.
      operationId: deleteIban
      parameters:
      - name: id
        in: path
        description: ID of the IBAN.
        required: true
        schema:
          type: string
          format: uuid
        example: c70bd7bc-58e0-4fdb-8c1f-70186e0de587
      responses:
        "204":
          description: No content
      security:
      - JWT: []
    patch:
      tags:
      - IBANs
      summary: Update an IBAN
      description: This operation allows you to update an IBAN name or change its
        status. Only provided parameters have an effect on the current state of an
        IBAN.
      operationId: updateIban
      parameters:
      - name: id
        in: path
        description: ID of the IBAN.
        required: true
        schema:
          type: string
          format: uuid
        example: c70bd7bc-58e0-4fdb-8c1f-70186e0de587
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateIban"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Iban"
      security:
      - JWT: []
  /v2/mandate_signature_requests:
    get:
      tags:
      - Mandate signature requests
      summary: List the mandate signature requests
      operationId: listMandateSignatureRequests
      parameters:
      - name: status
        in: query
        description: Filter mandate signature requests by status.
        schema:
          uniqueItems: true
          type: array
          items:
            type: string
            enum:
            - sent
            - expired
            - completed
      - name: page
        in: query
        description: Index of the requested page.
        schema:
          minimum: 1
          type: integer
          format: int32
          default: 1
      - name: size
        in: query
        description: Number of elements per page in response.
        schema:
          maximum: 100
          minimum: 1
          type: integer
          format: int32
          default: 10
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MandateSignatureRequestPage"
      security:
      - JWT: []
    post:
      tags:
      - Mandate signature requests
      summary: Create a new mandate signature request
      description: An email will be sent to the mandate debtor so they can complete
        and sign the collection mandate.
      operationId: createMandateSignatureRequest
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateMandateSignatureRequest"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MandateSignatureRequest"
      security:
      - JWT: []
  /v2/mandate_signature_requests/{id}:
    get:
      tags:
      - Mandate signature requests
      summary: Get a mandate signature request
      operationId: getMandateSignatureRequest
      parameters:
      - name: id
        in: path
        description: ID of the mandate signature request.
        required: true
        schema:
          type: string
          format: uuid
        example: 45195a6f-daa8-4bc1-9ac4-3979e72bd89d
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MandateSignatureRequest"
      security:
      - JWT: []
    delete:
      tags:
      - Mandate signature requests
      summary: Delete a mandate signature request
      description: A mandate signature request can be deleted in case the collection
        mandate no longer needs to be completed and signed. This action is only possible
        while the mandate signature request is not in `completed` status.
      operationId: deleteMandateSignatureRequest
      parameters:
      - name: id
        in: path
        description: ID of the mandate signature request.
        required: true
        schema:
          type: string
          format: uuid
        example: 45195a6f-daa8-4bc1-9ac4-3979e72bd89d
      responses:
        "200":
          description: OK
      security:
      - JWT: []
  /v2/mandate_signature_requests/{id}/renewals:
    post:
      tags:
      - Mandate signature requests
      summary: Renew a mandate signature request
      description: A mandate signature request can be renewed in case it has expired
        before the collection mandate could be completed and signed. This action is
        only possible while the mandate signature request is in `expired` status.
      operationId: renewMandateSignatureRequest
      parameters:
      - name: id
        in: path
        description: ID of the mandate signature request.
        required: true
        schema:
          type: string
          format: uuid
        example: 45195a6f-daa8-4bc1-9ac4-3979e72bd89d
      responses:
        "200":
          description: OK
      security:
      - JWT: []
  /v2/sandbox/incoming_collections:
    post:
      tags:
      - Sandbox
      summary: Simulate an incoming SEPA collection
      description: This endpoint allows you to simulate an incoming SEPA collection
        to your account.
      operationId: createIncomingCollection
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateIncomingCollection"
        required: true
      responses:
        "204":
          description: No content
      security:
      - JWT: []
      servers:
      - url: https://api.sandbox.memo.bank
        description: Sandbox
  /v2/sandbox/incoming_transfers:
    post:
      tags:
      - Sandbox
      summary: Simulate an incoming SEPA transfer
      description: This endpoint allows you to simulate an incoming SEPA transfer
        to your account.
      operationId: createIncomingTransfer
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateIncomingTransfer"
        required: true
      responses:
        "204":
          description: No content
      security:
      - JWT: []
      servers:
      - url: https://api.sandbox.memo.bank
        description: Sandbox
  /v2/transactions/{id}:
    get:
      tags:
      - Transactions
      summary: Get a transaction
      operationId: getTransaction
      parameters:
      - name: id
        in: path
        description: ID of the transaction.
        required: true
        schema:
          type: string
          format: uuid
        example: c70bd7bc-58e0-4fdb-8c1f-70186e0de587
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Transaction"
      security:
      - JWT: []
  /v2/transactions:
    get:
      tags:
      - Transactions
      summary: List all transactions
      operationId: listTransactions
      parameters:
      - name: account_id
        in: query
        description: Filter transactions by account.
        schema:
          type: string
          format: uuid
        example: 29883c3d-0b11-4c38-91b0-af9018cc5b14
      - name: page
        in: query
        description: Index of the requested page.
        schema:
          minimum: 1
          type: integer
          format: int32
          default: 1
      - name: size
        in: query
        description: Number of elements per page in response.
        schema:
          maximum: 100
          minimum: 1
          type: integer
          format: int32
          default: 10
      - name: start_date
        in: query
        description: "Filter transactions by execution date (inclusive greater than),\
          \ in ISO8601 format."
        schema:
          type: string
          format: date-time
        example: 2021-09-01T12:30:00Z
      - name: end_date
        in: query
        description: "Filter transactions by execution date (exclusive lower than),\
          \ in ISO8601 format."
        schema:
          type: string
          format: date-time
        example: 2021-09-30T12:30:00Z
      - name: reference
        in: query
        description: Filter transactions by reference.
        schema:
          type: string
          format: uuid
        example: 0c734fd7-4753-424e-85f3-0b4e3590ee1c
      - name: local_iban
        in: query
        description: Filter transactions by local IBAN. Allows for example to list
          all incoming **and** outgoing transactions that passed through a given virtual
          IBAN.
        schema:
          type: string
      - name: batch_id
        in: query
        description: Filter transactions by transaction batch.
        schema:
          type: string
          format: uuid
        example: 0c734fd7-4753-424e-85f3-0b4e3590ee1c
      - name: custom_id
        in: query
        description: Filter transactions by custom ID.
        schema:
          type: string
        example: 637406efda8534de8c0e
      - name: order_by
        in: query
        description: Sort transactions in ascending or descending order.
        schema:
          type: string
          default: -execution_date
          enum:
          - execution_date
          - -execution_date
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TransactionPage"
      security:
      - JWT: []
  /v2/transfers/{id}:
    get:
      tags:
      - Transfers
      summary: Get a transfer
      operationId: getTransfer
      parameters:
      - name: id
        in: path
        description: ID of the transfer.
        required: true
        schema:
          type: string
          format: uuid
        example: aa431134-bdc4-416e-8b7e-58a39e389707
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TransferV2"
      security:
      - JWT: []
    delete:
      tags:
      - Transfers
      summary: Cancel a SEPA transfer
      description: |-
        This endpoint allows you to cancel a SEPA transfer before its execution has actually started.

        Concretely a transfer can be canceled while in `scheduled` or `authorized` state. However, attempting to cancel a transfer in `authorized` state may result in a `transfer_not_cancelable` error if the transfer has already been sent to the creditor's bank. For the same reason, instant transfers cannot be canceled at all.
      operationId: cancelTransfer
      parameters:
      - name: id
        in: path
        description: ID of the transfer.
        required: true
        schema:
          type: string
          format: uuid
        example: aa431134-bdc4-416e-8b7e-58a39e389707
      responses:
        "200":
          description: OK
      security:
      - JWT: []
  /v2/transfers:
    post:
      tags:
      - Transfers
      summary: Initiate a SEPA transfer
      description: This endpoint allows you to initiate a SEPA transfer from your
        account.
      operationId: createTransferV2
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateTransferV2"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TransferV2"
      security:
      - JWT: []
  /v2/transfers/bulks:
    post:
      tags:
      - Transfers
      summary: Create bulk transfers
      description: |-
        This endpoint allows to create up to 5000 transfers with a single call. It acts exactly as if you called the `POST /v2/transfers` endpoint 5000 times yourself, except you don't need to worry about rate limiting. It also allows you to get an aggregated state for this bulk.

        This endpoint does not perform the transfers synchronously, a `200 OK` response means the bulk will be handled in the near future. You can either poll the `GET` endpoint or use the webhooks to follow its progress.

        Note that the completion of a bulk does not mean all transfers are settled, it only means the transfers were initiated (the equivalent of a call to `POST /v2/transfers`).
      operationId: createTransfersBulk
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateBulkTransfers"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BulkTransfers"
      security:
      - JWT: []
  /v2/transfers/{id}/proof:
    get:
      tags:
      - Transfers
      summary: Generate a proof of transfer
      description: Proofs can only be generated for confirmed transfers.
      operationId: getProofOfTransfer
      parameters:
      - name: id
        in: path
        description: ID of the transfer.
        required: true
        schema:
          type: string
          format: uuid
        example: c70bd7bc-58e0-4fdb-8c1f-70186e0de587
      responses:
        "200":
          description: OK
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
      security:
      - JWT: []
  /v2/transfers/bulks/{id}:
    get:
      tags:
      - Transfers
      summary: Get a bulk and its current progress
      operationId: getTransfersBulk
      parameters:
      - name: id
        in: path
        description: ID of the bulk.
        required: true
        schema:
          type: string
          format: uuid
        example: 6ba07619-24ff-43f3-b1f0-cdc9b06bf8a7
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BulkTransfers"
      security:
      - JWT: []
  /v2/transfers/bulks/{id}/transfers:
    get:
      tags:
      - Transfers
      summary: Get the status of individual transfers in a bulk
      operationId: getTransfersBulkItems
      parameters:
      - name: id
        in: path
        description: ID of the bulk.
        required: true
        schema:
          type: string
          format: uuid
        example: 6ba07619-24ff-43f3-b1f0-cdc9b06bf8a7
      - name: status
        in: query
        description: Filter transfers by status.
        schema:
          uniqueItems: true
          type: array
          items:
            type: string
            enum:
            - pending
            - scheduled
            - authorized
            - confirmed
            - returned
            - canceled
            - failed
      - name: page
        in: query
        description: Index of the requested page.
        schema:
          minimum: 1
          type: integer
          format: int32
          default: 1
      - name: size
        in: query
        description: Number of elements per page in response.
        schema:
          maximum: 100
          minimum: 1
          type: integer
          format: int32
          default: 10
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TransferV2Page"
      security:
      - JWT: []
  /v2/wire_transfers:
    post:
      tags:
      - Wire Transfers
      summary: Initiate a wire transfer
      description: This endpoint allows you to initiate a wire transfer from your
        account.
      operationId: createWireTransfer
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateWireTransfer"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/WireTransfer"
      security:
      - JWT: []
  /v2/wire_transfers/{id}/attachments:
    post:
      tags:
      - Wire Transfers
      summary: Create an attachment to a wire transfer
      description: This operation allows you to upload and attach a document to a
        wire transfer when its status is `pending_attachment_required`.
      operationId: createWireTransferAttachment
      parameters:
      - name: id
        in: path
        description: ID of the wire transfer.
        required: true
        schema:
          type: string
          format: uuid
        example: c70bd7bc-58e0-4fdb-8c1f-70186e0de587
      requestBody:
        content:
          multipart/form-data:
            schema:
              required:
              - document
              type: object
              properties:
                document:
                  type: string
                  format: binary
      responses:
        "201":
          description: Created
      security:
      - JWT: []
  /v2/wire_transfers/{id}/proof:
    get:
      tags:
      - Wire Transfers
      summary: Generate a proof of wire transfer
      description: Proofs can only be generated for confirmed wire transfers.
      operationId: getProofOfWireTransfer
      parameters:
      - name: id
        in: path
        description: ID of the wire transfer.
        required: true
        schema:
          type: string
          format: uuid
        example: c70bd7bc-58e0-4fdb-8c1f-70186e0de587
      responses:
        "200":
          description: OK
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
      security:
      - JWT: []
  /v2/wire_transfers/{id}:
    get:
      tags:
      - Wire Transfers
      summary: Get a wire transfer
      operationId: getWireTransfer
      parameters:
      - name: id
        in: path
        description: ID of the wire transfer.
        required: true
        schema:
          type: string
          format: uuid
        example: aa431134-bdc4-416e-8b7e-58a39e389707
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/WireTransfer"
      security:
      - JWT: []
components:
  schemas:
    PendingAccountAssessment:
      required:
      - iban
      - id
      - status
      type: object
      allOf:
      - $ref: "#/components/schemas/AccountAssessmentDiscriminator"
    CreateAccountAssessment:
      required:
      - iban
      type: object
      properties:
        iban:
          pattern: "^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}$"
          type: string
          description: IBAN of the account to assess.
          example: FR7617338000014606038580616
        identifications:
          type: array
          description: List of identifications to match against the account.
          items:
            $ref: "#/components/schemas/Identification"
          default: []
    Identification:
      type: object
      discriminator:
        propertyName: type
        mapping:
          name: "#/components/schemas/NameIdentification"
          siren: "#/components/schemas/SirenIdentification"
          lei: "#/components/schemas/LeiIdentification"
      oneOf:
      - $ref: "#/components/schemas/NameIdentification"
      - $ref: "#/components/schemas/SirenIdentification"
      - $ref: "#/components/schemas/LeiIdentification"
    LeiIdentification:
      required:
      - type
      - value
      type: object
      allOf:
      - $ref: "#/components/schemas/IdentificationDiscriminator"
      - type: object
        properties:
          value:
            pattern: "^[0-9A-Z]{18}[0-9]{2}$"
            type: string
            description: LEI to match.
            example: 984500F8B951A45B4034
    NameIdentification:
      required:
      - type
      - value
      type: object
      allOf:
      - $ref: "#/components/schemas/IdentificationDiscriminator"
      - type: object
        properties:
          value:
            maxLength: 140
            minLength: 1
            type: string
            description: Name to match.
            example: John Doe
    SirenIdentification:
      required:
      - type
      - value
      type: object
      allOf:
      - $ref: "#/components/schemas/IdentificationDiscriminator"
      - type: object
        properties:
          value:
            pattern: "^\\d{9}$"
            type: string
            description: SIREN to match.
            example: "133535310"
    AccountAssessment:
      type: object
      discriminator:
        propertyName: status
        mapping:
          pending: "#/components/schemas/PendingAccountAssessment"
          completed: "#/components/schemas/CompletedAccountAssessment"
          failed: "#/components/schemas/FailedAccountAssessment"
      oneOf:
      - $ref: "#/components/schemas/PendingAccountAssessment"
      - $ref: "#/components/schemas/CompletedAccountAssessment"
      - $ref: "#/components/schemas/FailedAccountAssessment"
    Capability:
      required:
      - can_credit
      - can_debit
      - type
      type: object
      properties:
        type:
          type: string
          description: Type of transaction.
          enum:
          - standard_transfer
          - instant_transfer
          - core_collection
          - b2b_collection
        can_debit:
          type: boolean
          description: Whether the account's financial institution supports debiting
            accounts through this scheme.
          example: true
        can_credit:
          type: boolean
          description: Whether the account's financial institution supports crediting
            accounts through this scheme.
          example: true
    CompletedAccountAssessment:
      required:
      - bic
      - capabilities
      - completed_date
      - iban
      - id
      - identification_matches
      - risk_indicators
      - status
      type: object
      allOf:
      - $ref: "#/components/schemas/AccountAssessmentDiscriminator"
      - type: object
        properties:
          bic:
            type: string
            description: BIC deduced from the IBAN.
            example: MEMOFRP2XXX
          completed_date:
            type: string
            description: Completion date of the assessment.
            format: date-time
            example: 2025-05-04T09:42:00Z
          risk_indicators:
            uniqueItems: true
            type: array
            description: |
              List of risk indicators. If an indicator is present, we advise you to proceed to further verification before initiating transactions to that account.
              Please note that an empty list does not necessarily mean the account does not pose any risk.
              We may add new indicators over time.

              - `frequent_returns`: the account is subject to frequent return requests.
              - `suspicious_activity`: the account is flagged as having a suspicious activity and is subject to frequent return requests.
              - `failed_identification_match`: at least one of the requested identifications did not match exactly.
            items:
              type: string
              description: |
                List of risk indicators. If an indicator is present, we advise you to proceed to further verification before initiating transactions to that account.
                Please note that an empty list does not necessarily mean the account does not pose any risk.
                We may add new indicators over time.

                - `frequent_returns`: the account is subject to frequent return requests.
                - `suspicious_activity`: the account is flagged as having a suspicious activity and is subject to frequent return requests.
                - `failed_identification_match`: at least one of the requested identifications did not match exactly.
              enum:
              - frequent_returns
              - suspicious_activity
              - failed_identification_match
          identification_matches:
            type: array
            description: "List of identification matches. For each identification\
              \ given in the request, a corresponding identification match will be\
              \ present in this list."
            items:
              $ref: "#/components/schemas/IdentificationMatch"
          capabilities:
            type: array
            description: "List of transaction types supported by the account's financial\
              \ institution. Please note that if an institution supports a transaction\
              \ type, it does not necessarily mean that the account itself supports\
              \ it."
            items:
              $ref: "#/components/schemas/Capability"
    FailedAccountAssessment:
      required:
      - failure_code
      - iban
      - id
      - status
      type: object
      allOf:
      - $ref: "#/components/schemas/AccountAssessmentDiscriminator"
      - type: object
        properties:
          failure_code:
            type: string
            description: Code that represents the failure reason when the account
              assessment has failed.
            enum:
            - invalid_iban
    IdentificationMatch:
      type: object
      discriminator:
        propertyName: type
        mapping:
          name: "#/components/schemas/NameIdentificationMatch"
          siren: "#/components/schemas/SirenIdentificationMatch"
          lei: "#/components/schemas/LeiIdentificationMatch"
      oneOf:
      - $ref: "#/components/schemas/NameIdentificationMatch"
      - $ref: "#/components/schemas/SirenIdentificationMatch"
      - $ref: "#/components/schemas/LeiIdentificationMatch"
    LeiIdentificationMatch:
      required:
      - identification
      - status
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/IdentificationMatchDiscriminator"
      - type: object
        properties:
          status:
            type: string
            description: Status of the match result.
            enum:
            - match
            - no_match
            - no_answer_possible
    NameIdentificationMatch:
      required:
      - identification
      - status
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/IdentificationMatchDiscriminator"
      - type: object
        properties:
          status:
            type: string
            description: Status of the name match result.
            enum:
            - match
            - close_match
            - no_match
            - no_answer_possible
          matched_name:
            type: string
            description: "Matched name, only present when status is `close_match`\
              \ or `match`."
            example: John Doe
    SirenIdentificationMatch:
      required:
      - identification
      - status
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/IdentificationMatchDiscriminator"
      - type: object
        properties:
          status:
            type: string
            description: Status of the match result.
            enum:
            - match
            - no_match
            - no_answer_possible
    Account:
      required:
      - balance
      - currency
      - iban
      - id
      - is_main
      - name
      - status
      - type
      type: object
      properties:
        id:
          type: string
          description: ID of the account.
          format: uuid
          example: db2b50c0-a943-4eb1-a69f-fa37f112daa8
        name:
          type: string
          description: "Name of the account, as seen in the Memo Bank interface."
          example: Main account
        status:
          type: string
          description: Status of the account.
          enum:
          - active
          - closed
        balance:
          type: integer
          description: "Balance of the account, in cents. It represents the **available**\
            \ money on the account at the time of the request. Note that authorized\
            \ overdrafts are not included in the balance."
          format: int64
        currency:
          type: string
          description: "Currency of the account balance, in ISO 4217 format."
          example: EUR
        iban:
          type: string
          description: Main IBAN of the account.
          example: FR7617338000017498690379033
        type:
          type: string
          description: Type of the account.
          example: current_account
          enum:
          - current_account
          - ring_fenced_account
          - ring_fenced_credit_servicer_account
          - settlement_account
          - specially_dedicated_account
          - trust_account
          - meal_voucher_account
          - booster_account
          - dedicated_liquidity_account
          - dedicated_recovery_account
          - line_item_sub_account
        is_main:
          type: boolean
          description: 'Flag indicating if this account is the main account of your
            workspace. '
    AccountPage:
      required:
      - has_next
      - has_prev
      - results
      type: object
      properties:
        results:
          type: array
          description: Elements of the page.
          items:
            $ref: "#/components/schemas/Account"
        has_prev:
          type: boolean
          description: Flag indicating if there is a previous page.
        has_next:
          type: boolean
          description: Flag indicating if there is a next page.
    Attachment:
      required:
      - date
      - filename
      - id
      - is_deleted
      - mime_type
      - size
      - transaction_id
      type: object
      properties:
        id:
          type: string
          description: ID of the attachment.
          format: uuid
          example: db2b50c0-a943-4eb1-a69f-fa37f112daa8
        transaction_id:
          type: string
          description: ID of the transaction this document is attached to.
          format: uuid
          example: 20588f37-0ca6-4abd-80ae-1964d601b516
        filename:
          type: string
          description: Name of the attached file.
          example: document.pdf
        size:
          type: integer
          description: Size of the attached file in bytes.
          format: int64
        mime_type:
          type: string
          description: Mime type of the attached file.
          example: application/pdf
        date:
          type: string
          description: Date at which the file has been attached to a transaction.
          format: date-time
        is_deleted:
          type: boolean
          description: Whether or not this attachment has been deleted.
    AttachmentPage:
      required:
      - has_next
      - has_prev
      - results
      type: object
      properties:
        results:
          type: array
          description: Elements of the page.
          items:
            $ref: "#/components/schemas/Attachment"
        has_prev:
          type: boolean
          description: Flag indicating if there is a previous page.
        has_next:
          type: boolean
          description: Flag indicating if there is a next page.
    Collection:
      required:
      - amount
      - currency
      - id
      - local_iban
      - mandate
      - reference
      - scheduled_date
      - status
      type: object
      properties:
        id:
          type: string
          description: ID of the collection.
          format: uuid
          example: 61b05c4f-3f72-4951-8c30-a2a9faaa5184
        reference:
          type: string
          description: "Unique reference, can be used to correlate with the resulting\
            \ Transaction."
          format: uuid
          example: ab004cfc-99fb-4ba9-bc9c-70982f853cb1
        amount:
          type: integer
          description: "The collection amount, in cents."
          format: int64
          example: 500
        currency:
          type: string
          description: "Currency of the amount, in ISO 4217 format."
          example: EUR
        mandate:
          $ref: "#/components/schemas/CollectionMandate"
        scheduled_date:
          type: string
          description: "The collection scheduled date, in ISO8601 format."
          format: date
          example: 2022-12-05
        local_iban:
          type: string
          description: IBAN credited or to be credited. It can be the main IBAN of
            an account or a virtual IBAN.
          example: FR6430003000509825397888D64
        account_id:
          type: string
          description: "ID of the account this collection belongs to, it can be missing\
            \ while we process it according to the local IBAN."
          format: uuid
          example: 708683cb-60f6-464a-a62f-be2e339c34aa
        status:
          type: string
          description: Current status of the collection.
          example: failed
          enum:
          - pending
          - scheduled
          - confirmed
          - returned
          - canceled
          - failed
        failure_code:
          type: string
          description: "Code that represents the failure reason when the collection\
            \ has failed:\n- `invalid_mandate_iban`: The mandate's IBAN is invalid.\n\
            - `unreachable_mandate_iban`: The mandate's IBAN is unreachable for the\
            \ given scheme.\n- `missing_debtor_address`: The debtor address is missing\
            \ and required for non-EEA SEPA countries.\n- `core_limit_exceeded`: The\
            \ limit for CORE collections was exceeded.\n- `debtor_refusal`: The debtor\
            \ has refused the collection.\n- `debtor_bank_account_closed`: The debtor's\
            \ bank account is closed.\n- `debtor_bank_insufficient_funds`: The debtor's\
            \ bank account has insufficient funds.\n- `debtor_bank_error`: The debtor's\
            \ bank sent us an error.\n- `debtor_bank_invalid_bank_details`: The debtor's\
            \ bank account does not exist or no longer exists.\n- `debtor_bank_refusal`:\
            \ The debtor's bank has refused the collection.\n- `intermediary_system_error`:\
            \ The interbank network sent us an error.\n- `memo_error`: Something went\
            \ wrong on our side.\n- `memo_refusal`: We had to reject the collection.\n\
            - `execution_failure`: Other or undefined pre-settlement execution failures.\n\
            \nThe following codes can only be present on collections initiated as\
            \ part of a bulk. \nWhen initiating a single collection, those codes will\
            \ be returned as an error response \nand the collection won’t be created\
            \ at all:\n- `account_cannot_receive_collections`: The account cannot\
            \ receive collections.\n- `current_account_not_found`: The provided local\
            \ IBAN does not exist.\n- `creditor_is_saving_account`: The provided local\
            \ IBAN is a Booster account.\n- `no_sepa_creditor_identifier`: You need\
            \ to setup a SEPA creditor identifier with your banker.\n- `mandate_info_missing`:\
            \ New mandate information must be complete.\n- `mandate_iban_mismatch`:\
            \ The mandate reference already exists but with a different IBAN.\n- `collection_to_same_account`:\
            \ The local IBAN and the debtor IBAN can not be the same.\n"
          enum:
          - invalid_mandate_iban
          - unreachable_mandate_iban
          - missing_debtor_address
          - core_limit_exceeded
          - execution_failure
          - current_account_not_found
          - no_sepa_creditor_identifier
          - creditor_is_saving_account
          - mandate_info_missing
          - mandate_iban_mismatch
          - collection_to_same_account
          - debtor_refusal
          - debtor_bank_account_closed
          - debtor_bank_error
          - debtor_bank_insufficient_funds
          - debtor_bank_invalid_bank_details
          - debtor_bank_refusal
          - intermediary_system_error
          - memo_error
          - memo_refusal
          - account_cannot_receive_collections
        message:
          type: string
          description: "Message attached to this collection, visible to all involved\
            \ parties."
          example: invoice no12345
        end_to_end_id:
          type: string
          description: "Unique identification to unambiguously identify the transaction.\
            \ This identification is passed on, unchanged, throughout the entire end-to-end\
            \ chain. It can be used for reconciliation or to link tasks relating to\
            \ the transaction."
          example: b0bfb42baa2642c2af0ca3e880fcd590
        internal_note:
          type: string
          description: "Internal note attached to this collection, visible only in\
            \ your Memo Bank workspace."
          example: phone bill
        custom_id:
          type: string
          description: Custom identifier attached to the transaction resulting from
            this collection. It is not transmitted nor visible in your Memo Bank workspace.
            It can only be retrieved or used to search for transactions via Memo Bank
            API.
          example: 637406efda8534de8c0e
        custom_metadata:
          type: string
          description: Custom metadata attached to the transaction resulting from
            this collection. It is not transmitted nor visible in your Memo Bank workspace
            and can only be retrieved via API.
          example: This is some metadata
        return_transaction_id:
          type: string
          description: "If the collection is returned, ID of the corresponding debit\
            \ transaction."
          format: uuid
          example: 94faf5c3-b76e-4173-b2e9-ed27d988a92a
    CollectionMandate:
      required:
      - reference
      - scheme
      type: object
      properties:
        reference:
          type: string
          description: The unique mandate reference.
          example: ABC123DEF
        scheme:
          type: string
          description: The mandate scheme.
          example: core
          enum:
          - b2b
          - core
      description: The SEPA Direct Debit collection mandate used.
    CollectionMandateDebtor:
      required:
      - iban
      - name
      type: object
      properties:
        name:
          maxLength: 256
          minLength: 1
          type: string
          description: Name of the debtor.
          example: John Doe
        iban:
          pattern: "^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}$"
          type: string
          description: IBAN of the debtor.
          example: FR2512739000308553756377J95
        address:
          $ref: "#/components/schemas/CollectionMandateDebtorAddress"
      description: "The debtor associated with this mandate.This field is only required\
        \ in case of a new mandate. If there is an existing mandate with this reference\
        \ and scheme, all information in this field will be ignored except for the\
        \ debtor IBAN which needs to be the same as the one in the existing mandate.\
        \ Providing a different IBAN will produce a 400 error with the code `outgoing_collection_mandate_iban_mismatch`."
    CollectionMandateDebtorAddress:
      required:
      - city
      - country
      - postal_code
      - street
      type: object
      properties:
        street:
          maxLength: 256
          minLength: 1
          type: string
          description: Name of the street.
          example: rue de la Boétie
        building_number:
          maxLength: 256
          minLength: 1
          type: string
          description: Number of the building or house.
          example: "42"
        postal_code:
          maxLength: 256
          minLength: 1
          type: string
          description: Postal or zip code.
          example: "75008"
        city:
          maxLength: 256
          minLength: 1
          type: string
          description: Name of the city.
          example: Paris
        country:
          pattern: "^[A-Z]{2}$"
          type: string
          description: ISO3166-1 alpha-2 country code.
          example: FR
      description: "The debtor's address. Mandatory only when the debtor's bank —\
        \ more specifically, its BIC — is located in a non-EEA SEPA country or territory."
    CreateCollection:
      required:
      - amount
      - local_iban
      - mandate
      - scheduled_date
      type: object
      properties:
        amount:
          minimum: 1
          type: integer
          description: "Amount to be collected, in cents. The currency is always EURO."
          format: int64
          example: 500
        mandate:
          $ref: "#/components/schemas/CreateCollectionMandate"
        scheduled_date:
          type: string
          description: "The ISO8601 formatted date on which the direct debit collection\
            \ will be submitted. This date must not be in the past. If your direct\
            \ debit is scheduled to be submitted on a non-business day, it will be\
            \ effectively submitted on the next business day. The execution will then\
            \ happen on the following business day. For example, a direct debit scheduled\
            \ on a Saturday will be submitted on the following Monday and executed\
            \ on the Tuesday (assuming that both week days are business days)."
          format: date
          example: 2022-12-05
        local_iban:
          pattern: "^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}$"
          type: string
          description: Existing IBAN to be credited. It can be the main IBAN of an
            account or a virtual IBAN.
          example: FR6430003000509825397888D64
        message:
          maxLength: 140
          minLength: 1
          type: string
          description: "Message attached to this collection, visible to all involved\
            \ parties."
          example: invoice no12345
        end_to_end_id:
          maxLength: 35
          minLength: 1
          pattern: "[a-zA-Z0-9\\-\\?\\:\\(\\)\\.\\,\\'\\+\\ ]{1,35}"
          type: string
          description: "Unique identification to unambiguously identify the transaction.\
            \ This identification is passed on, unchanged, throughout the entire end-to-end\
            \ chain. It can be used for reconciliation or to link tasks relating to\
            \ the transaction."
          example: b0bfb42baa2642c2af0ca3e880fcd590
        internal_note:
          maxLength: 3000
          minLength: 1
          type: string
          description: "Internal note attached to this collection, visible only in\
            \ your Memo Bank workspace."
          example: phone bill
        custom_id:
          maxLength: 256
          minLength: 1
          type: string
          description: Custom identifier that will be attached to the transaction
            resulting from this collection. It will not be transmitted nor visible
            in your Memo Bank workspace. It can only be retrieved or used to search
            for transactions via Memo Bank API.
          example: 637406efda8534de8c0e
        custom_metadata:
          maxLength: 2048
          minLength: 1
          type: string
          description: Custom metadata that will be attached to the transaction resulting
            from this collection. It will not be transmitted nor visible in your Memo
            Bank workspace and can only be retrieved via API.
          example: This is some metadata
    CreateCollectionMandate:
      required:
      - reference
      - scheme
      type: object
      properties:
        reference:
          pattern: "^[A-Za-z0-9+?/\\-:().,'\\s]{1,35}$"
          type: string
          description: The unique mandate reference.
          example: ABC123DEF
        scheme:
          type: string
          description: The mandate scheme.
          example: core
          enum:
          - b2b
          - core
        signature_date:
          type: string
          description: "The mandate signature date, in ISO8601 format. The date must\
            \ not be in the future. This field is only required in case of a new mandate.\
            \ If there is an existing mandate matching the scheme and with the same\
            \ reference, this field will be ignored."
          format: date
          example: 2022-12-01
        debtor:
          $ref: "#/components/schemas/CollectionMandateDebtor"
        contract_reference:
          maxLength: 256
          minLength: 1
          type: string
          description: "The contract reference attached to this mandate. This is optional\
            \ metadata.If there is an existing mandate matching the scheme and with\
            \ the same reference, this field will be ignored when provided."
          example: CUST-1234
      description: The SEPA Direct Debit collection mandate to be used.
    BulkCollections:
      required:
      - collections_canceled
      - collections_confirmed
      - collections_failed
      - collections_total
      - id
      - status
      type: object
      properties:
        id:
          type: string
          description: ID of the bulk.
          format: uuid
          example: fe98f29d-5165-45ff-83f9-d7aa83e970b5
        collections_total:
          type: integer
          description: Total number of collections in the bulk.
          format: int32
          example: 3000
        collections_confirmed:
          type: integer
          description: Number of collections that were processed and confirmed.
          format: int32
          example: 1552
        collections_canceled:
          type: integer
          description: Number of collections canceled before processing.
          format: int32
          example: 2
        collections_failed:
          type: integer
          description: Number of collections that were processed and failed.
          format: int32
          example: 57
        status:
          type: string
          description: Aggregated status of the bulk.
          example: pending
          enum:
          - pending
          - completed
    CreateBulkCollections:
      required:
      - collections
      type: object
      properties:
        collections:
          type: array
          description: "Collection creations to execute. There should not be more\
            \ than 5000 collections in a single bulk, and there should be at least\
            \ one."
          items:
            $ref: "#/components/schemas/CreateCollection"
    CollectionPage:
      required:
      - has_next
      - has_prev
      - results
      type: object
      properties:
        results:
          type: array
          description: Elements of the page.
          items:
            $ref: "#/components/schemas/Collection"
        has_prev:
          type: boolean
          description: Flag indicating if there is a previous page.
        has_next:
          type: boolean
          description: Flag indicating if there is a next page.
    Iban:
      required:
      - account_id
      - allow_collections
      - iban
      - id
      - is_deleted
      - name
      - status
      - type
      type: object
      properties:
        id:
          type: string
          description: ID of the IBAN.
          format: uuid
          example: c70bd7bc-58e0-4fdb-8c1f-70186e0de587
        account_id:
          type: string
          description: ID of the account this IBAN belongs to.
          format: uuid
          example: 29883c3d-0b11-4c38-91b0-af9018cc5b14
        iban:
          type: string
          description: Actual value of the IBAN.
          example: FR27590171083068762111832788
        name:
          type: string
          description: Name of the IBAN.
          example: customer no12345
        status:
          type: string
          description: Status of the IBAN. It determines if an IBAN accepts incoming
            or outgoing transfers.
          example: active
          enum:
          - active
          - inactive
        type:
          type: string
          description: "Flag indicating if this IBAN is the main IBAN of an account,\
            \ or a virtual IBAN. Please note that main IBANs cannot be updated or\
            \ deleted."
          example: virtual
          enum:
          - main
          - virtual
        allow_collections:
          type: boolean
          description: Whether or not this IBAN accepts incoming collections.
          example: true
        is_deleted:
          type: boolean
          description: Whether or not this IBAN has been deleted.
          example: false
    CreateIban:
      required:
      - account_id
      - name
      type: object
      properties:
        account_id:
          type: string
          description: ID of the account.
          format: uuid
          example: 29883c3d-0b11-4c38-91b0-af9018cc5b14
        name:
          type: string
          description: "Custom name of the new IBAN, as seen in the Memo Bank interface."
          example: customer no12345
        allow_collections:
          type: boolean
          description: Whether or not to accept incoming collections on this IBAN.
          default: true
    IbanPage:
      required:
      - has_next
      - has_prev
      - results
      type: object
      properties:
        results:
          type: array
          description: Elements of the page.
          items:
            $ref: "#/components/schemas/Iban"
        has_prev:
          type: boolean
          description: Flag indicating if there is a previous page.
        has_next:
          type: boolean
          description: Flag indicating if there is a next page.
    UpdateIban:
      type: object
      properties:
        name:
          type: string
          description: New IBAN name.
          example: customer no12345
        status:
          type: string
          description: New IBAN status.
          enum:
          - active
          - inactive
        allow_collections:
          type: boolean
          description: New value for whether or not to accept incoming collections
            on this IBAN.
        account_id:
          type: string
          description: ID of the account to which the IBAN should point.
          format: uuid
          example: 29883c3d-0b11-4c38-91b0-af9018cc5b14
    Address:
      required:
      - city
      - country
      - postal_code
      - street
      type: object
      properties:
        street:
          type: string
          description: Debtor's street name.
          example: 1 rue Rivoli
        postal_code:
          type: string
          description: Debtor's postal code.
          example: "75004"
        city:
          type: string
          description: Debtor's city.
          example: Paris
        country:
          type: string
          description: Debtor's country code.
          example: FR
      description: Debtor's address.
    MandateSignatureRequest:
      required:
      - debtor_email
      - id
      - is_deleted
      - language
      - reference
      - scheme
      - status
      type: object
      properties:
        id:
          type: string
          description: ID of the mandate signature request
          format: uuid
          example: 61b05c4f-3f72-4951-8c30-a2a9faaa5184
        reference:
          pattern: "^[A-Za-z0-9+?/\\-:().,'\\s]{1,35}$"
          type: string
          description: The unique mandate reference.
          example: ABC123DEF
        scheme:
          type: string
          description: The mandate scheme.
          example: core
          enum:
          - b2b
          - core
        debtor_email:
          type: string
          description: The email address of the debtor.
          example: foo@bar.com
        debtor:
          $ref: "#/components/schemas/MandateSignatureRequestDebtor"
        email_custom_message:
          type: string
          description: Custom text message included in the email sent to the debtor.
          example: "Hi John Doe, here's a collection mandate to sign."
        contract_reference:
          type: string
          description: The contract reference attached to the mandate. This is optional
            metadata.
          example: CUST-1234
        status:
          type: string
          description: Current status of the mandate signature request.
          example: sent
          enum:
          - sent
          - expired
          - completed
        language:
          type: string
          description: The language used for the email and signature page for the
            debtor.
          example: french
          default: french
          enum:
          - french
          - english
        is_deleted:
          type: boolean
          description: Whether or not this mandate signature request has been deleted.
          example: false
    MandateSignatureRequestDebtor:
      required:
      - iban
      - name
      type: object
      properties:
        name:
          type: string
          description: Debtor's name.
          example: John Doe
        iban:
          type: string
          description: Debtor's IBAN.
          example: FR2512739000308553756377J95
        address:
          $ref: "#/components/schemas/Address"
      description: Debtor information filled when the request was signed. This is
        available when the request is completed.
    CreateMandateSignatureRequest:
      required:
      - debtor_email
      - reference
      - scheme
      type: object
      properties:
        reference:
          pattern: "^[A-Za-z0-9+?/\\-:().,'\\s]{1,35}$"
          type: string
          description: The unique mandate reference.
          example: ABC123DEF
        scheme:
          type: string
          description: The mandate scheme.
          example: core
          enum:
          - b2b
          - core
        debtor_email:
          maxLength: 256
          minLength: 1
          pattern: "^(?!.*\\.\\.)[a-zA-Z0-9._%+-]{1,250}@[a-zA-Z0-9.-]{2,250}\\.[a-zA-Z]{2,63}$"
          type: string
          description: The email address of the debtor.
          example: foo@bar.com
        email_custom_message:
          maxLength: 3000
          minLength: 1
          pattern: "^[a-zA-Zà-üÀ-Ü0-9€@&;.,?!()+\\-'’\"\\s]*$"
          type: string
          description: Custom text message that will be included in the email sent
            to the debtor.
          example: "Hi John Doe, here's a collection mandate to sign."
        contract_reference:
          maxLength: 256
          minLength: 1
          type: string
          description: The contract reference that will be attached to the mandate.
            This is optional metadata.
          example: CUST-1234
        language:
          type: string
          description: The language used for the email and signature page for the
            debtor. This is optional.
          example: french
          default: french
          enum:
          - french
          - english
    MandateSignatureRequestPage:
      required:
      - has_next
      - has_prev
      - results
      type: object
      properties:
        results:
          type: array
          description: Elements of the page.
          items:
            $ref: "#/components/schemas/MandateSignatureRequest"
        has_prev:
          type: boolean
          description: Flag indicating if there is a previous page.
        has_next:
          type: boolean
          description: Flag indicating if there is a next page.
    CreateIncomingCollection:
      required:
      - amount
      - local_iban
      type: object
      properties:
        amount:
          minimum: 1
          type: integer
          description: "Amount of the transfer, in cents. The currency is always EURO."
          format: int64
          example: 500
        local_iban:
          pattern: "^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}$"
          type: string
          description: Existing IBAN to be used as the destination of the transfer.
            Can be the main IBAN of an account or a virtual IBAN.
          example: FR6430003000509825397888D64
        message:
          maxLength: 140
          minLength: 1
          type: string
          description: "Message attached to this transfer, visible to all involved\
            \ parties."
          example: invoice no12345
        end_to_end_id:
          maxLength: 35
          minLength: 1
          pattern: "[a-zA-Z0-9\\-\\?\\:\\(\\)\\.\\,\\'\\+\\ ]{1,35}"
          type: string
          description: "Unique identification to unambiguously identify the transaction.\
            \ This identification is passed on, unchanged, throughout the entire end-to-end\
            \ chain. It can be used for reconciliation or to link tasks relating to\
            \ the transaction."
          example: b0bfb42baa2642c2af0ca3e880fcd590
        mandate:
          $ref: "#/components/schemas/CreateIncomingCollectionMandate"
    CreateIncomingCollectionMandate:
      type: object
      properties:
        reference:
          pattern: "^[A-Za-z0-9+?/\\-:().,'\\s]{1,35}$"
          type: string
          description: The unique mandate reference.
          example: ABC123DEF
        creditor:
          $ref: "#/components/schemas/CreateIncomingCollectionMandateCreditor"
      description: "The SEPA Direct Debit collection mandate. Allow you to provide\
        \ mandate information that will be used for the transaction. If not provided,\
        \ default values will be used."
    CreateIncomingCollectionMandateCreditor:
      type: object
      properties:
        name:
          maxLength: 256
          minLength: 1
          type: string
          description: Name of the creditor.
          example: John Doe
        iban:
          pattern: "^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}$"
          type: string
          description: IBAN of the creditor.
          example: FR2512739000308553756377J95
        sepa_identifier:
          pattern: "^([A-Z]{2})([0-9]{2})ZZZ([A-Z0-9]{4,})$"
          type: string
          description: SEPA identifier of the creditor.
          example: FR18ZZZ002305
      description: The creditor associated with this mandate.
    CreateIncomingTransfer:
      required:
      - amount
      - local_iban
      type: object
      properties:
        amount:
          minimum: 1
          type: integer
          description: "Amount of the transfer, in cents. The currency is always EURO."
          format: int64
          example: 500
        local_iban:
          pattern: "^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}$"
          type: string
          description: Existing IBAN to be used as the destination of the transfer.
            Can be the main IBAN of an account or a virtual IBAN.
          example: FR6430003000509825397888D64
        message:
          maxLength: 140
          minLength: 1
          type: string
          description: "Message attached to this transfer, visible to all involved\
            \ parties."
          example: invoice no12345
        end_to_end_id:
          maxLength: 35
          minLength: 1
          pattern: "[a-zA-Z0-9\\-\\?\\:\\(\\)\\.\\,\\'\\+\\ ]{1,35}"
          type: string
          description: "Unique identification to unambiguously identify the transaction.\
            \ This identification is passed on, unchanged, throughout the entire end-to-end\
            \ chain. It can be used for reconciliation or to link tasks relating to\
            \ the transaction."
          example: b0bfb42baa2642c2af0ca3e880fcd590
        counterparty_name:
          type: string
          description: "Name of the debtor. Allow you to provide the name that will\
            \ be used for the transaction. If not provided, a default value will be\
            \ used."
          example: John Doe
        counterparty_iban:
          pattern: "^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}$"
          type: string
          description: "IBAN of the debtor. Allow you to provide the IBAN that will\
            \ be used for the transaction. If not provided, a default value will be\
            \ used."
          example: FR2512739000308553756377J95
    BankAccountRemunerationSource:
      required:
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/TransactionSourceDiscriminator"
    CardDeferredSource:
      required:
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/TransactionSourceDiscriminator"
    CardWithdrawalSource:
      required:
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/TransactionSourceDiscriminator"
    CollectionIncomingReturnSource:
      required:
      - returned_collection_reference
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/TransactionSourceDiscriminator"
      - type: object
        properties:
          counterparty_iban:
            type: string
            description: IBAN of the counterparty. Can be null on old transactions
              for legacy reasons.
          counterparty_bank_bic:
            type: string
            description: BIC of the counterparty's bank. Can be null on old transactions
              for legacy reasons.
          message:
            type: string
            description: "Message attached to this collection, visible to all involved\
              \ parties."
            example: invoice n12345
          end_to_end_id:
            type: string
            description: "Unique identification to unambiguously identify the collection.\
              \ This identification is passed on, unchanged, throughout the entire\
              \ end-to-end chain. It can be used for reconciliation or to link tasks\
              \ relating to the collection. For example, if a collection is returned,\
              \ its return will share the same endToEndId."
            example: b0bfb42baa2642c2af0ca3e880fcd590
          returned_collection_reference:
            type: string
            description: Reference of the original collection being returned.
          reason:
            type: string
            description: Reason for the return of the original collection. Can be
              null on old transactions for legacy reasons.
            enum:
            - bank_identifier_incorrect
            - blocked_account
            - closed_account
            - creditor_bank_is_not_registered
            - creditor_psp_not_registered
            - customer_deceased
            - customer_disabled_direct_debit
            - debtor_psp_not_registered
            - disputed
            - duplication
            - end_customer_deceased
            - eri_option_not_supported
            - following_cancellation_request
            - fraudulent_originated
            - inactive_mandate
            - incorrect_account_number
            - insufficient_funds
            - invalid_bank_operation_code
            - invalid_code_or_format
            - invalid_creditor_account_number
            - invalid_debtor_account
            - invalid_interbank_communication
            - invalid_transaction_code_or_invalid_file_format
            - mandate_mismatch
            - missing_creditors_name_or_address
            - missing_creditor_address
            - missing_creditor_name_or_address
            - missing_debtors_name_or_address
            - missing_debtor_account_or_identification
            - missing_debtor_name_or_address
            - missing_mandatory_information_mandate
            - no_mandate
            - no_mandate_on_scheme
            - not_specified_reason_agent_generated
            - not_specified_reason_customer_generated
            - psp_identifier_incorrect
            - refund_request_by_bank
            - refund_request_by_end_customer
            - regulatory_reason
            - requested_by_the_debtor
            - requested_by_customer
            - settlement_failed
            - specific_service_offered_by_debtor_psp
            - technical_problem
            - transaction_forbidden
            - transaction_unauthorized
            - unrecognized_initiating_party
            - wrong_amount
    CollectionIncomingSource:
      required:
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/TransactionSourceDiscriminator"
      - type: object
        properties:
          counterparty_iban:
            type: string
            description: IBAN of the counterparty. Can be null on old transactions
              for legacy reasons.
          counterparty_bank_bic:
            type: string
            description: BIC of the counterparty's bank. Can be null on old transactions
              for legacy reasons.
          message:
            type: string
            description: "Message attached to this collection, visible to all involved\
              \ parties."
            example: invoice n12345
          end_to_end_id:
            type: string
            description: "Unique identification to unambiguously identify the collection.\
              \ This identification is passed on, unchanged, throughout the entire\
              \ end-to-end chain. It can be used for reconciliation or to link tasks\
              \ relating to the collection. For example, if a collection is returned,\
              \ its return will share the same endToEndId."
            example: b0bfb42baa2642c2af0ca3e880fcd590
    CollectionOutgoingReturnFeesSource:
      required:
      - returned_collection_id
      - returned_collection_reference
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/TransactionSourceDiscriminator"
      - type: object
        properties:
          counterparty_iban:
            type: string
            description: IBAN of the counterparty. Can be null on old transactions
              for legacy reasons.
          counterparty_bank_bic:
            type: string
            description: BIC of the counterparty's bank. Can be null on old transactions
              for legacy reasons.
          message:
            type: string
            description: "Message attached to this collection, visible to all involved\
              \ parties."
            example: invoice n12345
          end_to_end_id:
            type: string
            description: "Unique identification to unambiguously identify the collection.\
              \ This identification is passed on, unchanged, throughout the entire\
              \ end-to-end chain. It can be used for reconciliation or to link tasks\
              \ relating to the collection. For example, if a collection is returned,\
              \ its return will share the same endToEndId."
            example: b0bfb42baa2642c2af0ca3e880fcd590
          returned_collection_id:
            type: string
            description: ID of the original collection being returned.
            format: uuid
          returned_collection_reference:
            type: string
            description: Reference of the original collection being returned.
          reason:
            type: string
            description: Reason for the return of the original collection. Can be
              null on old transactions for legacy reasons.
            enum:
            - bank_identifier_incorrect
            - blocked_account
            - closed_account
            - creditor_bank_is_not_registered
            - creditor_psp_not_registered
            - customer_deceased
            - customer_disabled_direct_debit
            - debtor_psp_not_registered
            - disputed
            - duplication
            - end_customer_deceased
            - eri_option_not_supported
            - following_cancellation_request
            - fraudulent_originated
            - inactive_mandate
            - incorrect_account_number
            - insufficient_funds
            - invalid_bank_operation_code
            - invalid_code_or_format
            - invalid_creditor_account_number
            - invalid_debtor_account
            - invalid_interbank_communication
            - invalid_transaction_code_or_invalid_file_format
            - mandate_mismatch
            - missing_creditors_name_or_address
            - missing_creditor_address
            - missing_creditor_name_or_address
            - missing_debtors_name_or_address
            - missing_debtor_account_or_identification
            - missing_debtor_name_or_address
            - missing_mandatory_information_mandate
            - no_mandate
            - no_mandate_on_scheme
            - not_specified_reason_agent_generated
            - not_specified_reason_customer_generated
            - psp_identifier_incorrect
            - refund_request_by_bank
            - refund_request_by_end_customer
            - regulatory_reason
            - requested_by_the_debtor
            - requested_by_customer
            - settlement_failed
            - specific_service_offered_by_debtor_psp
            - technical_problem
            - transaction_forbidden
            - transaction_unauthorized
            - unrecognized_initiating_party
            - wrong_amount
    CollectionOutgoingReturnSource:
      required:
      - returned_collection_id
      - returned_collection_reference
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/TransactionSourceDiscriminator"
      - type: object
        properties:
          counterparty_iban:
            type: string
            description: IBAN of the counterparty. Can be null on old transactions
              for legacy reasons.
          counterparty_bank_bic:
            type: string
            description: BIC of the counterparty's bank. Can be null on old transactions
              for legacy reasons.
          message:
            type: string
            description: "Message attached to this collection, visible to all involved\
              \ parties."
            example: invoice n12345
          end_to_end_id:
            type: string
            description: "Unique identification to unambiguously identify the collection.\
              \ This identification is passed on, unchanged, throughout the entire\
              \ end-to-end chain. It can be used for reconciliation or to link tasks\
              \ relating to the collection. For example, if a collection is returned,\
              \ its return will share the same endToEndId."
            example: b0bfb42baa2642c2af0ca3e880fcd590
          returned_collection_id:
            type: string
            description: ID of the original collection being returned.
            format: uuid
          returned_collection_reference:
            type: string
            description: Reference of the original collection being returned.
          reason:
            type: string
            description: Reason for the return of the original collection. Can be
              null on old transactions for legacy reasons.
            enum:
            - bank_identifier_incorrect
            - blocked_account
            - closed_account
            - creditor_bank_is_not_registered
            - creditor_psp_not_registered
            - customer_deceased
            - customer_disabled_direct_debit
            - debtor_psp_not_registered
            - disputed
            - duplication
            - end_customer_deceased
            - eri_option_not_supported
            - following_cancellation_request
            - fraudulent_originated
            - inactive_mandate
            - incorrect_account_number
            - insufficient_funds
            - invalid_bank_operation_code
            - invalid_code_or_format
            - invalid_creditor_account_number
            - invalid_debtor_account
            - invalid_interbank_communication
            - invalid_transaction_code_or_invalid_file_format
            - mandate_mismatch
            - missing_creditors_name_or_address
            - missing_creditor_address
            - missing_creditor_name_or_address
            - missing_debtors_name_or_address
            - missing_debtor_account_or_identification
            - missing_debtor_name_or_address
            - missing_mandatory_information_mandate
            - no_mandate
            - no_mandate_on_scheme
            - not_specified_reason_agent_generated
            - not_specified_reason_customer_generated
            - psp_identifier_incorrect
            - refund_request_by_bank
            - refund_request_by_end_customer
            - regulatory_reason
            - requested_by_the_debtor
            - requested_by_customer
            - settlement_failed
            - specific_service_offered_by_debtor_psp
            - technical_problem
            - transaction_forbidden
            - transaction_unauthorized
            - unrecognized_initiating_party
            - wrong_amount
    CollectionOutgoingSource:
      required:
      - collection_id
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/TransactionSourceDiscriminator"
      - type: object
        properties:
          counterparty_iban:
            type: string
            description: IBAN of the counterparty. Can be null on old transactions
              for legacy reasons.
          counterparty_bank_bic:
            type: string
            description: BIC of the counterparty's bank. Can be null on old transactions
              for legacy reasons.
          message:
            type: string
            description: "Message attached to this collection, visible to all involved\
              \ parties."
            example: invoice n12345
          end_to_end_id:
            type: string
            description: "Unique identification to unambiguously identify the collection.\
              \ This identification is passed on, unchanged, throughout the entire\
              \ end-to-end chain. It can be used for reconciliation or to link tasks\
              \ relating to the collection. For example, if a collection is returned,\
              \ its return will share the same endToEndId."
            example: b0bfb42baa2642c2af0ca3e880fcd590
          collection_id:
            type: string
            description: ID of the collection that created this transaction.
            format: uuid
    DebtPurchaseApplicationFeesSource:
      required:
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/TransactionSourceDiscriminator"
    DebtPurchaseDisbursementSource:
      required:
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/TransactionSourceDiscriminator"
    DebtPurchaseInterestsSource:
      required:
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/TransactionSourceDiscriminator"
    DebtPurchaseRepaymentSource:
      required:
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/TransactionSourceDiscriminator"
    DiverseOperationSource:
      required:
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/TransactionSourceDiscriminator"
    InvestmentRedemptionOrderDTO:
      required:
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/TransactionSourceDiscriminator"
    InvestmentSubscriptionOrderDTO:
      required:
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/TransactionSourceDiscriminator"
    LoanApplicationFeesSource:
      required:
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/TransactionSourceDiscriminator"
    LoanDisbursementSource:
      required:
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/TransactionSourceDiscriminator"
    LoanGuaranteeFeeSource:
      required:
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/TransactionSourceDiscriminator"
    LoanReimbursementSource:
      required:
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/TransactionSourceDiscriminator"
    LoanRepaymentSource:
      required:
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/TransactionSourceDiscriminator"
    MaintenanceTransferSource:
      required:
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/TransactionSourceDiscriminator"
    OverdraftAgiosSource:
      required:
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/TransactionSourceDiscriminator"
    OverdraftApplicationFeesSource:
      required:
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/TransactionSourceDiscriminator"
    RtgsTransferIncomingReturnSource:
      required:
      - counterparty_account_number
      - reason
      - returned_transfer_reference
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/TransactionSourceDiscriminator"
      - type: object
        properties:
          counterparty_account_number:
            type: string
            description: Account number of the counterparty.
          counterparty_bank_bic:
            type: string
            description: BIC of the counterparty's bank.
          end_to_end_id:
            type: string
            description: "Unique identification to unambiguously identify the transfer.\
              \ This identification is passed on, unchanged, throughout the entire\
              \ end-to-end chain. It can be used for reconciliation or to link tasks\
              \ relating to the transfer. For example, if a transfer is returned,\
              \ its return will share the same endToEndId."
            example: b0bfb42baa2642c2af0ca3e880fcd590
          returned_transfer_reference:
            type: string
            description: Reference of the original transfer being returned.
          reason:
            type: string
            description: Reason for the return of the original transfer.
            enum:
            - bank_identifier_incorrect
            - blocked_account
            - closed_account
            - creditor_bank_is_not_registered
            - creditor_psp_not_registered
            - customer_deceased
            - customer_disabled_direct_debit
            - debtor_psp_not_registered
            - disputed
            - duplication
            - end_customer_deceased
            - eri_option_not_supported
            - following_cancellation_request
            - fraudulent_originated
            - inactive_mandate
            - incorrect_account_number
            - insufficient_funds
            - invalid_bank_operation_code
            - invalid_code_or_format
            - invalid_creditor_account_number
            - invalid_debtor_account
            - invalid_interbank_communication
            - invalid_transaction_code_or_invalid_file_format
            - mandate_mismatch
            - missing_creditors_name_or_address
            - missing_creditor_address
            - missing_creditor_name_or_address
            - missing_debtors_name_or_address
            - missing_debtor_account_or_identification
            - missing_debtor_name_or_address
            - missing_mandatory_information_mandate
            - no_mandate
            - no_mandate_on_scheme
            - not_specified_reason_agent_generated
            - not_specified_reason_customer_generated
            - psp_identifier_incorrect
            - refund_request_by_bank
            - refund_request_by_end_customer
            - regulatory_reason
            - requested_by_the_debtor
            - requested_by_customer
            - settlement_failed
            - specific_service_offered_by_debtor_psp
            - technical_problem
            - transaction_forbidden
            - transaction_unauthorized
            - unrecognized_initiating_party
            - wrong_amount
    RtgsTransferIncomingSource:
      required:
      - counterparty_account_number
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/TransactionSourceDiscriminator"
      - type: object
        properties:
          counterparty_account_number:
            type: string
            description: Account number of the counterparty.
          counterparty_bank_bic:
            type: string
            description: BIC of the counterparty's bank.
          end_to_end_id:
            type: string
            description: "Unique identification to unambiguously identify the transfer.\
              \ This identification is passed on, unchanged, throughout the entire\
              \ end-to-end chain. It can be used for reconciliation or to link tasks\
              \ relating to the transfer. For example, if a transfer is returned,\
              \ its return will share the same endToEndId."
            example: b0bfb42baa2642c2af0ca3e880fcd590
          message:
            type: string
            description: "Message attached to this transfer, visible to all involved\
              \ parties."
            example: invoice n12345
    RtgsTransferOutgoingSource:
      required:
      - counterparty_account_number
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/TransactionSourceDiscriminator"
      - type: object
        properties:
          counterparty_account_number:
            type: string
            description: Account number of the counterparty.
          counterparty_bank_bic:
            type: string
            description: BIC of the counterparty's bank.
          end_to_end_id:
            type: string
            description: "Unique identification to unambiguously identify the transfer.\
              \ This identification is passed on, unchanged, throughout the entire\
              \ end-to-end chain. It can be used for reconciliation or to link tasks\
              \ relating to the transfer. For example, if a transfer is returned,\
              \ its return will share the same endToEndId."
            example: b0bfb42baa2642c2af0ca3e880fcd590
          message:
            type: string
            description: "Message attached to this transfer, visible to all involved\
              \ parties."
            example: invoice n12345
    SubscriptionSource:
      required:
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/TransactionSourceDiscriminator"
    SweepTransferIncomingSource:
      required:
      - counterparty_bank_bic
      - counterparty_iban
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/TransactionSourceDiscriminator"
      - type: object
        properties:
          counterparty_iban:
            type: string
            description: IBAN of the counterparty.
          counterparty_bank_bic:
            type: string
            description: BIC of the counterparty's bank.
    SweepTransferOutgoingSource:
      required:
      - counterparty_bank_bic
      - counterparty_iban
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/TransactionSourceDiscriminator"
      - type: object
        properties:
          counterparty_iban:
            type: string
            description: IBAN of the counterparty.
          counterparty_bank_bic:
            type: string
            description: BIC of the counterparty's bank.
    TermDepositClosureSourceDTO:
      required:
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/TransactionSourceDiscriminator"
    TermDepositCreationSourceDTO:
      required:
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/TransactionSourceDiscriminator"
    TermDepositInterestPaymentSourceDTO:
      required:
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/TransactionSourceDiscriminator"
    TermDepositWithdrawalSourceDTO:
      required:
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/TransactionSourceDiscriminator"
    Transaction:
      required:
      - account_id
      - amount
      - attachment_count
      - counterparty_name
      - currency
      - direction
      - execution_date
      - id
      - local_iban
      - reference
      - request_date
      - source
      - status
      type: object
      properties:
        id:
          type: string
          description: Unique ID of the transaction.
          format: uuid
          example: fe98f29d-5165-45ff-83f9-d7aa83e970b5
        reference:
          type: string
          description: "Reference of the money movement. In case you initiate a transfer\
            \ between two of your own accounts, both transactions (`debit` and `credit`)\
            \ will have the same reference, it can be safely used to correlate them."
          format: uuid
          example: fe98f29d-5165-45ff-83f9-d7aa83e970b5
        account_id:
          type: string
          description: ID of the account this transaction belongs to.
          format: uuid
          example: 708683cb-60f6-464a-a62f-be2e339c34aa
        amount:
          type: integer
          description: "Amount of the transaction, in cents. The amount is always\
            \ positive, use `direction` to give it a sign."
          format: int64
        local_iban:
          type: string
          description: IBAN through which this transaction got in or out of the account.
            Can be the main IBAN of the account or a virtual IBAN.
          example: FR27590171083068762111832788
        currency:
          type: string
          description: "Currency of the transaction amount, in ISO 4217 format."
          example: EUR
        direction:
          type: string
          description: Direction of the transaction.
          enum:
          - debit
          - credit
        request_date:
          type: string
          description: "Date at which the transaction has been requested, in ISO8601\
            \ format. Usually the same as the execution date, except for scheduled\
            \ transfers and transfer requests."
          format: date-time
        execution_date:
          type: string
          description: "Date at which the transaction processing has started or will\
            \ start, in ISO8601 format. For debits, that’s when the money is removed\
            \ from the available balance of the account."
          format: date-time
        accounting_date:
          type: string
          description: "Date at which the transaction has been confirmed, in ISO8601\
            \ format. For credits, that’s when the money is credited from the available\
            \ balance of the account."
          format: date-time
        counterparty_name:
          type: string
          description: Name of the counterparty.
        internal_note:
          type: string
          description: "Internal note attached to this transaction, visible only in\
            \ your Memo Bank workspace."
          example: phone bill
        status:
          type: string
          description: Current status of the transaction.
          enum:
          - scheduled
          - authorized
          - confirmed
          - rejected
          - canceled
        batch_id:
          type: string
          description: "ID of the batch this transaction belongs to, if any."
          format: uuid
          example: dc47b1ee-1bd7-4072-8d1b-27ff4297b33e
        custom_id:
          type: string
          description: Custom identifier attached to the transaction. It is not transmitted
            nor visible in your Memo Bank workspace. It can only be retrieved or used
            to search for transactions via Memo Bank API.
          example: 637406efda8534de8c0e
        custom_metadata:
          type: string
          description: Custom metadata attached to the transaction. It is not transmitted
            nor visible in your Memo Bank workspace and can only be retrieved via
            API.
          example: This is some metadata
        attachment_count:
          type: integer
          description: Number of documents attached to this transaction.
          format: int32
        source:
          $ref: "#/components/schemas/TransactionSource"
    TransactionSource:
      type: object
      description: Source of the transaction. We may add additional source types over
        time; your application should be able to handle such additions gracefully.
      discriminator:
        propertyName: type
        mapping:
          bank_account_remuneration: "#/components/schemas/BankAccountRemunerationSource"
          card_deferred: "#/components/schemas/CardDeferredSource"
          card_withdrawal: "#/components/schemas/CardWithdrawalSource"
          collection_incoming: "#/components/schemas/CollectionIncomingSource"
          collection_outgoing: "#/components/schemas/CollectionOutgoingSource"
          collection_incoming_return: "#/components/schemas/CollectionIncomingReturnSource"
          collection_outgoing_return_fees: "#/components/schemas/CollectionOutgoingReturnFeesSource"
          collection_outgoing_return: "#/components/schemas/CollectionOutgoingReturnSource"
          debt_purchase_application_fees: "#/components/schemas/DebtPurchaseApplicationFeesSource"
          debt_purchase_disbursement: "#/components/schemas/DebtPurchaseDisbursementSource"
          debt_purchase_interests: "#/components/schemas/DebtPurchaseInterestsSource"
          debt_purchase_repayment: "#/components/schemas/DebtPurchaseRepaymentSource"
          diverse_operation: "#/components/schemas/DiverseOperationSource"
          investment_redemption_order: "#/components/schemas/InvestmentRedemptionOrderDTO"
          investment_subscription_order: "#/components/schemas/InvestmentSubscriptionOrderDTO"
          loan_application_fees: "#/components/schemas/LoanApplicationFeesSource"
          loan_disbursement: "#/components/schemas/LoanDisbursementSource"
          loan_guarantee_fee: "#/components/schemas/LoanGuaranteeFeeSource"
          loan_reimbursement: "#/components/schemas/LoanReimbursementSource"
          loan_repayment: "#/components/schemas/LoanRepaymentSource"
          maintenance_transfer: "#/components/schemas/MaintenanceTransferSource"
          overdraft_agios: "#/components/schemas/OverdraftAgiosSource"
          overdraft_application_fees: "#/components/schemas/OverdraftApplicationFeesSource"
          rtgs_transfer_incoming: "#/components/schemas/RtgsTransferIncomingSource"
          rtgs_transfer_incoming_return: "#/components/schemas/RtgsTransferIncomingReturnSource"
          rtgs_transfer_outgoing: "#/components/schemas/RtgsTransferOutgoingSource"
          subscription: "#/components/schemas/SubscriptionSource"
          sweep_transfer_incoming: "#/components/schemas/SweepTransferIncomingSource"
          sweep_transfer_outgoing: "#/components/schemas/SweepTransferOutgoingSource"
          term_deposit_closure: "#/components/schemas/TermDepositClosureSourceDTO"
          term_deposit_creation: "#/components/schemas/TermDepositCreationSourceDTO"
          term_deposit_interest_payment: "#/components/schemas/TermDepositInterestPaymentSourceDTO"
          term_deposit_withdrawal: "#/components/schemas/TermDepositWithdrawalSourceDTO"
          transfer_incoming: "#/components/schemas/TransferIncomingSource"
          transfer_outgoing: "#/components/schemas/TransferOutgoingSource"
          transfer_incoming_return: "#/components/schemas/TransferIncomingReturnSource"
          transfer_outgoing_return: "#/components/schemas/TransferOutgoingReturnSource"
          wire_transfer_incoming: "#/components/schemas/WireTransferIncomingSource"
          wire_transfer_outgoing: "#/components/schemas/WireTransferOutgoingSource"
          wire_transfer_outgoing_return: "#/components/schemas/WireTransferOutgoingReturnSource"
      oneOf:
      - $ref: "#/components/schemas/BankAccountRemunerationSource"
      - $ref: "#/components/schemas/CardDeferredSource"
      - $ref: "#/components/schemas/CardWithdrawalSource"
      - $ref: "#/components/schemas/CollectionIncomingSource"
      - $ref: "#/components/schemas/CollectionOutgoingSource"
      - $ref: "#/components/schemas/CollectionIncomingReturnSource"
      - $ref: "#/components/schemas/CollectionOutgoingReturnFeesSource"
      - $ref: "#/components/schemas/CollectionOutgoingReturnSource"
      - $ref: "#/components/schemas/DebtPurchaseApplicationFeesSource"
      - $ref: "#/components/schemas/DebtPurchaseDisbursementSource"
      - $ref: "#/components/schemas/DebtPurchaseInterestsSource"
      - $ref: "#/components/schemas/DebtPurchaseRepaymentSource"
      - $ref: "#/components/schemas/DiverseOperationSource"
      - $ref: "#/components/schemas/InvestmentRedemptionOrderDTO"
      - $ref: "#/components/schemas/InvestmentSubscriptionOrderDTO"
      - $ref: "#/components/schemas/LoanApplicationFeesSource"
      - $ref: "#/components/schemas/LoanDisbursementSource"
      - $ref: "#/components/schemas/LoanGuaranteeFeeSource"
      - $ref: "#/components/schemas/LoanReimbursementSource"
      - $ref: "#/components/schemas/LoanRepaymentSource"
      - $ref: "#/components/schemas/MaintenanceTransferSource"
      - $ref: "#/components/schemas/OverdraftAgiosSource"
      - $ref: "#/components/schemas/OverdraftApplicationFeesSource"
      - $ref: "#/components/schemas/RtgsTransferIncomingSource"
      - $ref: "#/components/schemas/RtgsTransferIncomingReturnSource"
      - $ref: "#/components/schemas/RtgsTransferOutgoingSource"
      - $ref: "#/components/schemas/SubscriptionSource"
      - $ref: "#/components/schemas/SweepTransferIncomingSource"
      - $ref: "#/components/schemas/SweepTransferOutgoingSource"
      - $ref: "#/components/schemas/TermDepositClosureSourceDTO"
      - $ref: "#/components/schemas/TermDepositCreationSourceDTO"
      - $ref: "#/components/schemas/TermDepositInterestPaymentSourceDTO"
      - $ref: "#/components/schemas/TermDepositWithdrawalSourceDTO"
      - $ref: "#/components/schemas/TransferIncomingSource"
      - $ref: "#/components/schemas/TransferOutgoingSource"
      - $ref: "#/components/schemas/TransferIncomingReturnSource"
      - $ref: "#/components/schemas/TransferOutgoingReturnSource"
      - $ref: "#/components/schemas/WireTransferIncomingSource"
      - $ref: "#/components/schemas/WireTransferOutgoingSource"
      - $ref: "#/components/schemas/WireTransferOutgoingReturnSource"
    TransferIncomingReturnSource:
      required:
      - returned_transfer_reference
      - transfer_type
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/TransactionSourceDiscriminator"
      - type: object
        properties:
          transfer_type:
            type: string
            description: Type of the transfer.
            enum:
            - standard
            - instant
          counterparty_iban:
            type: string
            description: IBAN of the counterparty. Can be null on old transactions
              for legacy reasons.
          counterparty_bank_bic:
            type: string
            description: BIC of the counterparty's bank. Can be null on old transactions
              for legacy reasons.
          message:
            type: string
            description: "Message attached to this transfer, visible to all involved\
              \ parties."
            example: invoice n12345
          end_to_end_id:
            type: string
            description: "Unique identification to unambiguously identify the transfer.\
              \ This identification is passed on, unchanged, throughout the entire\
              \ end-to-end chain. It can be used for reconciliation or to link tasks\
              \ relating to the transfer. For example, if a transfer is returned,\
              \ its return will share the same endToEndId."
            example: b0bfb42baa2642c2af0ca3e880fcd590
          returned_transfer_reference:
            type: string
            description: Reference of the original transfer being returned.
          reason:
            type: string
            description: Reason for the return of the original transfer. Can be null
              on old transactions for legacy reasons.
            enum:
            - bank_identifier_incorrect
            - blocked_account
            - closed_account
            - creditor_bank_is_not_registered
            - creditor_psp_not_registered
            - customer_deceased
            - customer_disabled_direct_debit
            - debtor_psp_not_registered
            - disputed
            - duplication
            - end_customer_deceased
            - eri_option_not_supported
            - following_cancellation_request
            - fraudulent_originated
            - inactive_mandate
            - incorrect_account_number
            - insufficient_funds
            - invalid_bank_operation_code
            - invalid_code_or_format
            - invalid_creditor_account_number
            - invalid_debtor_account
            - invalid_interbank_communication
            - invalid_transaction_code_or_invalid_file_format
            - mandate_mismatch
            - missing_creditors_name_or_address
            - missing_creditor_address
            - missing_creditor_name_or_address
            - missing_debtors_name_or_address
            - missing_debtor_account_or_identification
            - missing_debtor_name_or_address
            - missing_mandatory_information_mandate
            - no_mandate
            - no_mandate_on_scheme
            - not_specified_reason_agent_generated
            - not_specified_reason_customer_generated
            - psp_identifier_incorrect
            - refund_request_by_bank
            - refund_request_by_end_customer
            - regulatory_reason
            - requested_by_the_debtor
            - requested_by_customer
            - settlement_failed
            - specific_service_offered_by_debtor_psp
            - technical_problem
            - transaction_forbidden
            - transaction_unauthorized
            - unrecognized_initiating_party
            - wrong_amount
    TransferIncomingSource:
      required:
      - transfer_type
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/TransactionSourceDiscriminator"
      - type: object
        properties:
          transfer_type:
            type: string
            description: Type of the transfer.
            enum:
            - standard
            - instant
          counterparty_iban:
            type: string
            description: IBAN of the counterparty. Can be null on old transactions
              for legacy reasons.
          counterparty_bank_bic:
            type: string
            description: BIC of the counterparty's bank. Can be null on old transactions
              for legacy reasons.
          message:
            type: string
            description: "Message attached to this transfer, visible to all involved\
              \ parties."
            example: invoice n12345
          end_to_end_id:
            type: string
            description: "Unique identification to unambiguously identify the transfer.\
              \ This identification is passed on, unchanged, throughout the entire\
              \ end-to-end chain. It can be used for reconciliation or to link tasks\
              \ relating to the transfer. For example, if a transfer is returned,\
              \ its return will share the same endToEndId."
            example: b0bfb42baa2642c2af0ca3e880fcd590
    TransferOutgoingReturnSource:
      required:
      - returned_transfer_id
      - returned_transfer_reference
      - transfer_type
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/TransactionSourceDiscriminator"
      - type: object
        properties:
          transfer_type:
            type: string
            description: Type of the transfer.
            enum:
            - standard
            - instant
          counterparty_iban:
            type: string
            description: IBAN of the counterparty. Can be null on old transactions
              for legacy reasons.
          counterparty_bank_bic:
            type: string
            description: BIC of the counterparty's bank. Can be null on old transactions
              for legacy reasons.
          message:
            type: string
            description: "Message attached to this transfer, visible to all involved\
              \ parties."
            example: invoice n12345
          end_to_end_id:
            type: string
            description: "Unique identification to unambiguously identify the transfer.\
              \ This identification is passed on, unchanged, throughout the entire\
              \ end-to-end chain. It can be used for reconciliation or to link tasks\
              \ relating to the transfer. For example, if a transfer is returned,\
              \ its return will share the same endToEndId."
            example: b0bfb42baa2642c2af0ca3e880fcd590
          returned_transfer_id:
            type: string
            description: ID of the original transfer being returned.
            format: uuid
          returned_transfer_reference:
            type: string
            description: Reference of the original transfer being returned.
          reason:
            type: string
            description: Reason for the return of the original transfer. Can be null
              on old transactions for legacy reasons.
            enum:
            - bank_identifier_incorrect
            - blocked_account
            - closed_account
            - creditor_bank_is_not_registered
            - creditor_psp_not_registered
            - customer_deceased
            - customer_disabled_direct_debit
            - debtor_psp_not_registered
            - disputed
            - duplication
            - end_customer_deceased
            - eri_option_not_supported
            - following_cancellation_request
            - fraudulent_originated
            - inactive_mandate
            - incorrect_account_number
            - insufficient_funds
            - invalid_bank_operation_code
            - invalid_code_or_format
            - invalid_creditor_account_number
            - invalid_debtor_account
            - invalid_interbank_communication
            - invalid_transaction_code_or_invalid_file_format
            - mandate_mismatch
            - missing_creditors_name_or_address
            - missing_creditor_address
            - missing_creditor_name_or_address
            - missing_debtors_name_or_address
            - missing_debtor_account_or_identification
            - missing_debtor_name_or_address
            - missing_mandatory_information_mandate
            - no_mandate
            - no_mandate_on_scheme
            - not_specified_reason_agent_generated
            - not_specified_reason_customer_generated
            - psp_identifier_incorrect
            - refund_request_by_bank
            - refund_request_by_end_customer
            - regulatory_reason
            - requested_by_the_debtor
            - requested_by_customer
            - settlement_failed
            - specific_service_offered_by_debtor_psp
            - technical_problem
            - transaction_forbidden
            - transaction_unauthorized
            - unrecognized_initiating_party
            - wrong_amount
    TransferOutgoingSource:
      required:
      - transfer_id
      - transfer_type
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/TransactionSourceDiscriminator"
      - type: object
        properties:
          transfer_type:
            type: string
            description: Type of the transfer.
            enum:
            - standard
            - instant
          counterparty_iban:
            type: string
            description: IBAN of the counterparty. Can be null on old transactions
              for legacy reasons.
          counterparty_bank_bic:
            type: string
            description: BIC of the counterparty's bank. Can be null on old transactions
              for legacy reasons.
          message:
            type: string
            description: "Message attached to this transfer, visible to all involved\
              \ parties."
            example: invoice n12345
          end_to_end_id:
            type: string
            description: "Unique identification to unambiguously identify the transfer.\
              \ This identification is passed on, unchanged, throughout the entire\
              \ end-to-end chain. It can be used for reconciliation or to link tasks\
              \ relating to the transfer. For example, if a transfer is returned,\
              \ its return will share the same endToEndId."
            example: b0bfb42baa2642c2af0ca3e880fcd590
          transfer_id:
            type: string
            description: ID of the transfer that created this transaction.
            format: uuid
    WireTransferIncomingSource:
      required:
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/TransactionSourceDiscriminator"
      - type: object
        properties:
          counterparty_account_number:
            type: string
            description: Account number of the counterparty.
          message:
            type: string
            description: "Message attached to this transfer, visible to all involved\
              \ parties."
            example: invoice n12345
    WireTransferOutgoingReturnSource:
      required:
      - returned_transfer_reference
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/TransactionSourceDiscriminator"
      - type: object
        properties:
          counterparty_account_number:
            type: string
            description: Account number of the counterparty.
          message:
            type: string
            description: "Message attached to this transfer, visible to all involved\
              \ parties."
            example: invoice n12345
          returned_transfer_reference:
            type: string
            description: Reference of the original wire transfer being returned.
          reason:
            type: string
            description: Reason for the return of the original transfer. Can be null
              on old transactions for legacy reasons.
            enum:
            - bank_identifier_incorrect
            - blocked_account
            - closed_account
            - creditor_bank_is_not_registered
            - creditor_psp_not_registered
            - customer_deceased
            - customer_disabled_direct_debit
            - debtor_psp_not_registered
            - disputed
            - duplication
            - end_customer_deceased
            - eri_option_not_supported
            - following_cancellation_request
            - fraudulent_originated
            - inactive_mandate
            - incorrect_account_number
            - insufficient_funds
            - invalid_bank_operation_code
            - invalid_code_or_format
            - invalid_creditor_account_number
            - invalid_debtor_account
            - invalid_interbank_communication
            - invalid_transaction_code_or_invalid_file_format
            - mandate_mismatch
            - missing_creditors_name_or_address
            - missing_creditor_address
            - missing_creditor_name_or_address
            - missing_debtors_name_or_address
            - missing_debtor_account_or_identification
            - missing_debtor_name_or_address
            - missing_mandatory_information_mandate
            - no_mandate
            - no_mandate_on_scheme
            - not_specified_reason_agent_generated
            - not_specified_reason_customer_generated
            - psp_identifier_incorrect
            - refund_request_by_bank
            - refund_request_by_end_customer
            - regulatory_reason
            - requested_by_the_debtor
            - requested_by_customer
            - settlement_failed
            - specific_service_offered_by_debtor_psp
            - technical_problem
            - transaction_forbidden
            - transaction_unauthorized
            - unrecognized_initiating_party
            - wrong_amount
    WireTransferOutgoingSource:
      required:
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/TransactionSourceDiscriminator"
      - type: object
        properties:
          counterparty_account_number:
            type: string
            description: Account number of the counterparty.
          message:
            type: string
            description: "Message attached to this transfer, visible to all involved\
              \ parties."
            example: invoice n12345
    TransactionPage:
      required:
      - has_next
      - has_prev
      - results
      type: object
      properties:
        results:
          type: array
          description: Elements of the page.
          items:
            $ref: "#/components/schemas/Transaction"
        has_prev:
          type: boolean
          description: Flag indicating if there is a previous page.
        has_next:
          type: boolean
          description: Flag indicating if there is a next page.
    Transfer:
      required:
      - account_id
      - amount
      - beneficiary_iban
      - beneficiary_name
      - currency
      - id
      - local_iban
      - reference
      - transfer_type
      type: object
      properties:
        id:
          type: string
          description: ID of the transfer
          format: uuid
          example: 61b05c4f-3f72-4951-8c30-a2a9faaa5184
        reference:
          type: string
          description: "Unique reference, can be used to correlate with the resulting\
            \ Transaction."
          format: uuid
          example: ab004cfc-99fb-4ba9-bc9c-70982f853cb1
        amount:
          type: integer
          description: "Amount of the transfer, in cents."
          format: int64
          example: 500
        currency:
          type: string
          description: "Currency of the amount, in ISO 4217 format."
          example: EUR
        local_iban:
          type: string
          description: IBAN used as a source of the transfer. It can be the main IBAN
            of an account or a virtual IBAN.
          example: FR6430003000509825397888D64
        account_id:
          type: string
          description: ID of the account this transfer belongs to.
          format: uuid
          example: 708683cb-60f6-464a-a62f-be2e339c34aa
        beneficiary_name:
          type: string
          description: Name of the beneficiary.
          example: John Doe
        beneficiary_iban:
          type: string
          description: IBAN of the beneficiary.
          example: FR2512739000308553756377J95
        transfer_type:
          type: string
          description: Type of the transfer.
          enum:
          - standard
          - instant
        message:
          type: string
          description: "Message attached to this transfer, visible to all involved\
            \ parties."
          example: invoice no12345
        internal_note:
          type: string
          description: "Internal note attached to this transfer, visible only in your\
            \ Memo Bank workspace."
          example: phone bill
    CreateTransfer:
      required:
      - amount
      - beneficiary_iban
      - currency
      - local_iban
      type: object
      properties:
        amount:
          minimum: 1
          type: integer
          description: "Amount of the transfer, in cents."
          format: int64
          example: 500
        currency:
          type: string
          description: "Currency of the amount, in ISO 4217 format."
          example: EUR
        beneficiary_name:
          type: string
          description: "Name of the beneficiary. Will be used to create the beneficiary\
            \ if one doesn't already exist with the same `beneficiary_iban`, will\
            \ be ignored otherwise. If you know the beneficiary exists, you don't\
            \ need to provide a name here."
          example: John Doe
        beneficiary_iban:
          pattern: "^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}$"
          type: string
          description: "IBAN of the beneficiary. Note that when you perform a transfer\
            \ between your own accounts, you can't use a virtual IBAN."
          example: FR2512739000308553756377J95
        local_iban:
          pattern: "^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}$"
          type: string
          description: "Existing IBAN to be used as the source of the transfer. Can\
            \ be the main IBAN of an account or a virtual IBAN. Note that when you\
            \ perform a transfer between your own accounts, you can't use a virtual\
            \ IBAN."
          example: FR6430003000509825397888D64
        type_strategy:
          type: string
          description: "Determines whether to use an instant transfer (available in\
            \ a few seconds on the beneficiary account), or a standard transfer (1-3\
            \ business days). By default, use an instant transfer if available for\
            \ the given beneficiary, use a standard transfer otherwise."
          default: instant_if_available
          enum:
          - standard_only
          - instant_only
          - instant_if_available
        message:
          maxLength: 140
          minLength: 1
          type: string
          description: "Message attached to this transfer, visible to all involved\
            \ parties."
          example: invoice no12345
        internal_note:
          maxLength: 3000
          minLength: 1
          type: string
          description: "Internal note attached to this transfer, visible only in your\
            \ Memo Bank workspace."
          example: phone bill
    TransferV2:
      required:
      - amount
      - beneficiary_iban
      - currency
      - id
      - local_iban
      - reference
      - status
      - type_strategy
      type: object
      properties:
        id:
          type: string
          description: ID of the transfer
          format: uuid
          example: 61b05c4f-3f72-4951-8c30-a2a9faaa5184
        reference:
          type: string
          description: "Unique reference, can be used to correlate with the resulting\
            \ Transaction."
          format: uuid
          example: ab004cfc-99fb-4ba9-bc9c-70982f853cb1
        amount:
          type: integer
          description: "Amount of the transfer, in cents."
          format: int64
          example: 500
        currency:
          type: string
          description: "Currency of the amount, in ISO 4217 format."
          example: EUR
        local_iban:
          type: string
          description: IBAN used as a source of the transfer. It can be the main IBAN
            of an account or a virtual IBAN.
          example: FR6430003000509825397888D64
        account_id:
          type: string
          description: "ID of the account this transfer belongs to, it can be missing\
            \ while we process it according to the local IBAN."
          format: uuid
          example: 708683cb-60f6-464a-a62f-be2e339c34aa
        beneficiary_iban:
          type: string
          description: IBAN of the beneficiary.
          example: FR2512739000308553756377J95
        transfer_type:
          type: string
          description: "Type of the transfer. If the type strategy is `instant_if_available`,\
            \ it can be missing while we determine the appropriate type."
          enum:
          - standard
          - instant
        type_strategy:
          type: string
          description: Strategy used when creating the transfer.
          enum:
          - standard_only
          - instant_only
          - instant_if_available
        status:
          type: string
          description: Current status of the transfer.
          example: failed
          enum:
          - pending
          - scheduled
          - authorized
          - confirmed
          - returned
          - canceled
          - failed
        failure_code:
          type: string
          description: "Code that represents the failure reason when the transfer\
            \ has failed:\n- `beneficiary_bank_account_closed`: The beneficiary's\
            \ bank account is closed.\n- `beneficiary_bank_error`: The beneficiary's\
            \ bank sent us an error.\n- `beneficiary_bank_invalid_bank_details`: The\
            \ beneficiary's bank account does not exist or no longer exists.\n- `beneficiary_bank_refusal`:\
            \ The beneficiary's bank has refused the transfer.\n- `intermediary_system_error`:\
            \ The interbank network sent us an error.\n- `memo_error`: Something went\
            \ wrong on our side.\n- `memo_refusal`: We had to reject the transfer.\n\
            - `execution_failure`: Other or undefined pre-settlement execution failures.\n\
            \nThe following codes can only be present on transfers initiated as part\
            \ of a bulk. \nWhen initiating a single transfer, those codes will be\
            \ returned as an error response \nand the transfer won’t be created at\
            \ all:\n- `current_account_not_found`: The provided local IBAN does not\
            \ exist.\n- `instant_transfer_not_available`: The beneficiary can not\
            \ receive instant transfers.\n- `insufficient_funds`: Not enough funds\
            \ on your account to execute the transfer.\n- `invalid_beneficiary_iban`:\
            \ The beneficiary's IBAN is invalid.\n- `maximum_amount_exceeded`: The\
            \ transfer amount exceeds the limit.\n- `missing_new_beneficiary_name`:\
            \ The beneficiary does not exist and the name was not provided.\n- `new_beneficiary_is_owned_iban`:\
            \ The beneficiary does not exist and is one of your IBAN.\n- `transfer_to_same_account`:\
            \ The transfer cannot credit the debtor account.\n- `transfer_to_owned_account_with_virtual_iban`:\
            \ A virtual IBAN cannot be used to transfer between your accounts.\n-\
            \ `transfer_from_saving_account_to_external_beneficiary`: You cannot transfer\
            \ money to external beneficiaries from \nthe Booster account.\n- `unreachable_beneficiary_iban`:\
            \ The beneficiary is unreachable for the given transfer type.\n"
          enum:
          - insufficient_funds
          - execution_failure
          - instant_transfer_not_available
          - invalid_beneficiary_iban
          - unreachable_beneficiary_iban
          - maximum_amount_exceeded
          - current_account_not_found
          - transfer_to_same_account
          - transfer_to_owned_account_with_virtual_iban
          - transfer_from_saving_account_to_external_beneficiary
          - missing_new_beneficiary_name
          - missing_beneficiary_address
          - new_beneficiary_is_owned_iban
          - beneficiary_bank_account_closed
          - beneficiary_bank_error
          - beneficiary_bank_invalid_bank_details
          - beneficiary_bank_refusal
          - intermediary_system_error
          - memo_error
          - memo_refusal
        scheduled_date:
          type: string
          description: "Date on which the transfer was scheduled, if any."
          format: date
        message:
          type: string
          description: "Message attached to this transfer, visible to all involved\
            \ parties."
          example: invoice no12345
        end_to_end_id:
          type: string
          description: "Unique identification to unambiguously identify the transaction.\
            \ This identification is passed on, unchanged, throughout the entire end-to-end\
            \ chain. It can be used for reconciliation or to link tasks relating to\
            \ the transaction."
          example: b0bfb42baa2642c2af0ca3e880fcd590
        internal_note:
          type: string
          description: "Internal note attached to this transfer, visible only in your\
            \ Memo Bank workspace."
          example: phone bill
        custom_id:
          type: string
          description: Custom identifier attached to the transaction resulting from
            this transfer. It is not transmitted nor visible in your Memo Bank workspace.
            It can only be retrieved or used to search for transactions via Memo Bank
            API.
          example: 637406efda8534de8c0e
        custom_metadata:
          type: string
          description: Custom metadata attached to the transaction resulting from
            this transfer. It is not transmitted nor visible in your Memo Bank workspace
            and can only be retrieved via API.
          example: This is some metadata
        return_transaction_id:
          type: string
          description: "If the transfer is returned, ID of the corresponding credit\
            \ transaction.."
          format: uuid
          example: c285420d-ab85-400c-8d03-c8fab5ca37d2
    CreateTransferV2:
      required:
      - amount
      - beneficiary_iban
      - local_iban
      type: object
      properties:
        amount:
          minimum: 1
          type: integer
          description: "Amount of the transfer, in cents. The currency is always EURO."
          format: int64
          example: 500
        beneficiary_name:
          type: string
          description: "Name of the beneficiary. Will be used to create the beneficiary\
            \ if one doesn't already exist with the same `beneficiary_iban`, will\
            \ be ignored otherwise. If you know the beneficiary exists, you don't\
            \ need to provide a name here."
          example: John Doe
        beneficiary_address:
          $ref: "#/components/schemas/TransferBeneficiaryAddress"
        beneficiary_iban:
          pattern: "^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}$"
          type: string
          description: "IBAN of the beneficiary. Note that when you perform a transfer\
            \ between your own accounts, you can't use a virtual IBAN."
          example: FR2512739000308553756377J95
        local_iban:
          pattern: "^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}$"
          type: string
          description: "Existing IBAN to be used as the source of the transfer. Can\
            \ be the main IBAN of an account or a virtual IBAN. Note that when you\
            \ perform a transfer between your own accounts, you can't use a virtual\
            \ IBAN."
          example: FR6430003000509825397888D64
        type_strategy:
          type: string
          description: "Determines whether to use an instant transfer (available in\
            \ a few seconds on the beneficiary account), or a standard transfer (1-3\
            \ business days). By default, use an instant transfer if available for\
            \ the given beneficiary, use a standard transfer otherwise."
          default: instant_if_available
          enum:
          - standard_only
          - instant_only
          - instant_if_available
        scheduled_date:
          type: string
          description: "The ISO8601 formatted date on which the transfer will be executed.\
            \ This date must not be in the past. If not set, the transfer is executed\
            \ immediately. Setting this date is incompatible with `instant_only` strategy."
          format: date
          example: 2022-12-05
        message:
          maxLength: 140
          minLength: 1
          type: string
          description: "Message attached to this transfer, visible to all involved\
            \ parties."
          example: invoice no12345
        end_to_end_id:
          maxLength: 35
          minLength: 1
          pattern: "[a-zA-Z0-9\\-\\?\\:\\(\\)\\.\\,\\'\\+\\ ]{1,35}"
          type: string
          description: "Unique identification to unambiguously identify the transaction.\
            \ This identification is passed on, unchanged, throughout the entire end-to-end\
            \ chain. It can be used for reconciliation or to link tasks relating to\
            \ the transaction."
          example: b0bfb42baa2642c2af0ca3e880fcd590
        internal_note:
          maxLength: 3000
          minLength: 1
          type: string
          description: "Internal note attached to this transfer, visible only in your\
            \ Memo Bank workspace."
          example: phone bill
        custom_id:
          maxLength: 256
          minLength: 1
          type: string
          description: Custom identifier that will be attached to the transaction
            resulting from this transfer. It will not be transmitted nor visible in
            your Memo Bank workspace. It can only be retrieved or used to search for
            transactions via Memo Bank API.
          example: 637406efda8534de8c0e
        custom_metadata:
          maxLength: 2048
          minLength: 1
          type: string
          description: Custom metadata that will be attached to the transaction resulting
            from this transfer. It will not be transmitted nor visible in your Memo
            Bank workspace and can only be retrieved via API.
          example: This is some metadata
    TransferBeneficiaryAddress:
      required:
      - city
      - country
      - postal_code
      - street
      type: object
      properties:
        street:
          maxLength: 256
          minLength: 1
          type: string
          description: Name of the street.
          example: rue de la Boétie
        postal_code:
          maxLength: 256
          minLength: 1
          type: string
          description: Postal or zip code.
          example: "75008"
        city:
          maxLength: 256
          minLength: 1
          type: string
          description: Name of the city.
          example: Paris
        country:
          pattern: "^[A-Z]{2}$"
          type: string
          description: ISO3166-1 alpha-2 country code.
          example: FR
      description: "Address of the beneficiary. Will be used to create the beneficiary\
        \ if one doesn't already exist with the same `account_identifier`, will be\
        \ ignored otherwise."
    BulkTransfers:
      required:
      - id
      - status
      - transfers_canceled
      - transfers_confirmed
      - transfers_failed
      - transfers_total
      type: object
      properties:
        id:
          type: string
          description: ID of the bulk.
          format: uuid
          example: fe98f29d-5165-45ff-83f9-d7aa83e970b5
        transfers_total:
          type: integer
          description: Total number of transfers in the bulk.
          format: int32
          example: 3000
        transfers_confirmed:
          type: integer
          description: Number of transfers that were processed and confirmed.
          format: int32
          example: 1552
        transfers_canceled:
          type: integer
          description: Number of transfers canceled before processing.
          format: int32
          example: 2
        transfers_failed:
          type: integer
          description: Number of transfers that were processed and failed.
          format: int32
          example: 57
        status:
          type: string
          description: Aggregated status of the bulk.
          example: pending
          enum:
          - pending
          - completed
    CreateBulkTransfers:
      required:
      - transfers
      type: object
      properties:
        transfers:
          type: array
          description: "Transfer creations to execute. There should not be more than\
            \ 5000 transfers in a single bulk, and there should be at least one."
          items:
            $ref: "#/components/schemas/CreateTransferV2"
    TransferV2Page:
      required:
      - has_next
      - has_prev
      - results
      type: object
      properties:
        results:
          type: array
          description: Elements of the page.
          items:
            $ref: "#/components/schemas/TransferV2"
        has_prev:
          type: boolean
          description: Flag indicating if there is a previous page.
        has_next:
          type: boolean
          description: Flag indicating if there is a next page.
    Event:
      required:
      - date
      - event_type
      - id
      - resource_id
      - resource_type
      type: object
      properties:
        id:
          type: string
          description: "ID of this event. Must be used for idempotence: an event with\
            \ the same ID can be sent multiple times in case of error, but should\
            \ only be processed once."
          format: uuid
          example: ad8340e7-0675-4182-9c95-520e7c9a72a3
        date:
          type: string
          description: "Event creation date, in ISO8601 format."
          format: date-time
        event_type:
          type: string
          description: Type of event. We may add additional possible types over time;
            your application should be able to handle such additions gracefully.
          enum:
          - account_created
          - account_updated
          - account_closed
          - attachment_created
          - attachment_deleted
          - collection_confirmed
          - collection_returned
          - collection_canceled
          - collection_failed
          - iban_created
          - iban_updated
          - iban_deleted
          - transaction_scheduled
          - transaction_authorized
          - transaction_confirmed
          - transaction_rejected
          - transaction_canceled
          - transfer_confirmed
          - transfer_returned
          - transfer_canceled
          - transfer_failed
          - wire_transfer_confirmed
          - wire_transfer_returned
          - wire_transfer_canceled
          - wire_transfer_failed
          - wire_transfer_attachment_required
          - bulk_transfers_completed
          - bulk_collections_completed
          - mandate_signature_request_sent
          - mandate_signature_request_expired
          - mandate_signature_request_completed
          - mandate_signature_request_deleted
          - account_assessment_failed
          - account_assessment_completed
        resource_type:
          type: string
          description: Type of the resource referenced by this event. We may add additional
            possible source types over time; your application should be able to handle
            such additions gracefully.
          enum:
          - account
          - attachment
          - collection
          - iban
          - transaction
          - transfer
          - wire_transfer
          - bulk_transfers
          - bulk_collections
          - mandate_signature_request
          - account_assessment
        resource_id:
          type: string
          description: ID of the resource referenced by this event.
          format: uuid
          example: 5400f1ad-788c-4bef-9ded-4d7afd8472d7
    AccountIdentifier:
      type: object
      description: Account identifier of the beneficiary.
      discriminator:
        propertyName: type
        mapping:
          iban_and_bic: "#/components/schemas/IbanAndBic"
          account_number_and_bic: "#/components/schemas/AccountNumberAndBic"
          account_number_and_routing_code: "#/components/schemas/AccountNumberAndRoutingCode"
      oneOf:
      - $ref: "#/components/schemas/IbanAndBic"
      - $ref: "#/components/schemas/AccountNumberAndBic"
      - $ref: "#/components/schemas/AccountNumberAndRoutingCode"
    AccountNumberAndBic:
      required:
      - account_number
      - bic
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/AccountIdentifierDiscriminator"
      - type: object
        properties:
          account_number:
            type: string
            example: "123456789"
          bic:
            pattern: "^[A-Z0-9]{4}[A-Z]{2}[A-Z0-9]{2}([A-Z0-9]{3})?$"
            type: string
            example: MEMOFRP2XXX
    AccountNumberAndRoutingCode:
      required:
      - account_number
      - routing_code
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/AccountIdentifierDiscriminator"
      - type: object
        properties:
          account_number:
            type: string
            example: "123456789"
          routing_code:
            type: string
            example: "123456789"
    IbanAndBic:
      required:
      - bic
      - iban
      - type
      type: object
      allOf:
      - $ref: "#/components/schemas/AccountIdentifierDiscriminator"
      - type: object
        properties:
          iban:
            pattern: "^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}$"
            type: string
            example: FR2512739000308553756377J95
          bic:
            pattern: "^[A-Z0-9]{4}[A-Z]{2}[A-Z0-9]{2}([A-Z0-9]{3})?$"
            type: string
            example: MEMOFRP2XXX
    WireTransfer:
      required:
      - beneficiary_account_identifier
      - id
      - instructed_amount
      - instructed_currency
      - local_iban
      - message
      - reference
      - status
      type: object
      properties:
        id:
          type: string
          description: ID of the wire transfer
          format: uuid
          example: 61b05c4f-3f72-4951-8c30-a2a9faaa5184
        reference:
          type: string
          description: "Unique reference, can be used to correlate with the resulting\
            \ Transaction."
          format: uuid
          example: ab004cfc-99fb-4ba9-bc9c-70982f853cb1
        instructed_amount:
          type: integer
          description: "Amount of the wire transfer, in the smallest unit of the instructed\
            \ currency."
          format: int64
          example: 500
        instructed_currency:
          type: string
          description: "Currency of the wire transfer, in ISO 4217 format."
          example: EUR
        account_id:
          type: string
          description: "ID of the account this wire transfer belongs to, it can be\
            \ missing while we process it according to the local IBAN."
          format: uuid
          example: 708683cb-60f6-464a-a62f-be2e339c34aa
        local_iban:
          type: string
          description: IBAN used as a source of the wire transfer. It can be the main
            IBAN of an account or a virtual IBAN.
          example: FR6430003000509825397888D64
        beneficiary_account_identifier:
          $ref: "#/components/schemas/AccountIdentifier"
        message:
          type: string
          description: "Message attached to this wire transfer, visible to all involved\
            \ parties."
          example: invoice no12345
        internal_note:
          type: string
          description: "Internal note attached to this wire transfer, visible only\
            \ in your Memo Bank workspace."
          example: phone bill
        uetr:
          type: string
          description: Unique End-to-end Transaction Reference for this wire transfer.
            This allows you to track and trace the transaction through tools like
            Swift GPI.
          example: 62dacdad-b003-4738-b21d-29fbfca5d1ea
        custom_id:
          type: string
          description: Custom identifier attached to the transaction resulting from
            this wire transfer. It is not transmitted nor visible in your Memo Bank
            workspace. It can only be retrieved or used to search for transactions
            via Memo Bank API.
          example: 637406efda8534de8c0e
        custom_metadata:
          type: string
          description: Custom metadata attached to the transaction resulting from
            this wire transfer. It is not transmitted nor visible in your Memo Bank
            workspace and can only be retrieved via API.
          example: This is some metadata
        status:
          type: string
          description: Current status of the wire transfer.
          example: failed
          enum:
          - pending
          - pending_attachment_required
          - authorized
          - confirmed
          - returned
          - failed
        failure_code:
          type: string
          description: Code that represents the failure reason when the wire transfer
            has failed.
          enum:
          - insufficient_funds
          - execution_failure
          - maximum_amount_exceeded
          - current_account_not_found
          - transfer_to_same_account
          - transfer_to_owned_account_with_virtual_iban
          - transfer_from_saving_account_to_external_beneficiary
          - new_beneficiary_is_owned_iban
          - iban_and_bic_inconsistency
          - country_and_account_identifier_inconsistency
          - country_unavailable
          - currency_unavailable
          - amount_too_low
          - amount_too_high
          - invalid_account_identifier_for_country
          - invalid_routing_code_for_country
          - missing_beneficiary_lei
          - beneficiary_bank_account_closed
          - beneficiary_bank_error
          - beneficiary_bank_invalid_bank_details
          - beneficiary_bank_refusal
          - intermediary_system_error
          - memo_error
          - memo_refusal
    CreateWireTransfer:
      required:
      - beneficiary
      - instructed_amount
      - instructed_currency
      - local_iban
      - message
      - purpose
      type: object
      properties:
        instructed_amount:
          minimum: 1
          type: integer
          description: "Amount of the wire transfer, in the smallest unit of the instructed\
            \ currency."
          format: int64
          example: 500
        instructed_currency:
          pattern: "^[A-Z]{3}$"
          type: string
          description: Currency of the wire transfer. An exchange rate will be applied
            if the currency differs from the currency of the local account.
          example: EUR
        local_iban:
          pattern: "^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}$"
          type: string
          description: Existing IBAN to be used as the source of the wire transfer.
            Can be the main IBAN of an account or a virtual IBAN.
          example: FR6430003000509825397888D64
        beneficiary:
          $ref: "#/components/schemas/TransferBeneficiary"
        purpose:
          type: string
          description: Purpose of this wire transfer.
          enum:
          - goods_purchase
          - services_purchase
        message:
          maxLength: 140
          minLength: 10
          type: string
          description: "Message attached to this wire transfer, visible to all involved\
            \ parties."
          example: invoice no12345
        internal_note:
          maxLength: 3000
          minLength: 1
          type: string
          description: "Internal note attached to this wire transfer, visible only\
            \ in your Memo Bank workspace."
          example: phone bill
        custom_id:
          maxLength: 256
          minLength: 1
          type: string
          description: Custom identifier that will be attached to the transaction
            resulting from this wire transfer. It will not be transmitted nor visible
            in your Memo Bank workspace. It can only be retrieved or used to search
            for transactions via Memo Bank API.
          example: 637406efda8534de8c0e
        custom_metadata:
          maxLength: 2048
          minLength: 1
          type: string
          description: Custom metadata that will be attached to the transaction resulting
            from this wire transfer. It will not be transmitted nor visible in your
            Memo Bank workspace and can only be retrieved via API.
          example: This is some metadata
    TransferBeneficiary:
      required:
      - account_identifier
      - address
      - bank_country
      - name
      - type
      type: object
      properties:
        name:
          type: string
          description: "Name of the beneficiary. Will be used to create the beneficiary\
            \ if one doesn't already exist with the same `account_identifier`, will\
            \ be ignored otherwise."
          example: John Doe
        account_identifier:
          $ref: "#/components/schemas/AccountIdentifier"
        bank_country:
          pattern: "^[A-Z]{2}$"
          type: string
          description: "Country of the beneficiary's bank. Will be used to create\
            \ the beneficiary if one doesn't already exist with the same `account_identifier`,\
            \ will be ignored otherwise."
          example: FR
        address:
          $ref: "#/components/schemas/TransferBeneficiaryAddress"
        type:
          type: string
          description: "Type of the beneficiary. Will be used to create the beneficiary\
            \ if one doesn't already exist with the same `account_identifier`, will\
            \ be ignored otherwise."
          enum:
          - person
          - company
          - government
        lei:
          pattern: "^[0-9A-Z]{18}[0-9]{2}$"
          type: string
          description: "LEI of the beneficiary. Will be used to create the beneficiary\
            \ if one doesn't already exist with the same `account_identifier`, will\
            \ be ignored otherwise. This is only required if the selected `type` is\
            \ `company`."
          example: 969500151TTK0D1U6N42
      description: Information regarding the beneficiary of this wire transfer.
    IdentificationDiscriminator:
      required:
      - type
      type: object
      properties:
        value:
          type: string
        type:
          type: string
          description: Type of identification to match.
          enum:
          - name
          - siren
          - lei
    AccountAssessmentDiscriminator:
      required:
      - iban
      - id
      - status
      type: object
      properties:
        id:
          type: string
          description: ID of the account assessment.
          format: uuid
          example: 61ccd037-8d95-4856-89e7-b043fb84ca26
        status:
          type: string
          description: Status of the account assessment.
          enum:
          - pending
          - completed
          - failed
        iban:
          type: string
          description: IBAN from the request.
          example: FR7617338000014606038580616
    IdentificationMatchDiscriminator:
      required:
      - identification
      - type
      type: object
      properties:
        type:
          type: string
          description: Type of matched identification.
          enum:
          - name
          - siren
          - lei
        identification:
          type: string
          description: Matched identification.
    TransactionSourceDiscriminator:
      required:
      - type
      type: object
      properties:
        type:
          type: string
          enum:
          - bank_account_remuneration
          - card_credit
          - card_debit
          - card_deferred
          - card_withdrawal
          - collection_incoming
          - collection_outgoing
          - collection_incoming_return
          - collection_outgoing_return
          - collection_outgoing_return_fees
          - debt_purchase_application_fees
          - debt_purchase_disbursement
          - debt_purchase_interests
          - debt_purchase_repayment
          - diverse_operation
          - investment_redemption_order
          - investment_subscription_order
          - loan_application_fees
          - loan_disbursement
          - loan_guarantee_fee
          - loan_reimbursement
          - loan_repayment
          - maintenance_transfer
          - overdraft_agios
          - overdraft_application_fees
          - rtgs_transfer_incoming
          - rtgs_transfer_incoming_return
          - rtgs_transfer_outgoing
          - rtgs_transfer_outgoing_return
          - subscription
          - sweep_transfer_incoming
          - sweep_transfer_outgoing
          - term_deposit_closure
          - term_deposit_creation
          - term_deposit_interest_payment
          - term_deposit_withdrawal
          - transfer_incoming
          - transfer_outgoing
          - transfer_incoming_return
          - transfer_outgoing_return
          - wire_transfer_incoming
          - wire_transfer_outgoing
          - wire_transfer_outgoing_return
    AccountIdentifierDiscriminator:
      required:
      - type
      type: object
      properties:
        type:
          type: string
          enum:
          - iban_and_bic
          - account_number_and_bic
          - account_number_and_routing_code
  securitySchemes:
    JWT:
      type: http
      scheme: bearer
      bearerFormat: JWT
x-topics:
- title: Getting started
  content: |
    To get started with our Premium Bank API, talk to your banker first. He or she needs  to activate the API feature on your Memo Bank workspace.

    Once your banker has granted you API access, you can then set up your authentication using our web interface. To do so, navigate to the  [`API`](https://client.memo.bank/api) section of your Memo Bank workspace.

    Owners and administrators can create applications and manage their permissions. They can also invite collaborators to an application, allowing them to manage certificates, IP allow-lists, and  webhooks.

    Once an application and a certificate have been created, you will have  three pieces of information allowing you to authenticate requests on  the API:
    1. a **certificate** and its SHA256 thumbprint;
    2. a **secret code**;
    3. a cryptographic **private key**.
- title: Authentication
  content: "Our authentication is based on JSON Web Token ([JWT](https://datatracker.ietf.org/doc/html/rfc7519))\
    \ and JSON Web Signature ([JWS](https://datatracker.ietf.org/doc/html/rfc7515)).\n\
    \nRegardless of which programming language you are using, there should be [a library](https://jwt.io/libraries)\
    \ to handle the cryptographic part for you. All you need is to provide the correct\
    \ header and payload claims. \n\n**In the JWT header:**\n- `alg` must be `RS256`,\
    \ as we require an RSA-SHA256 signature. \n- `typ` must be `JWT`.\n- `x5t#S256`\
    \ is the SHA256 thumbprint of the certificate, which you can find in the user\
    \ interface.\n\n**In the JWT payload:**\n- `sub` must be the request method, followed\
    \ by a space and the full path, including query parameters.\n- `aud` must be the\
    \ domain to which you are making the request, e.g., `api.memo.bank`.\n- `iat`\
    \ must be the timestamp at which you created the token. Note that we accept only\
    \ a 5-second difference from the server time to mitigate clock skew.\n- `jti`\
    \ must be a unique identifier for the token. It must be different for each request\
    \ and follow the UUID format.\n- `sec` must be the secret information you obtained\
    \ during the setup process in the user interface. This is a custom claim not covered\
    \ by the JWT specification.\n- `dig#S256` must be a `base64url_encoding(sha_256(body))`,\
    \ to be provided only if the request has a body; for example, it is not necessary\
    \ for `GET` requests (see [`base64url_encoding`](https://datatracker.ietf.org/doc/html/rfc7515#appendix-C)).\
    \ This is a custom claim not covered by the JWT specification.\n\nThe JWT must\
    \ then be **signed with the private key** you generated during the setup (see\
    \ [Getting started](#topic-getting-started)), and included in the HTTP headers\
    \ of the request, as a standard bearer token `Authorization: Bearer <token>`.\n"
  example: |
    _Example JWT header and payload_
    ```json
    {
      "alg": "RS256",
      "typ": "JWT",
      "x5t#S256": "3A14ZcxIaasp4RHaYReL7wevm3oDzn7ZqmgqScCMY74"
    }
    {
      "sub": "POST /v1/transfers",
      "aud": "api.memo.bank",
      "iat": 1657055009,
      "jti": "5525620b-9dcd-4562-8c6c-60984f46cb48",
      "sec": "a2029d646c94406d2945b7a2b31e4fb3ff09a6d0ae29144380775b5471c4e846",
      "dig#S256": "lW6N_kO2gPMsMkzXyn028gWwrnaN0kJaiy7FMJcR0Ek"
    }
    ```
- title: Idempotent requests
  content: "Our Premium Bank API supports **idempotency** to safely retry requests\
    \ without accidentally performing the same operation twice. This is useful when\
    \ an API call is disrupted in transit and you do not receive a response. For example,\
    \ if a request to create a transfer does not go through due to a network connection\
    \ error, you can retry the request with the same  idempotency key to guarantee\
    \ that only the single transfer originally  attempted is created.\n\nTo perform\
    \ an idempotent request, provide an additional `Idempotency-Key` **request header**.\
    \ We recommend using a **V4 UUID**. If the API call fails with a network error\
    \ or responds with a  `5XX`, `409`, or `429` status code, we expect the caller\
    \ to perform retries with the same `Idempotency-Key` header until it responds\
    \ differently. For any other response code, especially other `4XX` errors, there\
    \ is no point in attempting retries, as we will always return the same result.\
    \ \n\nWhen a previous response is replayed, the response includes an  additional\
    \ HTTP header: `Idempotent-Replayed: true`.\n\nIf an original request is still\
    \ being processed when an idempotency key is reused, the API will return a `409\
    \ Conflict` error  (which is safe to retry).\n\nSubsequent requests must be identical\
    \ to the original request, or the API  will return a `422 Unprocessable Entity`\
    \ error. We do not support setting  an idempotency key on `GET` and `DELETE` requests,\
    \ as these requests are inherently idempotent.\n"
  example: |
    ```
    curl --request POST \
      --url https://api.memo.bank/v1/transfers \
      --header 'Authorization: Bearer ***' \
      --header 'Idempotency-Key: 19b390d1-e7d4-4e27-abe2-49cac9b41ba1' \
      --header 'Content-Type: application/json' \
      --data '{...}'
    ```
- title: Errors
  content: |
    Our Premium Bank API uses standard HTTP response codes to indicate the success or failure of requests. Codes in the `2xx` range indicate success; codes in the `4xx` and `5xx` ranges indicate errors. The format of error messages is unified and can be distinguished by their `code` key. The `message` provides a plain English explanation of the problem.
  example: |
    ```json
    {
      "code": "error_code",
      "message": "Example error message.",
    }
    ```
- title: Versioning and backwards compatibility
  content: |
    Our Premium Bank API is versioned by path (`/v1/...`). When we introduce breaking changes, we will increase this version number. We will, of course, continually make backward-compatible changes without increasing the version number.

    Examples of changes we do **not** consider breaking include:
    * Adding new API resources.
    * Adding new optional request parameters to existing API methods.
    * Adding new properties to existing API responses. We will occasionally move response fields in the API and will continue to return the existing field in its previous location while removing it from this documentation.
    * Changing the order of properties in existing API responses.
    * Changing the length or format of opaque strings, such as object IDs, error messages, and other human-readable strings. Strings that are marked as const or enum in this documentation will not change.
    * Adding new `EventType` or `ResourceType` enum values for webhooks.
    * Adding new `TransactionSource` enum values for transactions.
- title: Rate limiting
  content: "We enforce a rate limit on the number of HTTP requests that can be made\
    \ in a  given period. When the limit is reached, our Premium Bank API will return\
    \ a `429 Too Many Requests` error.\n\nTo allow you to handle this rate limiting\
    \ programmatically, the following headers are sent with every response: \n- `RateLimit-Limit`:\
    \ total number of available requests between two quota resets;\n- `RateLimit-Remaining`:\
    \ number of available requests until the quota is reset;\n- `RateLimit-Reset`:\
    \ time remaining (in seconds) until the quota is reset.\n"
- title: API recipes
  content: |
    While our OpenAPI specification provides a comprehensive reference for the Memo Bank API, we've created  API recipes to give you practical, hands-on guides for common use cases. These recipes offer step-by-step  examples to help you quickly integrate and leverage our API. You can find them here:  [API Premium - Memo Bank](https://aide.memo.bank/category/349-api)
- title: FAQ
  content: "### How do transactions differ from transfers and collections?\nTransfers\
    \ and collections are types of transactions that you can initiate through the\
    \ API. They have dedicated  endpoint resources to help you follow their detailed\
    \ lifecycle. On the other hand,  transactions allow you to follow the lifecycle\
    \ of all transactions, including those not initiated through  the API (incoming\
    \ transactions, card transactions, etc). Since transfers and collections are a\
    \ subset of  transactions, some webhook events will be triggered simultaneously\
    \ (for instance, `transfer_confirmed` and  `transaction_confirmed`), and you can\
    \ use either.\n### Is creating a beneficiary or mandate mandatory before initiating\
    \ transactions?\nCreating a beneficiary for transfers or a mandate for collections\
    \ is not mandatory. When initiating a new  transfer or collection, you will provide\
    \ the counterpart data directly in the initiating endpoint,  We will auto-create\
    \ it, and you will be able to see it in the interface. For subsequent transfers/collections,\
    \  you will continue to provide the counterpart data, and we will match it with\
    \ any existing beneficiary/mandate  in the interface.\n### How can I reconcile\
    \ a return with its original transfer or collection?\nThe events `transfer_returned`\
    \ and `collection_returned` received via webhook will inform you if a  return\
    \ occurred on either a transfer or a collection. The `resource_id` in those events\
    \ refers to the ID  of the original transfer/collection. The `return_transaction_id`\
    \ field on those resources will reference  the return transaction, which is a\
    \ new transaction typically with the same amount and opposite direction  compared\
    \ to the original transaction. This new transaction will itself trigger a `transaction_confirmed`\
    \  webhook event. For such transactions, if you call [get the transaction](https://docs.api.memo.bank/operation/operation-gettransaction)\
    \ and check the [source type](https://docs.api.memo.bank/operation/operation-gettransaction#operation-gettransaction-200-body-application-json-source-type),\
    \  it will either be `transfer_outgoing_return` or `collection_outgoing_return`.\
    \  The `returned_collection_id`/`returned_transfer_id` field will contain the\
    \ ID of your original  collection/transfer that has been returned.\n### How can\
    \ I differentiate transaction types?\nTo differentiate transaction types, you\
    \ can use the [type](https://docs.api.memo.bank/operation/operation-gettransaction#operation-gettransaction-200-body-application-json-source-type)\
    \ contained in the [source](https://docs.api.memo.bank/operation/operation-gettransaction#operation-gettransaction-200-body-application-json-source)\
    \ object.\n### What happens if my system is unavailable when Memo Bank sends webhooks?\n\
    We will retry each webhook event independently 8 times following an exponential\
    \ backoff. The intervals between retries are: 3 min, 10 min, 30 min, 1 hour, 6\
    \ hours, 12 hours, 1 day, and 3 days. After that, we will stop retrying, but \
    \ you will be able to manually trigger a retry through our interface.\n### When\
    \ using the `instant_if_available` strategy, will Memo Bank retry a failed instant\
    \ transfer as a standard transfer?\nNo, we will not retry failed instant transfers\
    \ as standard transfers. However, we recommend that you do so. If an  instant\
    \ transfer fails, retrying it or using a standard transfer is often the best course\
    \ of action.  `instant_if_available` will only ensure that we process your transfer\
    \ as standard if the counterparty bank does not support instant transfers.\n###\
    \ What is the difference between failed and cancelled transaction statuses?\n\
    Your transaction will end up in a cancelled status when you choose to cancel it\
    \ either through  our API or our interface. In some cases, your transaction may\
    \ also end up in a cancelled status due  to internal processing reasons, but most\
    \ of the time, for processing reasons, your transaction will end up  in a failed\
    \ status. Both statuses are definitive, and if you did not initiate the cancellation,\
    \ you can consider them equivalent in your development.\n### Are webhooks triggered\
    \ for transactions not initiated with the API?\nYes, they are. Webhooks are triggered\
    \ regardless of the channel you use to initiate your transaction.\n### Can I retrieve\
    \ the URL of the mandate request signature flow? \nNo, it is not possible at the\
    \ moment. Currently, we only support sending the URL to your clients by email.\n\
    ### Is it possible to initiate a payment via API and have it validated by a human\
    \ on the interface?\nNo, it is not possible. Our API is designed for automated,\
    \ human-free transactions at scale.\n### How can I stay informed about the latest\
    \ API updates?\nWe provide an RSS feed that you can subscribe to. It is available\
    \ at this [URL](https://docs.api.memo.bank/changes) when you click the `Get Updates`\
    \ button at the top of the page.\n"
- title: Sandbox
  content: |
    We offer a sandbox, allowing you to integrate your application with our API in a controlled environment. Get in touch with your banker to create an access.

    All the endpoints described in this specification can be used on the sandbox. We also offer some [sandbox only endpoints](#endpoint-sandbox), allowing you to simulate incoming transactions.

    The base URL for the sandbox API is https://api.sandbox.memo.bank and the URL for the sandbox web interface is https://client.sandbox.memo.bank.

    To get to know more about our sandbox behavior and features, please read [our dedicated help page](https://aide.memo.bank/article/398-api-sandbox).
webhooks:
  event:
    post:
      tags:
      - Webhook
      summary: Handle an event
      operationId: handleEvent
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Event"
          application/vnd.memo-bank.v1+json:
            schema:
              $ref: "#/components/schemas/Event"
        required: true
      responses:
        "204":
          description: No content
