openapi: 3.0.1
info:
  description: The Payment Domain API - Payment Accounts
  title: Payment Domain API - Payment Accounts
  version: 1.16.0
servers:
- description: Generated server url
  url: https://api.cve.btx.eu.banqup.com/payments/paymentaccounts
tags:
- description: Mandates API
  name: Mandates
- description: Payment Account Permissions API
  name: Payment Account Permissions
- description: Payment Account Notifications API
  name: Payment Account Notifications (Internal)
- description: Payment Accounts API
  name: Payment Accounts
paths:
  /v1/spaces/{spaceId}/paymentAccounts:
    get:
      description: 'Retrieve the list of payment accounts <br/> Scope: space_read'
      operationId: listPaymentAccounts
      parameters:
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      - in: query
        name: status
        required: false
        schema:
          type: string
          default: ACTIVE
          enum:
          - ACTIVE
          - CLOSED
          - PENDING
          - BLOCKED
          - FROZEN
          - ALL
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentAccountsResponse'
          description: Payment Accounts
        '400':
          content:
            application/json:
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: BAD REQUEST
        '401':
          content:
            application/json:
              example:
                status: 401
                error: UNAUTHENTICATED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Unauthorized
                detail: Access to the requested resource lacks valid authentication
                  credentials.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: UNAUTHORIZED
        '403':
          content:
            application/json:
              example:
                status: 403
                error: PERMISSION_DENIED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Forbidden
                detail: Access to the requested resource was denied.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: FORBIDDEN
        '503':
          content:
            application/json:
              example:
                status: 503
                error: UNAVAILABLE
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Service Unavailable
                detail: Service is unavailable. Please try again later.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: SERVICE UNAVAILABLE
      security:
      - oauth2:
        - space_read
      summary: List payment accounts
      tags:
      - Payment Accounts
    post:
      description: 'Register a new payment account <br/> Scope: space_read, space_write,
        space_payments_manage_payment_accounts'
      operationId: registerPaymentAccount
      parameters:
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentAccountSaveRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentAccount'
          description: Payment Account
        '400':
          content:
            application/json:
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: BAD REQUEST
        '401':
          content:
            application/json:
              example:
                status: 401
                error: UNAUTHENTICATED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Unauthorized
                detail: Access to the requested resource lacks valid authentication
                  credentials.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: UNAUTHORIZED
        '403':
          content:
            application/json:
              example:
                status: 403
                error: PERMISSION_DENIED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Forbidden
                detail: Access to the requested resource was denied.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: FORBIDDEN
        '503':
          content:
            application/json:
              example:
                status: 503
                error: UNAVAILABLE
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Service Unavailable
                detail: Service is unavailable. Please try again later.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: SERVICE UNAVAILABLE
      security:
      - oauth2:
        - space_read
        - space_write
        - space_payments_manage_payment_accounts
      summary: Register a payment account
      tags:
      - Payment Accounts
  /v1/spaces/{spaceId}/paymentAccounts/{paymentAccountId}:
    delete:
      description: "Remove a registered payment account from the space's entity <br/>
        Scope: space_read, space_payments_manage_payment_accounts, account_write"
      operationId: deletePaymentAccount
      parameters:
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      - in: path
        name: paymentAccountId
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '204':
          description: No Content
        '400':
          content:
            application/json:
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: BAD REQUEST
        '401':
          content:
            application/json:
              example:
                status: 401
                error: UNAUTHENTICATED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Unauthorized
                detail: Access to the requested resource lacks valid authentication
                  credentials.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: UNAUTHORIZED
        '403':
          content:
            application/json:
              example:
                status: 403
                error: PERMISSION_DENIED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Forbidden
                detail: Access to the requested resource was denied.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: FORBIDDEN
        '404':
          content:
            application/json:
              example:
                status: 404
                error: NOT FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: Requested resource was not found.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: NOT FOUND
        '503':
          content:
            application/json:
              example:
                status: 503
                error: UNAVAILABLE
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Service Unavailable
                detail: Service is unavailable. Please try again later.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: SERVICE UNAVAILABLE
      security:
      - oauth2:
        - space_read
        - space_payments_manage_payment_accounts
        - account_write
      summary: Delete payment account
      tags:
      - Payment Accounts
    get:
      description: 'Retrieve all available details for the selected payment account
        <br/> Scope: space_read, account_read'
      operationId: getPaymentAccountDetails
      parameters:
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      - in: path
        name: paymentAccountId
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentAccount'
          description: Payment Account Details
        '400':
          content:
            application/json:
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: BAD REQUEST
        '401':
          content:
            application/json:
              example:
                status: 401
                error: UNAUTHENTICATED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Unauthorized
                detail: Access to the requested resource lacks valid authentication
                  credentials.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: UNAUTHORIZED
        '403':
          content:
            application/json:
              example:
                status: 403
                error: PERMISSION_DENIED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Forbidden
                detail: Access to the requested resource was denied.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: FORBIDDEN
        '404':
          content:
            application/json:
              example:
                status: 404
                error: NOT FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: Requested resource was not found.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: NOT FOUND
        '503':
          content:
            application/json:
              example:
                status: 503
                error: UNAVAILABLE
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Service Unavailable
                detail: Service is unavailable. Please try again later.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: SERVICE UNAVAILABLE
      security:
      - oauth2:
        - space_read
        - account_read
      summary: Payment account details
      tags:
      - Payment Accounts
    patch:
      description: 'Update details of a registered payment account <br/> Scope: space_read,
        space_payments_manage_payment_accounts, account_write'
      operationId: updatePaymentAccount
      parameters:
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      - in: path
        name: paymentAccountId
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentAccountUpdate'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentAccountUpdate'
          description: Updated Payment Account Details
        '400':
          content:
            application/json:
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: BAD REQUEST
        '401':
          content:
            application/json:
              example:
                status: 401
                error: UNAUTHENTICATED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Unauthorized
                detail: Access to the requested resource lacks valid authentication
                  credentials.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: UNAUTHORIZED
        '403':
          content:
            application/json:
              example:
                status: 403
                error: PERMISSION_DENIED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Forbidden
                detail: Access to the requested resource was denied.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: FORBIDDEN
        '404':
          content:
            application/json:
              example:
                status: 404
                error: NOT FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: Requested resource was not found.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: NOT FOUND
        '503':
          content:
            application/json:
              example:
                status: 503
                error: UNAVAILABLE
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Service Unavailable
                detail: Service is unavailable. Please try again later.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: SERVICE UNAVAILABLE
      security:
      - oauth2:
        - space_read
        - space_payments_manage_payment_accounts
        - account_write
      summary: Update payment account
      tags:
      - Payment Accounts
  /v1/spaces/{spaceId}/paymentAccounts/{paymentAccountId}/liveBalances:
    get:
      description: 'Retrieve the available balances for the given account <br/> Scope:
        space_read, account_read, payment_account_balances_read'
      operationId: getLiveBalances
      parameters:
      - description: The IP address of the user who initiated the request
        example: 192.158.1.38
        in: header
        name: User-IP-Address
        schema:
          type: string
      - description: The IP port of the user’s IP address
        example: 49152
        in: header
        name: User-IP-Port
        schema:
          type: string
      - description: HTTP method used in the request
        example: GET
        in: header
        name: User-Http-Method
        schema:
          type: string
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      - in: path
        name: paymentAccountId
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentAccountBalanceResponse'
          description: Available balances retrieved from the payment account provider
        '400':
          content:
            application/json:
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: BAD REQUEST
        '401':
          content:
            application/json:
              example:
                status: 401
                error: UNAUTHENTICATED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Unauthorized
                detail: Access to the requested resource lacks valid authentication
                  credentials.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: UNAUTHORIZED
        '403':
          content:
            application/json:
              example:
                status: 403
                error: PERMISSION_DENIED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Forbidden
                detail: Access to the requested resource was denied.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: FORBIDDEN
        '404':
          content:
            application/json:
              example:
                status: 404
                error: NOT FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: Requested resource was not found.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: NOT FOUND
        '503':
          content:
            application/json:
              example:
                status: 503
                error: UNAVAILABLE
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Service Unavailable
                detail: Service is unavailable. Please try again later.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: SERVICE UNAVAILABLE
      security:
      - oauth2:
        - space_read
        - account_read
        - payment_account_balances_read
      summary: List account live balances
      tags:
      - Payment Accounts
  /v1/spaces/{spaceId}/paymentAccounts/{paymentAccountId}/mandates:
    get:
      description: 'Retrieve the list of payment account mandates <br/> Scope: space_read,
        account_read'
      operationId: getMandates
      parameters:
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      - in: path
        name: paymentAccountId
        required: true
        schema:
          type: string
          format: uuid
      - in: query
        name: status
        required: false
        schema:
          type: string
          enum:
          - ACTIVE
          - INACTIVE
      - description: Page index
        example: 1
        in: query
        name: page
        required: false
        schema:
          type: integer
          format: int64
          default: 0
          description: Page index
          example: 1
          minimum: 0
      - description: Number of objects in a page
        example: 20
        in: query
        name: size
        required: false
        schema:
          type: integer
          format: int32
          default: 30
          description: Number of objects in a page
          example: 20
          maximum: 100
          minimum: 1
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MandatesResponse'
          description: Payment Account Mandates
        '400':
          content:
            application/json:
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: BAD REQUEST
        '401':
          content:
            application/json:
              example:
                status: 401
                error: UNAUTHENTICATED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Unauthorized
                detail: Access to the requested resource lacks valid authentication
                  credentials.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: UNAUTHORIZED
        '403':
          content:
            application/json:
              example:
                status: 403
                error: PERMISSION_DENIED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Forbidden
                detail: Access to the requested resource was denied.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: FORBIDDEN
        '404':
          content:
            application/json:
              example:
                status: 404
                error: NOT FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: Requested resource was not found.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: NOT FOUND
        '503':
          content:
            application/json:
              example:
                status: 503
                error: UNAVAILABLE
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Service Unavailable
                detail: Service is unavailable. Please try again later.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: SERVICE UNAVAILABLE
      security:
      - oauth2:
        - space_read
        - account_read
      summary: List payment account mandates
      tags:
      - Mandates
  /v1/spaces/{spaceId}/paymentAccounts/{paymentAccountId}/mandates/{mandateId}:
    get:
      description: 'Retrieve all available details for the selected payment account
        mandate <br/> Scope: space_read, account_read'
      operationId: getMandateDetails
      parameters:
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      - in: path
        name: paymentAccountId
        required: true
        schema:
          type: string
          format: uuid
      - in: path
        name: mandateId
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Mandate'
          description: Mandate details
        '400':
          content:
            application/json:
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: BAD REQUEST
        '401':
          content:
            application/json:
              example:
                status: 401
                error: UNAUTHENTICATED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Unauthorized
                detail: Access to the requested resource lacks valid authentication
                  credentials.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: UNAUTHORIZED
        '403':
          content:
            application/json:
              example:
                status: 403
                error: PERMISSION_DENIED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Forbidden
                detail: Access to the requested resource was denied.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: FORBIDDEN
        '404':
          content:
            application/json:
              example:
                status: 404
                error: NOT FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: Requested resource was not found.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: NOT FOUND
        '503':
          content:
            application/json:
              example:
                status: 503
                error: UNAVAILABLE
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Service Unavailable
                detail: Service is unavailable. Please try again later.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: SERVICE UNAVAILABLE
      security:
      - oauth2:
        - space_read
        - account_read
      summary: Payment account mandate details
      tags:
      - Mandates
  /v1/spaces/{spaceId}/paymentAccounts/{paymentAccountId}/mandates/{mandateId}:refuse:
    post:
      description: 'Refuse the selected payment account mandate <br/> Scope: space_read,
        account_read, account_write'
      operationId: refuseMandate
      parameters:
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      - in: path
        name: paymentAccountId
        required: true
        schema:
          type: string
          format: uuid
      - in: path
        name: mandateId
        required: true
        schema:
          type: string
      responses:
        '204':
          description: No Content
        '400':
          content:
            application/json:
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: BAD REQUEST
        '401':
          content:
            application/json:
              example:
                status: 401
                error: UNAUTHENTICATED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Unauthorized
                detail: Access to the requested resource lacks valid authentication
                  credentials.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: UNAUTHORIZED
        '403':
          content:
            application/json:
              example:
                status: 403
                error: PERMISSION_DENIED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Forbidden
                detail: Access to the requested resource was denied.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: FORBIDDEN
        '404':
          content:
            application/json:
              example:
                status: 404
                error: NOT FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: Requested resource was not found.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: NOT FOUND
        '503':
          content:
            application/json:
              example:
                status: 503
                error: UNAVAILABLE
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Service Unavailable
                detail: Service is unavailable. Please try again later.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: SERVICE UNAVAILABLE
      security:
      - oauth2:
        - space_read
        - account_read
        - account_write
      summary: Refuse mandate
      tags:
      - Mandates
  /v1/spaces/{spaceId}/paymentAccounts/{paymentAccountId}/movements:
    get:
      description: 'Retrieve the list of payment account movements <br/> Scope: space_read,
        account_read, payment_account_movements_read'
      operationId: getMovements
      parameters:
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      - in: path
        name: paymentAccountId
        required: true
        schema:
          type: string
          format: uuid
      - in: query
        name: bookingType
        required: false
        schema:
          type: string
          enum:
          - BOOKED
          - PLANNED
          - RESERVED
      - description: Start date
        example: 2024-01-15
        in: query
        name: dateFrom
        required: false
        schema:
          type: string
          format: date
          description: Start date
          example: 2024-01-15
      - description: End date
        example: 2024-02-15
        in: query
        name: dateTo
        required: false
        schema:
          type: string
          format: date
          description: End date
          example: 2024-02-15
      - description: Page index
        example: 1
        in: query
        name: page
        required: false
        schema:
          type: integer
          format: int64
          default: 0
          description: Page index
          example: 1
          minimum: 0
      - description: Number of objects in a page
        example: 20
        in: query
        name: size
        required: false
        schema:
          type: integer
          format: int32
          default: 30
          description: Number of objects in a page
          example: 20
          maximum: 100
          minimum: 1
      - description: Counterparty account identifier
        example: BE07504010018166
        in: query
        name: counterpartyAccountIdentifier
        required: false
        schema:
          type: string
          description: Counterparty account identifier
          example: BE07504010018166
      - description: Counterparty name
        example: John
        in: query
        name: counterpartyName
        required: false
        schema:
          type: string
          description: Counterparty name
          example: John
      - description: Mandate reference
        example: M10024780090
        in: query
        name: mandateReference
        required: false
        schema:
          type: string
          description: Mandate reference
          example: M10024780090
      - description: |-
          Specifies how the results are sorted.
          For PLANNED/RESERVED movements, default is "plannedDateStart.asc".
          For BOOKED movements, default is "bookingDate.desc".
        in: query
        name: sortBy
        required: false
        schema:
          type: string
          description: |-
            Specifies how the results are sorted.
            For PLANNED/RESERVED movements, default is "plannedDateStart.asc".
            For BOOKED movements, default is "bookingDate.desc".
          enum:
          - sequence.asc
          - sequence.desc
          - plannedDateStart.asc
          - plannedDateStart.desc
          - bookingDate.asc
          - bookingDate.desc
      - description: "Specifies whether the result should be filtered based on movement
          stability. \nA movement is considered stabilized when it can no longer change.\n
          For PLANNED/RESERVED movements, default is stable = false and will only
          include planned/reserved movements which have not yet been booked or cancelled.
          Use stable = true to see movements that *were* planned/reserved but have
          since found a different conclusion.\nFor BOOKED, by default we will return
          all booked movements. However, for linked bank accounts some of these movements
          (last day) might still suffer some changes at bank level related to bank
          turnover. If you wish to only get finalized movements, use stable = true."
        in: query
        name: stable
        required: false
        schema:
          type: boolean
          description: "Specifies whether the result should be filtered based on movement
            stability. \nA movement is considered stabilized when it can no longer
            change.\nFor PLANNED/RESERVED movements, default is stable = false and
            will only include planned/reserved movements which have not yet been booked
            or cancelled. Use stable = true to see movements that *were* planned/reserved
            but have since found a different conclusion.\nFor BOOKED, by default we
            will return all booked movements. However, for linked bank accounts some
            of these movements (last day) might still suffer some changes at bank
            level related to bank turnover. If you wish to only get finalized movements,
            use stable = true."
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MovementsResponse'
          description: Payment Account Movements
        '400':
          content:
            application/json:
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: BAD REQUEST
        '401':
          content:
            application/json:
              example:
                status: 401
                error: UNAUTHENTICATED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Unauthorized
                detail: Access to the requested resource lacks valid authentication
                  credentials.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: UNAUTHORIZED
        '403':
          content:
            application/json:
              example:
                status: 403
                error: PERMISSION_DENIED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Forbidden
                detail: Access to the requested resource was denied.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: FORBIDDEN
        '404':
          content:
            application/json:
              example:
                status: 404
                error: NOT FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: Requested resource was not found.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: NOT FOUND
        '503':
          content:
            application/json:
              example:
                status: 503
                error: UNAVAILABLE
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Service Unavailable
                detail: Service is unavailable. Please try again later.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: SERVICE UNAVAILABLE
      security:
      - oauth2:
        - space_read
        - account_read
        - payment_account_movements_read
      summary: List payment account movements
      tags:
      - Payment Accounts
  /v1/spaces/{spaceId}/paymentAccounts/{paymentAccountId}/movements/{movementId}:paymentCancellation:
    get:
      description: 'Retrieve the payment cancellation details for given the movement
        <br/> Scope: space_read, account_read'
      operationId: getPaymentCancellationDetails
      parameters:
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      - in: path
        name: paymentAccountId
        required: true
        schema:
          type: string
          format: uuid
      - in: path
        name: movementId
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Payment'
          description: The payment details
        '400':
          content:
            application/json:
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: BAD REQUEST
        '401':
          content:
            application/json:
              example:
                status: 401
                error: UNAUTHENTICATED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Unauthorized
                detail: Access to the requested resource lacks valid authentication
                  credentials.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: UNAUTHORIZED
        '403':
          content:
            application/json:
              example:
                status: 403
                error: PERMISSION_DENIED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Forbidden
                detail: Access to the requested resource was denied.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: FORBIDDEN
        '404':
          content:
            application/json:
              example:
                status: 404
                error: NOT FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: Requested resource was not found.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: NOT FOUND
        '503':
          content:
            application/json:
              example:
                status: 503
                error: UNAVAILABLE
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Service Unavailable
                detail: Service is unavailable. Please try again later.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: SERVICE UNAVAILABLE
      security:
      - oauth2:
        - space_read
        - account_read
      summary: Get the payment cancellation details
      tags:
      - Payment Accounts
  /v1/spaces/{spaceId}/paymentAccounts/{paymentAccountId}/movements/{movementId}:refuse:
    post:
      description: 'Refuse movement with the associated movement collection id <br/>
        Scope: space_read, account_read, account_write'
      operationId: refuseMovement
      parameters:
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      - in: path
        name: paymentAccountId
        required: true
        schema:
          type: string
          format: uuid
      - in: path
        name: movementId
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '204':
          description: Refusal submitted
        '400':
          content:
            application/json:
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: BAD REQUEST
        '401':
          content:
            application/json:
              example:
                status: 401
                error: UNAUTHENTICATED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Unauthorized
                detail: Access to the requested resource lacks valid authentication
                  credentials.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: UNAUTHORIZED
        '403':
          content:
            application/json:
              example:
                status: 403
                error: PERMISSION_DENIED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Forbidden
                detail: Access to the requested resource was denied.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: FORBIDDEN
        '404':
          content:
            application/json:
              example:
                status: 404
                error: NOT FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: Requested resource was not found.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: NOT FOUND
        '503':
          content:
            application/json:
              example:
                status: 503
                error: UNAVAILABLE
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Service Unavailable
                detail: Service is unavailable. Please try again later.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: SERVICE UNAVAILABLE
      security:
      - oauth2:
        - space_read
        - account_read
        - account_write
      summary: Refuse a payment account movement
      tags:
      - Payment Accounts
  /v1/spaces/{spaceId}/paymentAccounts/{paymentAccountId}/movements/{movementId}:requestRefund:
    post:
      description: 'Request a refund for the given movement id <br/> Scope: space_read,
        account_read, account_write'
      operationId: requestMovementRefund
      parameters:
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      - in: path
        name: paymentAccountId
        required: true
        schema:
          type: string
          format: uuid
      - in: path
        name: movementId
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '204':
          description: Refund request submitted
        '400':
          content:
            application/json:
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: BAD REQUEST
        '401':
          content:
            application/json:
              example:
                status: 401
                error: UNAUTHENTICATED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Unauthorized
                detail: Access to the requested resource lacks valid authentication
                  credentials.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: UNAUTHORIZED
        '403':
          content:
            application/json:
              example:
                status: 403
                error: PERMISSION_DENIED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Forbidden
                detail: Access to the requested resource was denied.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: FORBIDDEN
        '404':
          content:
            application/json:
              example:
                status: 404
                error: NOT FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: Requested resource was not found.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: NOT FOUND
        '503':
          content:
            application/json:
              example:
                status: 503
                error: UNAVAILABLE
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Service Unavailable
                detail: Service is unavailable. Please try again later.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: SERVICE UNAVAILABLE
      security:
      - oauth2:
        - space_read
        - account_read
        - account_write
      summary: Refund payment account movement
      tags:
      - Payment Accounts
  /v1/spaces/{spaceId}/paymentAccounts/{paymentAccountId}/permissions:
    get:
      description: 'List permissions for a payment account for a user identified by
        its subject <br/> Scope: space_read, account_read'
      operationId: getPaymentAccountPermissions
      parameters:
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      - in: path
        name: paymentAccountId
        required: true
        schema:
          type: string
          format: uuid
      - in: query
        name: subject
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentAccountPermissionsResponse'
          description: Permissions list
        '400':
          content:
            application/json:
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: BAD REQUEST
        '503':
          content:
            application/json:
              example:
                status: 503
                error: UNAVAILABLE
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Service Unavailable
                detail: Service is unavailable. Please try again later.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: SERVICE UNAVAILABLE
      security:
      - oauth2:
        - space_read
        - account_read
      summary: List permissions for a payment account
      tags:
      - Payment Account Permissions
  /v1/spaces/{spaceId}/paymentAccounts/{paymentAccountId}/provisioningCounters:
    get:
      description: 'Count how many cards have been issued and how many cards are left
        to be issued <br/> Scope: space_read, account_read'
      operationId: getCardsProvisioningCounters
      parameters:
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      - in: path
        name: paymentAccountId
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CardProvisioningCounterResponse'
          description: Cards provisioning counters
        '400':
          content:
            application/json:
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: BAD REQUEST
        '401':
          content:
            application/json:
              example:
                status: 401
                error: UNAUTHENTICATED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Unauthorized
                detail: Access to the requested resource lacks valid authentication
                  credentials.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: UNAUTHORIZED
        '403':
          content:
            application/json:
              example:
                status: 403
                error: PERMISSION_DENIED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Forbidden
                detail: Access to the requested resource was denied.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: FORBIDDEN
        '503':
          content:
            application/json:
              example:
                status: 503
                error: UNAVAILABLE
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Service Unavailable
                detail: Service is unavailable. Please try again later.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: SERVICE UNAVAILABLE
      security:
      - oauth2:
        - space_read
        - account_read
      summary: Get cards provisioning counters
      tags:
      - Payment Accounts
  /v1/spaces/{spaceId}/paymentAccounts/{paymentAccountId}/statements:
    get:
      description: 'Retrieve the list of payment account statements <br/> Scope: space_read,
        account_read, payment_account_movements_read'
      operationId: getStatements
      parameters:
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      - in: path
        name: paymentAccountId
        required: true
        schema:
          type: string
          format: uuid
      - description: Start date
        example: 2024-01-15
        in: query
        name: dateFrom
        required: false
        schema:
          type: string
          format: date
          description: Start date
          example: 2024-01-15
      - description: End date
        example: 2024-02-15
        in: query
        name: dateTo
        required: false
        schema:
          type: string
          format: date
          description: End date
          example: 2024-02-15
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatementsResponse'
          description: Payment Account Statements
        '400':
          content:
            application/json:
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: BAD REQUEST
        '401':
          content:
            application/json:
              example:
                status: 401
                error: UNAUTHENTICATED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Unauthorized
                detail: Access to the requested resource lacks valid authentication
                  credentials.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: UNAUTHORIZED
        '403':
          content:
            application/json:
              example:
                status: 403
                error: PERMISSION_DENIED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Forbidden
                detail: Access to the requested resource was denied.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: FORBIDDEN
        '404':
          content:
            application/json:
              example:
                status: 404
                error: NOT FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: Requested resource was not found.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: NOT FOUND
        '503':
          content:
            application/json:
              example:
                status: 503
                error: UNAVAILABLE
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Service Unavailable
                detail: Service is unavailable. Please try again later.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: SERVICE UNAVAILABLE
      security:
      - oauth2:
        - space_read
        - account_read
        - payment_account_movements_read
      summary: List payment account statements
      tags:
      - Payment Accounts
  /v1/spaces/{spaceId}/paymentAccounts/{paymentAccountId}/statements/{statementId}:
    get:
      description: 'Retrieve the payment account statement file <br/> Scope: space_read,
        account_read, payment_account_movements_read'
      operationId: downloadStatement
      parameters:
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      - in: path
        name: paymentAccountId
        required: true
        schema:
          type: string
          format: uuid
      - in: path
        name: statementId
        required: true
        schema:
          type: string
      - in: query
        name: statementFormat
        required: false
        schema:
          type: string
          enum:
          - CAMT053
          - CODA
          - NORMA
          - CFONB
          - PDF
      responses:
        '200':
          content:
            application/json:
              schema:
                type: string
                format: byte
          description: Statement file
        '400':
          content:
            application/json:
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: BAD REQUEST
        '401':
          content:
            application/json:
              example:
                status: 401
                error: UNAUTHENTICATED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Unauthorized
                detail: Access to the requested resource lacks valid authentication
                  credentials.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: UNAUTHORIZED
        '403':
          content:
            application/json:
              example:
                status: 403
                error: PERMISSION_DENIED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Forbidden
                detail: Access to the requested resource was denied.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: FORBIDDEN
        '404':
          content:
            application/json:
              example:
                status: 404
                error: NOT FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: Requested resource was not found.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: NOT FOUND
        '503':
          content:
            application/json:
              example:
                status: 503
                error: UNAVAILABLE
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Service Unavailable
                detail: Service is unavailable. Please try again later.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: SERVICE UNAVAILABLE
      security:
      - oauth2:
        - space_read
        - account_read
        - payment_account_movements_read
      summary: Download payment account statement
      tags:
      - Payment Accounts
  /v1/spaces/{spaceId}/paymentAccounts/{paymentAccountId}/supportedCardTypes:
    get:
      description: 'Get the list of supported countries and card types for a specific
        customer segment. <br/> Scope: space_read, account_read'
      operationId: listSupportedCardTypes
      parameters:
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      - in: path
        name: paymentAccountId
        required: true
        schema:
          type: string
          format: uuid
      - in: query
        name: countryCode
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupportedCardsByCountry'
          description: List of supported countries
        '400':
          content:
            application/json:
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: BAD REQUEST
        '401':
          content:
            application/json:
              example:
                status: 401
                error: UNAUTHENTICATED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Unauthorized
                detail: Access to the requested resource lacks valid authentication
                  credentials.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: UNAUTHORIZED
        '403':
          content:
            application/json:
              example:
                status: 403
                error: PERMISSION_DENIED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Forbidden
                detail: Access to the requested resource was denied.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: FORBIDDEN
        '503':
          content:
            application/json:
              example:
                status: 503
                error: UNAVAILABLE
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Service Unavailable
                detail: Service is unavailable. Please try again later.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: SERVICE UNAVAILABLE
      security:
      - oauth2:
        - space_read
        - account_read
      summary: Get List types, settings of Card
      tags:
      - Payment Accounts
  /v1/spaces/{spaceId}/paymentAccounts/{paymentAccountId}:authorize:
    post:
      description: 'Initiate the procedure to grant a PSD2 AIS consent for the specified
        payment account <br/> Scope: space_read, account_write'
      operationId: grantConsent
      parameters:
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      - in: path
        name: paymentAccountId
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentAccountGrantConsentRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RedirectUrlResponse'
          description: Consent init url redirect
        '400':
          content:
            application/json:
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: BAD REQUEST
        '401':
          content:
            application/json:
              example:
                status: 401
                error: UNAUTHENTICATED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Unauthorized
                detail: Access to the requested resource lacks valid authentication
                  credentials.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: UNAUTHORIZED
        '403':
          content:
            application/json:
              example:
                status: 403
                error: PERMISSION_DENIED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Forbidden
                detail: Access to the requested resource was denied.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: FORBIDDEN
        '404':
          content:
            application/json:
              example:
                status: 404
                error: NOT FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: Requested resource was not found.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: NOT FOUND
        '503':
          content:
            application/json:
              example:
                status: 503
                error: UNAVAILABLE
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Service Unavailable
                detail: Service is unavailable. Please try again later.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: SERVICE UNAVAILABLE
      security:
      - oauth2:
        - space_read
        - account_write
      summary: Grant consent
      tags:
      - Payment Accounts
  /v1/spaces/{spaceId}/paymentAccounts/{paymentAccountId}:refreshMovements:
    post:
      description: 'Trigger a movements download operation for the selected account,
        regardless of the time of day (ignores normal scheduling) <br/> Scope: space_read,
        account_read, payment_account_movements_read'
      operationId: refreshMovements
      parameters:
      - description: The IP address of the user who initiated the request
        example: 192.158.1.38
        in: header
        name: User-IP-Address
        schema:
          type: string
      - description: The IP port of the user’s IP address
        example: 49152
        in: header
        name: User-IP-Port
        schema:
          type: string
      - description: HTTP method used in the request
        example: GET
        in: header
        name: User-Http-Method
        schema:
          type: string
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      - in: path
        name: paymentAccountId
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CallbackOperationRequest'
        required: true
      responses:
        '200':
          description: Refresh Account Movements
        '204':
          description: No Content
        '400':
          content:
            application/json:
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: BAD REQUEST
        '401':
          content:
            application/json:
              example:
                status: 401
                error: UNAUTHENTICATED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Unauthorized
                detail: Access to the requested resource lacks valid authentication
                  credentials.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: UNAUTHORIZED
        '403':
          content:
            application/json:
              example:
                status: 403
                error: PERMISSION_DENIED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Forbidden
                detail: Access to the requested resource was denied.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: FORBIDDEN
        '404':
          content:
            application/json:
              example:
                status: 404
                error: NOT FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: Requested resource was not found.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: NOT FOUND
        '503':
          content:
            application/json:
              example:
                status: 503
                error: UNAVAILABLE
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Service Unavailable
                detail: Service is unavailable. Please try again later.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: SERVICE UNAVAILABLE
      security:
      - oauth2:
        - space_read
        - account_read
        - payment_account_movements_read
      summary: Trigger movements refresh
      tags:
      - Payment Accounts
  /v1/spaces/{spaceId}/paymentAccounts/{paymentAccountId}:revokeConsent:
    post:
      description: 'Initiate the procedure to revoke a PSD2 AIS consent for the specified
        payment account <br/> Scope: space_read, account_write'
      operationId: revokeConsent
      parameters:
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      - in: path
        name: paymentAccountId
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '204':
          description: Consent revoked
        '400':
          content:
            application/json:
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: BAD REQUEST
        '401':
          content:
            application/json:
              example:
                status: 401
                error: UNAUTHENTICATED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Unauthorized
                detail: Access to the requested resource lacks valid authentication
                  credentials.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: UNAUTHORIZED
        '403':
          content:
            application/json:
              example:
                status: 403
                error: PERMISSION_DENIED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Forbidden
                detail: Access to the requested resource was denied.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: FORBIDDEN
        '404':
          content:
            application/json:
              example:
                status: 404
                error: NOT FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: Requested resource was not found.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: NOT FOUND
        '503':
          content:
            application/json:
              example:
                status: 503
                error: UNAVAILABLE
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Service Unavailable
                detail: Service is unavailable. Please try again later.
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: SERVICE UNAVAILABLE
      security:
      - oauth2:
        - space_read
        - account_write
      summary: Revoke AIS consent
      tags:
      - Payment Accounts
components:
  schemas:
    AccountIdentifier:
      type: object
      description: Payment account details of the counterparty
      properties:
        bank:
          $ref: '#/components/schemas/BankIdentifier'
        country:
          type: string
          example: BE
          pattern: ^[a-zA-Z]{2}
        currency:
          type: string
          description: International code ISO 4217 of the currency used
          example: EUR
          pattern: '[A-Z]{3}'
        identifier:
          type: string
          description: Account Identifier
          example: BE83504010119715
          minLength: 1
        scheme:
          type: string
          description: Account Scheme
          enum:
          - IBAN
          - BBAN
          - ANB
          - SE_BANKGIRO
          - SE_PLUSGIRO
          - CREDIT_CARD
          example: IBAN
      required:
      - currency
      - identifier
      - scheme
    Address:
      type: object
      description: Address details of the counterparty
      properties:
        structured:
          $ref: '#/components/schemas/StructuredAddress'
        unstructured:
          $ref: '#/components/schemas/UnstructuredAddress'
    AisConsent:
      type: object
      description: Details pertaining to the AIS consent granted for the account,
        null if no consent was granted
      properties:
        expirationDate:
          type: string
          format: date
          description: The consent expiration date
          example: 2023-09-30
        status:
          type: string
          description: The consent status
          enum:
          - REQUESTED
          - FAILED
          - ACTIVE
          - REVOKED
          - EXPIRED
          example: ACTIVE
      required:
      - status
    AmountDto:
      type: object
      description: The balance amount
      properties:
        currency:
          type: string
          description: International code of the currency used
          example: EUR
          pattern: '[A-Z]{3}'
        value:
          type: string
          description: Amount value with a maximum of 14 integer digits and 2 fractional
            digits
          example: '10.05'
      required:
      - currency
      - value
    ApiErrorProblemDetail:
      type: object
      properties:
        detail:
          type: string
        error:
          type: string
        instance:
          type: string
          format: uri
        problems:
          type: array
          items:
            $ref: '#/components/schemas/NestedProblem'
        properties:
          type: object
          additionalProperties:
            type: object
        requestId:
          type: string
        status:
          type: integer
          format: int32
        timestamp:
          type: string
          format: date-time
        title:
          type: string
        type:
          type: string
          format: uri
      required:
      - error
      - requestId
      - timestamp
    BankIdentifier:
      type: object
      description: Information about the issuer of the account
      properties:
        identifier:
          type: string
          description: Bank Identifier
          example: PANXBEB1XXX
          minLength: 1
        scheme:
          type: string
          description: Bank Identifier Scheme
          enum:
          - BIC
          - CODE
          example: BIC
      required:
      - identifier
      - scheme
    CallbackOperationRequest:
      type: object
      properties:
        callbackUrl:
          type: string
          description: Url where the client can be notified that the operation has
            completed
          example: https://app.client.com/operation/742984792/complete
          minLength: 1
      required:
      - callbackUrl
    CardOperationDetails:
      type: object
      description: Additional details about the transaction, specific for those initiated
        with a card
      properties:
        cardMaskedPan:
          type: string
          description: PAN(masked) of the card used when initiating the transaction
          example: '**********1234'
        cardSchemeBrand:
          type: string
          description: Brand name of the scheme used by the card
          example: VISA
        exchangeRate:
          type: number
          description: Exchange rate applied to convert the requested amount from
            requested currency to the account currency
          example: 2.25
        merchant:
          $ref: '#/components/schemas/Merchant'
        originalAmount:
          $ref: '#/components/schemas/AmountDto'
      required:
      - cardMaskedPan
      - cardSchemeBrand
      - originalAmount
    CardProvisioningCounter:
      type: object
      properties:
        currentNumberOfCards:
          type: integer
          format: int32
        currentNumberOfCardsPerWeek:
          type: integer
          format: int32
        maximumNumberOfCards:
          type: integer
          format: int32
        maximumNumberOfCardsPerWeek:
          type: integer
          format: int32
      required:
      - currentNumberOfCards
      - currentNumberOfCardsPerWeek
      - maximumNumberOfCards
      - maximumNumberOfCardsPerWeek
    CardProvisioningCounterResponse:
      type: object
      properties:
        cards:
          $ref: '#/components/schemas/CardProvisioningCounter'
      required:
      - cards
    Counterparty:
      type: object
      description: Details of the counterparty
      properties:
        account:
          $ref: '#/components/schemas/AccountIdentifier'
        address:
          $ref: '#/components/schemas/Address'
        name:
          type: string
          description: Counterparty name
          example: Giorgio Krassimov
          minLength: 1
      required:
      - account
      - name
    FinancialPlatformSummary:
      type: object
      description: Details about the financial platform of the payment account
      properties:
        country:
          type: string
          description: Country code
          example: BE
          minLength: 1
        id:
          type: string
          format: uuid
          description: Financial platform id
          example: 95717d5f-43d8-4b01-9d53-330af1a39f17
        logoUrl:
          type: string
          description: Url used to retrieve the logo of the financial platform
          example: 
            https://api.btx.eu.banqup.com/payments/v1/financialPlatforms/50e93f-...0df62838/logo
          minLength: 1
        name:
          type: string
          description: Display name of the financial platform
          example: Belfius
          minLength: 1
      required:
      - country
      - id
      - logoUrl
      - name
    Mandate:
      type: object
      description: Retrieved list of mandates
      properties:
        creationDateTime:
          type: string
          format: date-time
          description: The time this mandate was created
        creditor:
          $ref: '#/components/schemas/MandateCreditor'
        id:
          type: string
          description: Unique identifier of the mandate
          example: MNDT-2GBEjYjhg712toq
          minLength: 1
        reference:
          type: string
          description: The unique mandate reference assigned by the SDD Creditor
          example: '341215066001001003'
          minLength: 1
        scheme:
          type: string
          description: 'Specifies whether this mandate is signed for SDD Core or SDD
            B2B direct debits '
          enum:
          - CORE
          - B2B
          example: CORE
        sequenceType:
          type: string
          description: The sequence type of the direct debit mandate
          enum:
          - RCUR
          - OOFF
          example: RCUR
        signingDate:
          type: string
          format: date
          description: The date when the mandate was signed by the account holder
        status:
          type: string
          description: The status of the mandate
          enum:
          - ACTIVE
          - INACTIVE
          example: ACTIVE
        statusUpdateDate:
          type: string
          format: date
          description: The date when the mandate status changed
          example: 2024-01-28
      required:
      - creationDateTime
      - creditor
      - id
      - reference
      - scheme
      - sequenceType
      - signingDate
      - status
    MandateCreditor:
      type: object
      description: Details of the creditor
      properties:
        address:
          $ref: '#/components/schemas/Address'
        id:
          type: string
          description: Unique identification to unambiguously identify the creditor
          example: 2024-01-28
          minLength: 1
        name:
          type: string
          description: The full name of the creditor
          example: 2024-01-28
          minLength: 1
      required:
      - address
      - id
      - name
    MandatesResponse:
      type: object
      properties:
        currentPage:
          type: integer
          format: int64
          description: Current page index in your search
          example: 20
        mandates:
          type: array
          description: Retrieved list of mandates
          items:
            $ref: '#/components/schemas/Mandate'
        nextPage:
          type: integer
          format: int64
          description: Next page index in your search
          example: 21
        previousPage:
          type: integer
          format: int64
          description: Previous page index in your search
          example: 19
      required:
      - currentPage
      - mandates
      - nextPage
      - previousPage
    Merchant:
      type: object
      description: Merchant which collected the payment
      properties:
        address:
          $ref: '#/components/schemas/StructuredAddress'
        name:
          type: string
          description: The name of the merchant
          minLength: 1
      required:
      - address
      - name
    Movement:
      type: object
      description: Retrieved list of movements
      properties:
        additionalInformation:
          type: string
          description: Additional information on the movement
          example: bol Bruxelles BE MasterCard xxxx-5496
        amount:
          $ref: '#/components/schemas/AmountDto'
        availableOperations:
          type: array
          description: Available operations on the movement
          items:
            type: string
            description: Available operations on the movement
            enum:
            - REQUEST_REFUSAL
            - REQUEST_REFUND
            - CANCEL_PAYMENT
          uniqueItems: true
        balancesAfterOperation:
          type: array
          description: Balances after operation
          items:
            $ref: '#/components/schemas/PaymentAccountBalance'
          uniqueItems: true
        bookingDate:
          type: string
          format: date
          description: The date the operation was actually booked on the payment account
            (in the timezone of the account)
          example: 2023-04-04
        bookingType:
          type: string
          description: The booking type
          enum:
          - BOOKED
          - PLANNED
          - RESERVED
        cardOperationDetails:
          $ref: '#/components/schemas/CardOperationDetails'
        counterparty:
          $ref: '#/components/schemas/Counterparty'
        creationDateTime:
          type: string
          format: date-time
          description: The time this movement was created
        endToEndId:
          type: string
          description: Unique end to end identifier of the movement
          example: 96c13429-f18f-4855-8d04-41876e8bcf69
        id:
          type: string
          format: uuid
        mandateReference:
          type: string
          description: Unique Mandate Reference of the mandate, assigned by the SDD
            Creditor of the mandate
          example: M10024780090
        paymentId:
          type: string
          format: uuid
        plannedExecution:
          $ref: '#/components/schemas/PlannedExecutionInterval'
        reference:
          $ref: '#/components/schemas/PaymentReference'
        reservation:
          $ref: '#/components/schemas/ReservationDetails'
        scheme:
          type: string
          description: The payment scheme used to process this movement
          enum:
          - SCT
          - SCT_INST
          - SDD
          - CARDS
        status:
          type: string
          description: Status of the movement
          enum:
          - BOOKED
          - RESERVED
          - PLANNED
          - CANCELED
          - REJECTED
        type:
          type: string
          description: The movement type
          enum:
          - REGULAR
          - RETURN
          - REFUND
          - REVERSAL
          - CASH_WITHDRAWAL
          - POS
          - FEES
          - FIRST_PRESENTMENT
          - FIRST_PRESENTMENT_ATM
          - RE_PRESENTMENT
          - OCT
          - OCT_REVERSAL
      required:
      - amount
      - availableOperations
      - bookingDate
      - bookingType
      - creationDateTime
      - id
      - reference
      - status
    MovementsResponse:
      type: object
      properties:
        currentPage:
          type: integer
          format: int64
          description: Current page index in your search
          example: 21
        movements:
          type: array
          description: Retrieved list of movements
          items:
            $ref: '#/components/schemas/Movement'
        nextPage:
          type: integer
          format: int64
          description: Next page index in your search
          example: 21
        pageCount:
          type: integer
          format: int64
          description: Number of pages returned by your search
          example: 20
        pageSize:
          type: integer
          format: int64
          description: Number of items included in each page
          example: 20
        previousPage:
          type: integer
          format: int64
          description: Previous page index in your search
          example: 21
        totalElements:
          type: integer
          format: int64
          description: Number of items returned by your search
          example: 20
      required:
      - movements
    NestedProblem:
      type: object
      properties:
        detail:
          type: string
        error:
          type: string
        title:
          type: string
        type:
          type: string
          format: uri
      required:
      - detail
      - error
      - title
    OperationDetails:
      type: object
      description: Ongoing operations and corresponding details for the current payment
        account
      properties:
        initiationDateTime:
          type: string
          format: date-time
        initiatorSub:
          type: string
    Payment:
      type: object
      properties:
        amount:
          $ref: '#/components/schemas/AmountDto'
        availableOperations:
          type: array
          description: Set of available operations for the current payment
          items:
            type: string
            description: Set of available operations for the current payment
            enum:
            - RETRIEVE_DETAILS
            - CANCEL
          uniqueItems: true
        children:
          type: array
          description: The child payments
          items:
            $ref: '#/components/schemas/Payment'
        counterParty:
          $ref: '#/components/schemas/PaymentCounterParty'
        createdAt:
          type: string
          format: date
          description: The creation date
          example: 2024-10-10
        endToEndId:
          type: string
          description: The payment end to end id
        id:
          type: string
          format: uuid
          description: The payment id
          example: 95717d5f-43d8-4b01-9d53-330af1a39f17
        originatingAccount:
          $ref: '#/components/schemas/AccountIdentifier'
        reference:
          $ref: '#/components/schemas/PaymentReference'
        requestedExecutionDate:
          type: string
          format: date
          description: The requested execution date
          example: 2024-10-10
        status:
          type: string
          description: The payment status
          enum:
          - RECEIVED
          - OPEN
          - SUCCESSFUL
          - FAILED
          - CANCELED
          - UNKNOWN
          - PLANNED
          example: SUCCESSFUL
        statusReason:
          type: array
          description: The list of description codes for the status reasons
          items:
            type: string
            description: The list of description codes for the status reasons
            enum:
            - ABORTED_CLEARING_ERROR
            - ABORTED_CLEARING_TIMEOUT
            - ABORTED_SETTLEMENT_ERROR
            - ABORTED_SETTLEMENT_TIMEOUT
            - ACCESS_RIGHTS_INVALID
            - ACCOUNT_BLOCKED
            - ACCOUNT_CURRENCY_INVALID
            - ACCOUNT_DETAILS_CHANGED
            - ACCOUNT_NOT_ALLOWED
            - ACCOUNT_NUMBER_CLOSED
            - ACCOUNT_NUMBER_INVALID
            - ACCOUNT_PROXY_INVALID
            - ACCOUNT_TYPE_INVALID
            - AGENT_COUNTRY_INVALID
            - AGENT_INCORRECT
            - AGENT_OFFLINE
            - AGENT_REASON_NOT_SPECIFIED
            - AGENT_SUSPENDED
            - AMOUNT_BELOW_CLEARING_SYSTEM_MIN
            - AMOUNT_BLOCKED
            - AMOUNT_EXCEEDS_AGREED_LIMIT
            - AMOUNT_EXCEEDS_CLEARING_SYSTEM_LIMIT
            - AMOUNT_EXCEEDS_SETTLEMENT_LIMIT
            - AMOUNT_INVALID
            - AMOUNT_NOT_ALLOWED
            - AMOUNT_TOO_LOW
            - AMOUNT_WRONG
            - AMOUNT_ZERO
            - ATTACHMENT_NOT_SUPPORTED
            - AUTH_CANCELLED
            - BALANCE_INFO_REQUEST
            - BANK_CORRESPONDENT_NOT_POSSIBLE
            - BANK_IDENTIFIER_INCORRECT
            - BANK_IDENTIFIER_INVALID
            - BANK_OPERATION_CODE_INVALID
            - BANK_PROCESSING_ERROR
            - BIC_INVALID
            - BOOK_TRANSFER_NOT_ALLOWED
            - BRANCH_CODE_INVALID
            - CANCELLATION_DELIVERY_ACKNOWLEDGED
            - CANCELLATION_ACKNOWLEDGED
            - CANCELLATION_REQUEST_FORWARDED
            - CANCELLATION_REQUEST_NOT_FOUND
            - CANCELLATION_REQUEST_PENDING
            - CARD_NUMBER_INVALID
            - CATEGORY_PURPOSE_CODE_INVALID
            - CHARACTER_SET_INVALID
            - CHARGE_BEARER_CODE_INVALID
            - CHECK_ERI
            - CHEQUE_NUMBER_INVALID
            - CHEQUE_SETTLED_ON_CREDITOR_ACCOUNT
            - CLEARING_REQUEST_ABORTED
            - CLEARING_SYSTEM_IDENTIFIER_INVALID
            - CLEARING_SYSTEM_SERVICE
            - COLLECTION_NOT_DUE
            - CONTACT_DETAILS_INVALID
            - CONTROL_SUM_INVALID
            - CORE_AND_B2B_CONFLICT
            - COUNTRY_INVALID
            - COUNTRY_OF_RESIDENCE_INVALID
            - CREATION_DATE_INVALID
            - CREDITOR_ACCOUNT_INVALID_CURRENCY
            - CREDITOR_ACCOUNT_NUMBER_CLOSED
            - CREDITOR_ACCOUNT_NUMBER_INVALID
            - CREDITOR_ACCOUNT_TYPE_INVALID
            - CREDITOR_ADDRESS_MISSING
            - CREDITOR_AGENT_COUNTRY_INVALID
            - CREDITOR_AGENT_ERROR
            - CREDITOR_AGENT_OFFLINE
            - CREDITOR_AGENT_SPECIFIC_SERVICE
            - CREDITOR_AGENT_SUSPENDED
            - CREDITOR_AGENT_TIMEOUT
            - CREDITOR_BANK_IDENTIFIER_INVALID
            - CREDITOR_BANK_NOT_REGISTERED
            - CREDITOR_BIC_INVALID
            - CREDITOR_BLACKLISTED_BY_DEBTOR
            - CREDITOR_CLEARING_SYSTEM_IDENTIFIER_INVALID
            - CREDITOR_COUNTRY_INVALID
            - CREDITOR_COUNTRY_OF_RESIDENCE_INVALID
            - CREDITOR_IDENTIFICATION_CODE_INVALID
            - CREDITOR_IDENTIFIER_AMBIGUOUS
            - CREDITOR_IDENTIFIER_INCORRECT
            - CREDITOR_NAME_ADDRESS_MISSING
            - CREDITOR_NAME_FORMAT_ERROR
            - CREDITOR_NAME_MISSING
            - CREDITOR_NOT_WHITELISTED_BY_DEBTOR
            - CREDITOR_SCHEME_ID_INVALID
            - CREDITOR_UNKNOWN
            - CREDIT_DEBIT_NOT_CONFIRMED
            - CREDIT_PENDING_DOCUMENTS
            - CREDIT_PENDING_FUNDS
            - CURRENCY_INCOMPATIBLE_DECIMAL_POINT
            - CURRENCY_INCORRECT
            - CURRENCY_NOT_ALLOWED
            - CUSTOMER_DECEASED
            - CUSTOMER_NO_ANSWER
            - CUSTOMER_REASON_NOT_SPECIFIED
            - CUSTOMER_UNKNOWN
            - CUTOFF_DATE_INVALID
            - CUTOFF_TIME_INVALID
            - DAILY_LIMIT_EXCEEDED
            - DATA_SIGN_REQUESTED
            - DATE_INVALID
            - DATE_INVALID_NON_PROCESSING
            - DEBTOR_ACCOUNT_IDENTIFIER_MISSING
            - DEBTOR_ACCOUNT_INVALID_CURRENCY
            - DEBTOR_ACCOUNT_NOT_TO_BE_USED
            - DEBTOR_ACCOUNT_NUMBER_CLOSED
            - DEBTOR_ACCOUNT_NUMBER_INVALID
            - DEBTOR_ACCOUNT_TYPE_INVALID
            - DEBTOR_ADDRESS_MISSING
            - DEBTOR_AGENT_COUNTRY_INVALID
            - DEBTOR_AGENT_NOT_TO_BE_USED
            - DEBTOR_AGENT_SERVICE_ID_INVALID
            - DEBTOR_AGENT_SPECIFIC_SERVICE
            - DEBTOR_AGENT_TIMEOUT
            - DEBTOR_BANK_IDENTIFIER_INVALID
            - DEBTOR_BANK_NOT_REGISTERED
            - DEBTOR_BIC_INVALID
            - DEBTOR_CLEARING_SYSTEM_IDENTIFIER_INVALID
            - DEBTOR_COUNTRY_INVALID
            - DEBTOR_COUNTRY_OF_RESIDENCE_INVALID
            - DEBTOR_IDENTIFICATION_CODE_INVALID
            - DEBTOR_NAME_ADDRESS_MISSING
            - DEBTOR_NAME_FORMAT_ERROR
            - DEBTOR_NAME_MISSING
            - DECOMPRESSION_ERROR
            - DECRYPTION_ERROR
            - DELIVERED_WITHOUT_SERVICE_LEVEL
            - DELIVERED_WITH_SERVICE_LEVEL
            - DIRECT_DEBIT_AMOUNT_LIMIT_EXCEEDED
            - DIRECT_DEBIT_COUNT_LIMIT_EXCEEDED
            - DIRECT_DEBIT_UNSUCCESSFUL
            - DUPLICATION
            - ELECTRONIC_SIGNATURE_CORRECT
            - ELEMENT_CONTENT_INCORRECT
            - ELEMENT_CONTENT_TOO_LONG
            - ELEMENT_NOT_ALLOWED
            - ELEMENT_NOT_USED_AT_B
            - END_TO_END_ID_DUPLICATE
            - END_TO_END_ID_INVALID
            - ERI_MISSING
            - ERI_NOT_SUPPORTED
            - EXECUTION_DATE_CHANGED
            - EXPIRATION_DATETIME_INVALID
            - EXPIRATION_DATETIME_REACHED
            - EXPIRATION_DATETIME_TOO_FAR
            - FILE_FORMAT_INVALID
            - FILE_NON_READABLE
            - FILE_STRUCTURE_INCORRECT
            - FLAGGED_FOR_CANCELLATION
            - FRAUD
            - FRAUDULENT_ORIGIN
            - FUTURE_DATE_NOT_SUPPORTED
            - IDENTIFICATION_CODE_INVALID
            - INCONSISTENT_WITH_END_CUSTOMER
            - INITIATING_PARTY_UNRECOGNISED
            - INSTRUCTED_AGENT
            - INSTRUCTED_AGENT_TIMEOUT
            - INSTRUCTION_ID_DUPLICATE
            - INSUFFICIENT_FUNDS
            - INTERMEDIARY_AGENT_INVALID
            - LIMIT_EXCEEDED
            - LOCAL_INSTRUMENT_CODE_INVALID
            - MANDATE_CHANGES_NOT_ALLOWED
            - MANDATE_INFORMATION_MISSING
            - MANDATE_MISSING_INFORMATION
            - MANDATORY_ELEMENT_MISSING
            - MESSAGE_ID_DUPLICATE
            - MISSING_NAME
            - MONTHLY_LIMIT_EXCEEDED
            - NAME_LENGTH_INVALID
            - NARRATIVE
            - NOT_COMPLIANT
            - NO_DATA_AVAILABLE
            - NO_MANDATE
            - ORDER_CANCELLED
            - ORDER_FILE_DELETED
            - ORDER_FORWARDED_FOR_POSTPROCESSING
            - ORDER_NOT_CANCELLED
            - ORDER_REJECTED
            - ORIGINAL_FILE_NOT_SENT
            - PARTY_ID_INVALID
            - PAYER_NOT_REACHABLE
            - PAYMENT_DUPLICATE
            - PAYMENT_ID_DUPLICATE
            - PAYMENT_INSTR_TYPE_UNSUPPORTED
            - PAYMENT_NOT_ALLOWED
            - PAYMENT_NOT_RECEIVED
            - PAYMENT_NO_GUARANTEE
            - PAYMENT_TRANSFERRED_AND_TRACKED
            - PAYMENT_TRANSFERRED_NOT_TRACKED
            - PAYMENT_TYPE_INFO_INVALID
            - PAYMENT_UNDUE
            - PROCESSING_OK
            - PUBLIC_KEY_VERSION_INCORRECT
            - PURPOSE_INVALID
            - RECEIVER_CUSTOMER_INFORMATION
            - RECEIVER_TOKEN_NOT_FOUND
            - REFUND_REQUEST_BY_CUSTOMER
            - REGULATORY_INFORMATION_INVALID
            - REGULATORY_REASON
            - REJECTED_BY_ASPSP
            - REMEDIATION_NOT_POSSIBLE
            - REMITTANCE_INFORMATION_INVALID
            - REMITTANCE_INFORMATION_TRUNCATED
            - REPEAT_ORDER
            - REQUESTED_BY_CUSTOMER
            - REQUESTED_EXECUTION_DATE_TOO_FAR_IN_FUTUER
            - REQUESTED_EXECUTION_DATE_TOO_FAR_IN_PAST
            - RETURN_PAYMENT_FORBIDDEN
            - RTP_ALREADY_ACCEPTED
            - RTP_ALREADY_EXPIRED
            - RTP_ALREADY_REFUSED
            - RTP_ALREADY_REJECTED
            - RTP_DEBTOR_NOT_SUPPORTED
            - RTP_NEVER_RECEIVER
            - RTP_NOT_AGREED
            - RTP_RECEIVED
            - RTP_SP_IDENTIFIER_INCORRECT
            - R_MESSAGE_CONFLICT
            - SAME_DEBTOR_AND_CREDITOR_ACCOUNT
            - SENDER_TOKEN_NOT_FOUND
            - SERVICE_LEVEL_CODE_INVALID
            - SERVICE_UNAVAILABLE
            - SETTLEMENT_FAILED
            - SETTLEMENT_NOT_RECEIVED
            - SETTLEMENT_SYSTEM_NOT_AVAILABLE
            - SIGNATURE_ALREADY_SENT
            - SIGNATURE_INSUFFICIENT_RIGHTS
            - SIGNATURE_ORDER_DATA_MISMATCH
            - SIGNER_1_CA_INVALID
            - SIGNER_1_CERTIFICATE_INCORRECT
            - SIGNER_1_CERTIFICATE_INVALID
            - SIGNER_1_CERTIFICATE_REVOKED
            - SIGNER_2_CA_INVALID
            - SIGNER_2_CERTIFICATE_INCORRECT
            - SIGNER_2_CERTIFICATE_INVALID
            - SIGNER_2_CERTIFICATE_REVOKED
            - SIGNER_CA_INVALID
            - SIGNER_CERTIFICATE_INCORRECT
            - SIGNER_CERTIFICATE_INVALID
            - SIGNER_CERTIFICATE_REVOKED
            - STRUCTURED_CREDITOR_REFERENCE_INVALID
            - SUM_GROUP_CONTROL_INVALID
            - SUM_PAYMENT_CONTROL_INVALID
            - SYNTAX_ERROR
            - TAX_INFORMATION_INVALID
            - TECHNICAL_ERROR
            - TOKEN_COUNTERPARTY_MISMATCH
            - TOKEN_EXPIRED
            - TOKEN_INVALID
            - TOKEN_MISSING
            - TOKEN_SINGLE_USE
            - TOKEN_SUSPENDED
            - TOKEN_VALUE_LIMIT_EXCEEDED
            - TRANSACTIONS_NUMBER_GROUP_INVALID
            - TRANSACTIONS_NUMBER_INVALID
            - TRANSACTIONS_NUMBER_PAYMENT_INVALID
            - TRANSACTION_CANNOT_BE_RETURNED
            - TRANSACTION_CURRENCY_INVALID
            - TRANSACTION_DUPLICATE
            - TRANSACTION_FORBIDDEN
            - TRANSACTION_NOT_SUPPORTED
            - TRANSACTION_NUMBER_NOT_ALLOWED
            - TRANSACTION_REFERENCE_NOT_UNIQUE
            - TRANSFER_ORDER
            - TRANSFER_TO_SIGN_BY_HAND
            - TRANSMISSION_ABORTED
            - TRANSMISSION_SUCCESSFUL
            - UETR_NETWORK_STOP
            - UNKNOWN_DATA_SIGN_FORMAT
            - USER_DOES_NOT_EXIST
            - USER_NOT_YET_ACTIVATED
            - USER_SIGNED_MULTIPLE_TIMES
            - VALUES_SET_TO_NEXT_DAY
            - WAITING_TIME_EXPIRED
            - ZERO_AMOUNT_NOT_APPLIED
        type:
          type: string
          description: Type of payment
          enum:
          - credit
          - debit
          example: debit
      required:
      - amount
      - availableOperations
      - id
      - status
      - statusReason
      - type
    PaymentAccount:
      type: object
      properties:
        alias:
          type: string
          description: Name entered by user to refer to the account
          example: Family joint account
        availableOperations:
          type: array
          description: Set of available operations for the current payment account
          items:
            type: string
            description: Set of available operations for the current payment account
            enum:
            - RENAME_ACCOUNT
            - GRANT_AIS_CONSENT
            - REVOKE_AIS_CONSENT
            - RENEW_AIS_CONSENT
            - RETRIEVE_BALANCE
            - RETRIEVE_MOVEMENTS
            - TRIGGER_MOVEMENT_REFRESH
            - RETRIEVE_STATEMENTS
            - RETRIEVE_MANDATES
            - DELETE_ACCOUNT
            - REQUEST_CARD
            - LIST_CARDS
            - RETRIEVE_CARD_PROVISIONING_COUNTERS
            - RETRIEVE_CARD_SETTINGS
            - INITIATE_DOCUMENT_PARTIAL_PAYMENT
            - INITIATE_PAYMENT
            - SCHEDULE_PAYMENT
            - INITIATE_BULK_PAYMENT
            - RETRIEVE_ENRICHED_TRANSACTION_REPORTS
            - GENERATE_ENRICHED_TRANSACTION_REPORTS
            - RETRIEVE_ACCOUNT_INFORMATION
            - CHANGE_OWNER_NAME
          uniqueItems: true
        balances:
          type: array
          description: Balances
          items:
            $ref: '#/components/schemas/PaymentAccountBalance'
          uniqueItems: true
        bank:
          $ref: '#/components/schemas/BankIdentifier'
        consent:
          $ref: '#/components/schemas/AisConsent'
        country:
          type: string
          example: BE
          pattern: ^[a-zA-Z]{2}
        currency:
          type: string
          description: International code ISO 4217 of the currency used
          example: EUR
          pattern: '[A-Z]{3}'
        financialPlatform:
          $ref: '#/components/schemas/FinancialPlatformSummary'
        id:
          type: string
          format: uuid
          description: Payment account id
          example: 632e0bd1-d94a-4aa6-bcb6-da9bfe4144cd
        identifier:
          type: string
          description: Account Identifier
          example: BE83504010119715
          minLength: 1
        ongoingOperations:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/OperationDetails'
          description: Ongoing operations and corresponding details for the current
            payment account
        owner:
          type: string
          description: The name of the owner of the account
          example: John Smith
        scheme:
          type: string
          description: Account Scheme
          enum:
          - IBAN
          - BBAN
          - ANB
          - SE_BANKGIRO
          - SE_PLUSGIRO
          - CREDIT_CARD
          example: IBAN
        status:
          type: string
          description: Status of the account
          enum:
          - ACTIVE
          - CLOSED
          - PENDING
          - BLOCKED
          - FROZEN
          example: CLOSED
      required:
      - availableOperations
      - currency
      - id
      - identifier
      - ongoingOperations
      - scheme
      - status
    PaymentAccountBalance:
      type: object
      description: Balances
      properties:
        amount:
          $ref: '#/components/schemas/AmountDto'
        balanceType:
          type: string
          description: The balance type
          enum:
          - CURRENT_AVAILABLE
          - CURRENT_BOOKED
          - CLOSING_BOOKED
          - OPENING_BOOKED
          - INTERIM_AVAILABLE
          - INTERIM_BOOKED
          example: CURRENT_AVAILABLE
      required:
      - amount
      - balanceType
    PaymentAccountBalanceResponse:
      type: object
      properties:
        balances:
          type: array
          items:
            $ref: '#/components/schemas/PaymentAccountBalance'
          uniqueItems: true
      required:
      - balances
    PaymentAccountGrantConsentRequest:
      type: object
      properties:
        language:
          type: string
          deprecated: true
          description: This field is deprecated, please use locale instead.
        locale:
          type: string
          description: The locale to use on web pages presented to the user
          example: nl, NL, NL-NL, nl-NL, nl-BE, NL-BE
        redirectUrl:
          type: string
          description: URL to redirect the user to, once the consent flow is completed
          example: https://app.btx.banqup.com/paymentAccounts
          minLength: 1
      required:
      - redirectUrl
    PaymentAccountPermissionsResponse:
      type: object
      properties:
        permissions:
          type: array
          items:
            type: string
    PaymentAccountSaveRequest:
      type: object
      properties:
        alias:
          type: string
          description: Name entered by user to refer to the account
          example: Family joint account
        bank:
          $ref: '#/components/schemas/BankIdentifier'
        country:
          type: string
          example: BE
          pattern: ^[a-zA-Z]{2}
        currency:
          type: string
          description: International code ISO 4217 of the currency used
          example: EUR
          pattern: '[A-Z]{3}'
        financialPlatformId:
          type: string
          format: uuid
          description: Identifier of the financial platform to which the payment account
            belongs
          example: cdccce35-8837-486e-9bab-81f7bd745bf7
        identifier:
          type: string
          description: Account Identifier
          example: BE83504010119715
          minLength: 1
        owner:
          type: string
          description: The name of the owner of the account
          example: John Smith
          minLength: 1
        scheme:
          type: string
          description: Account Scheme
          enum:
          - IBAN
          - BBAN
          - ANB
          - SE_BANKGIRO
          - SE_PLUSGIRO
          - CREDIT_CARD
          example: IBAN
      required:
      - currency
      - identifier
      - owner
      - scheme
    PaymentAccountUpdate:
      type: object
      properties:
        alias:
          type: string
          description: Name entered by user to refer to the account
          example: Family joint account
        owner:
          type: string
          description: The name of the account owner
          example: John Smith
    PaymentAccountsResponse:
      type: object
      properties:
        paymentAccounts:
          type: array
          items:
            $ref: '#/components/schemas/PaymentAccount'
      required:
      - paymentAccounts
    PaymentCounterParty:
      type: object
      description: The creditor information
      properties:
        account:
          $ref: '#/components/schemas/AccountIdentifier'
        address:
          $ref: '#/components/schemas/SepaStructuredAddress'
        name:
          type: string
          description: The name of the party
          example: Company XYZ
          maxLength: 70
          minLength: 0
        verificationId:
          type: string
          description: The verification of payee id
      required:
      - account
      - name
    PaymentReference:
      type: object
      description: Reference details
      properties:
        scheme:
          type: string
          enum:
          - OGM_VCS
          - ISO_11649
          - ACCEPT_GIRO
          - STRUCTURED_EE
          - STRUCTURED_SE
          - STRUCTURED_LU
          - STRUCTURED_FI
          - STRUCTURED_NO
          - STRUCTURED_CZ
        type:
          type: string
          enum:
          - STRUCTURED
          - UNSTRUCTURED
        value:
          type: string
          minLength: 1
      required:
      - type
      - value
    PlannedExecutionInterval:
      type: object
      description: Planned execution interval, only present for planned payments
      properties:
        end:
          type: string
          format: date-time
          description: Moment at which the bank will mark the payment as failed if
            it has not yet succeeded in booking it
        start:
          type: string
          format: date-time
          description: Moment at which the bank will start trying to execute the planned
            payment
      required:
      - end
      - start
    RedirectUrlResponse:
      type: object
      properties:
        redirectUrl:
          type: string
          description: URL to access the 'Establish a new consent' page
          example: https://pxg.com/consents/1adffad1-4838-4b3b-87f5-80048a4d556a/init
          minLength: 1
      required:
      - redirectUrl
    ReservationDetails:
      type: object
      description: Reservation details, only present for booked reservations
      properties:
        expirationDate:
          type: string
          format: date
          description: The date until the reservation remains active and can be claimed
            by the merchant
          example: 2025-01-01
        reservationId:
          type: string
          description: Reservation Id
          example: '21030023'
          minLength: 1
      required:
      - expirationDate
      - reservationId
    SepaStructuredAddress:
      type: object
      description: |
        EPC Interbank Structured Address Structure. Structured addresses are address information split into several fields instead of one unstructured address field.
        From November 2023, all banks and PSPs will have to accept payment messages with structured addresses.
        From 2025, banks and PSPs will have to send all their messages with structured addresses.
      externalDocs:
        description: More about EPC Interbank Structured Address Structure
        url: 
          https://www.europeanpaymentscouncil.eu/sites/default/files/kb/file/2022-10/EPC153-22%20EPC%20guidance%20document%20-%20Use%20of%20Structured%20Address%20under%20the%20SEPA%20Payment%20Schemes%20as%20of%20Nov%202025.pdf
      properties:
        buildingName:
          type: string
          description: Name of the building or house.
          example: Empire State Building
          maxLength: 35
          minLength: 0
        buildingNumber:
          type: string
          description: A unique number assigned to the building in the street or area
          example: A22
        city:
          type: string
          description: Name of the city
          example: La Hulpe
          minLength: 1
        cityLocationName:
          type: string
          description: Specific location name within the town.
          example: City center
          maxLength: 35
          minLength: 0
        country:
          type: string
          description: Name of the country
          example: Belgium
        countryCode:
          type: string
          description: Two-letter country code defined in ISO 3166
          example: BE
        department:
          type: string
          description: Identification of a division of a large organisation or building.
          example: Finance
          maxLength: 70
          minLength: 0
        district:
          type: string
          description: Identifies a subdivision within a country sub-division
          example: Walloon Brabant
        floor:
          type: string
          description: A unique number or name assigned to the floor within the building
          example: ground
          maxLength: 70
          minLength: 0
        house:
          type: string
        level:
          type: string
        postBox:
          type: string
          description: Numbered box in a post office, assigned to a person or organisation,
            where letters are kept until called for.
          example: '1033'
          maxLength: 16
          minLength: 0
        postalCode:
          type: string
          description: Series of letters or digits or both, included in a postal address
          example: 12345-1A
        postalCodeExtension:
          type: string
        province:
          type: string
        room:
          type: string
          description: Building room number.
          example: '2.22'
          maxLength: 70
          minLength: 0
        state:
          type: string
          description: Name of the state
          example: California
        streetName:
          type: string
          description: Name of the street
          example: Avenue Reine Astrid
        subDepartment:
          type: string
          description: Identification of a sub-division of a large organisation or
            building.
          example: Accounting
          maxLength: 70
          minLength: 0
        subDistrict:
          type: string
          description: Identifies a subdivision of a country such as state, region,
            county.
          example: Wallonia
          maxLength: 35
          minLength: 0
      required:
      - city
    Statement:
      type: object
      description: Associated Payment account Statements
      properties:
        date:
          type: string
          format: date
          description: Statement generation date
        downloadUrl:
          type: string
          description: Url to download the statement
          example: 
            https://api.btx.eu.banqup.com/payments/v1/spaces/8e51ea7f-5c3c-42d8-9b28-04a7d7722bfd/paymentAccounts/193f6965-5495-4013-a3f0-3e214266010c/statements/BE49504010047771_2024_38
          minLength: 1
        formats:
          type: array
          description: Supported statement formats
          items:
            type: string
            description: Supported statement formats
            enum:
            - CAMT053
            - CODA
            - NORMA
            - CFONB
            - PDF
        id:
          type: string
          description: Statement id
          example: BE49504010047771_2024_38
          minLength: 1
      required:
      - date
      - downloadUrl
      - formats
      - id
    StatementsResponse:
      type: object
      properties:
        statements:
          type: array
          description: Associated Payment account Statements
          items:
            $ref: '#/components/schemas/Statement'
      required:
      - statements
    StructuredAddress:
      type: object
      description: Structured address of the counter party
      properties:
        buildingNumber:
          type: string
          description: A unique number assigned to the building in the street or area
          example: A22
        city:
          type: string
          description: Name of the city
          example: La Hulpe
          minLength: 1
        country:
          type: string
          description: Name of the country
          example: Belgium
        countryCode:
          type: string
          description: Two-letter country code defined in ISO 3166
          example: BE
        house:
          type: string
        level:
          type: string
        postalCode:
          type: string
          description: Series of letters or digits or both, included in a postal address
          example: 12345-1A
        postalCodeExtension:
          type: string
        province:
          type: string
        state:
          type: string
          description: Name of the state
          example: California
        streetName:
          type: string
          description: Name of the street
          example: Avenue Reine Astrid
      required:
      - city
    SupportedCard:
      type: object
      description: Supported card types and settings for country
      example:
        BE:
        - cardType: PHYSICAL
          settings:
            ecommerceEnabled: true
            atmEnabled: true
            cashWithdrawals:
              monthlyAllowed: 999999
              monthlyIncluded: 0
        - cardType: VIRTUAL
          settings:
            ecommerceEnabled: true
            atmEnabled: true
            cashWithdrawals:
              monthlyAllowed: 999999
              monthlyIncluded: 0
        NL:
        - cardType: PHYSICAL
          settings:
            ecommerceEnabled: true
            atmEnabled: true
            cashWithdrawals:
              monthlyAllowed: 999999
              monthlyIncluded: 0
        - cardType: VIRTUAL
          settings:
            ecommerceEnabled: true
            atmEnabled: true
            cashWithdrawals:
              monthlyAllowed: 999999
              monthlyIncluded: 0
      properties:
        cardType:
          type: string
          description: Supported card Type
          enum:
          - VIRTUAL
          - PHYSICAL
        settings:
          $ref: '#/components/schemas/SupportedCardSettings'
      required:
      - cardType
      - settings
    SupportedCardCashWithdrawalSettings:
      type: object
      properties:
        monthlyAllowed:
          type: integer
          format: int32
        monthlyIncluded:
          type: integer
          format: int32
      required:
      - monthlyAllowed
      - monthlyIncluded
    SupportedCardSettings:
      type: object
      description: Supported card Settings
      properties:
        atmEnabled:
          type: boolean
        cashWithdrawals:
          $ref: '#/components/schemas/SupportedCardCashWithdrawalSettings'
        ecommerceEnabled:
          type: boolean
      required:
      - atmEnabled
      - cashWithdrawals
      - ecommerceEnabled
    SupportedCardsByCountry:
      type: object
      description: Supported countries for customer segment
      properties:
        countries:
          type: object
          additionalProperties:
            type: array
            description: Map of country codes to list of supported card types and
              settings
            example:
              BE:
              - cardType: PHYSICAL
                settings:
                  atmEnabled: true
                  cashWithdrawals:
                    monthlyAllowed: 999999
                    monthlyIncluded: 0
                  ecommerceEnabled: true
              - cardType: VIRTUAL
                settings:
                  atmEnabled: true
                  cashWithdrawals:
                    monthlyAllowed: 999999
                    monthlyIncluded: 0
                  ecommerceEnabled: true
              NL:
              - cardType: PHYSICAL
                settings:
                  atmEnabled: true
                  cashWithdrawals:
                    monthlyAllowed: 999999
                    monthlyIncluded: 0
                  ecommerceEnabled: true
              - cardType: VIRTUAL
                settings:
                  atmEnabled: true
                  cashWithdrawals:
                    monthlyAllowed: 999999
                    monthlyIncluded: 0
                  ecommerceEnabled: true
            items:
              $ref: '#/components/schemas/SupportedCard'
          description: Map of country codes to list of supported card types and settings
          example:
            BE:
            - cardType: PHYSICAL
              settings:
                atmEnabled: true
                cashWithdrawals:
                  monthlyAllowed: 999999
                  monthlyIncluded: 0
                ecommerceEnabled: true
            - cardType: VIRTUAL
              settings:
                atmEnabled: true
                cashWithdrawals:
                  monthlyAllowed: 999999
                  monthlyIncluded: 0
                ecommerceEnabled: true
            NL:
            - cardType: PHYSICAL
              settings:
                atmEnabled: true
                cashWithdrawals:
                  monthlyAllowed: 999999
                  monthlyIncluded: 0
                ecommerceEnabled: true
            - cardType: VIRTUAL
              settings:
                atmEnabled: true
                cashWithdrawals:
                  monthlyAllowed: 999999
                  monthlyIncluded: 0
                ecommerceEnabled: true
    UnstructuredAddress:
      type: object
      description: Unstructured address of the counter party
      properties:
        addressLine1:
          type: string
          description: Typically consists of streetName + streetNumber but can contain
            more or less data
          example: 123 Broadway
        addressLine2:
          type: string
          description: Typically consists of postalCode + city but can contain more
            or less data
          example: New York, NY 10001
        country:
          type: string
          description: Two-letter country code defined in ISO 3166
          example: BE
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://api.cve.btx.eu.banqup.com/oauth2/client_credential/gettoken
          scopes:
            info: Scopes are endpoint-specific, see each endpoint for required scope.
        authorizationCode:
          authorizationUrl: https://api.cve.btx.eu.banqup.com/oauth2/auth
          tokenUrl: https://api.cve.btx.eu.banqup.com/oauth2/token
          scopes:
            info: Scopes are endpoint-specific, see each endpoint for required scope.
