swagger: '2.0'
info:
  title: Raiffeisen Pay - Payment Transactions API
  description: Raiffeisen Pay - Payment Transactions API (v1.0.63)
  version: 1.0.0
basePath: /payment-v1
host: localhost
securityDefinitions:
  api_key:
    type: "apiKey"
    name: "x-api-key"
    in: "header"
schemes:
  - https
tags:
  - name: Consents
    description: Create and query Consents required to initiate payment transactions
  - name: Payment Transactions
    description: Initiate and query domestic payment transactions
  - name: Sepa Transactions
    description: Initiate and query sepa payment transactions
  - name: Payment API
    description: Consents and Payments
  - name: Transactions
    description: All transactions
x-amazon-apigateway-request-validators:
  validate-body-query-parameters-headers:
    validateRequestParameters: true
    validateRequestBody: true
x-amazon-apigateway-gateway-responses:
  BAD_REQUEST_BODY:
    statusCode: 400
    responseTemplates:
      application/json: "{ \"errorCode\": \"INVALID_BODY\", \"errorId\": \"$util.escapeJavaScript($input.params('x-request-id'))\"\
        , \"errorDescription\": \"$context.error.validationErrorString\" }"
  BAD_REQUEST_PARAMETERS:
    statusCode: 400
    responseTemplates:
      application/json: "{ \"errorCode\": \"INVALID_PARAM\", \"errorId\": \"$util.escapeJavaScript($input.params('x-request-id'))\"\
        , \"errorDescription\": \"$context.error.validationErrorString\" }"
  DEFAULT_4XX:
    statusCode: 400
    responseTemplates:
      application/json: "{ \"errorCode\": \"BAD_REQUEST\", \"errorId\": \"$util.escapeJavaScript($input.params('x-request-id'))\"\
        , \"errorDescription\": \"$context.error.validationErrorString\" }"
  WAF_FILTERED:
    statusCode: 403
    responseTemplates:
      application/json: "{ \"errorCode\": \"WAF_BLOCK\", \"errorId\": \"$util.escapeJavaScript($input.params('x-request-id'))\"\
        , \"errorDescription\": \"$context.error.message\" }"
  INVALID_API_KEY:
    statusCode: 403
    responseTemplates:
      application/json: "{ \"errorCode\": \"INVALID_API_KEY\", \"errorId\": \"$util.escapeJavaScript($input.params('x-request-id'))\"\
        , \"errorDescription\": \"$context.error.message\" }"
  MISSING_AUTHENTICATION_TOKEN:
    statusCode: 403
    responseTemplates:
      application/json: "{ \"errorCode\": \"MISSING_AUTHENTICATION_TOKEN\", \"errorId\": \"$util.escapeJavaScript($input.params('x-request-id'))\"\
        , \"errorDescription\": \"$context.error.message\" }"
  RESOURCE_NOT_FOUND:
    statusCode: 404
    responseTemplates:
      application/json: "{ \"errorCode\": \"RESOURCE_NOT_FOUND\", \"errorId\": \"$util.escapeJavaScript($input.params('x-request-id'))\"\
        , \"errorDescription\": \"$context.error.message\" }"
  QUOTA_EXCEEDED:
    statusCode: 429
    responseTemplates:
      application/json: "{ \"errorCode\": \"USAGE_PLAN_QUOTA_EXCEEDED\", \"errorId\": \"$util.escapeJavaScript($input.params('x-request-id'))\"\
        , \"errorDescription\": \"$context.error.message\" }"
  THROTTLED:
    statusCode: 429
    responseTemplates:
      application/json: "{ \"errorCode\": \"USAGE_PLAN_THROTTLING_LIMIT_EXCEEDED\", \"errorId\": \"$util.escapeJavaScript($input.params('x-request-id'))\"\
        , \"errorDescription\": \"$context.error.message\" }"
paths:
  /consents-create:
    post:
      operationId: postConsentCreate
      summary: createConsent
      description: Create consent required to initiate payment transactions
      security:
        - api_key: [ ]
      tags:
        - Transactions
        - Consents
        - Payment API
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/X-Request-ID'
        - $ref: '#/parameters/X-Correlation-Id'
        - $ref: '#/parameters/JWS-Signature'
        - name: body
          in: body
          schema:
            $ref: '#/definitions/CreateConsentRequest'
      responses:
        '201':
          description: |
            201 Created

            Consent created
          schema:
            $ref: '#/definitions/CreateConsentResponse'
        '400':
          description: |
            400 Bad Request
          schema:
            $ref: '#/definitions/ErrorDTO'
        '401':
          description: |
            401 Unauthorized
          schema:
            $ref: '#/definitions/ErrorDTO'
        '403':
          description: |
            403 Forbidden
          schema:
            $ref: '#/definitions/ErrorDTO'
      #x-amazon-apigateway-request-validator: "validate-body-query-parameters-headers"
      x-amazon-apigateway-integration:
        # https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-swagger-extensions-integration.html
        uri: "https://${stageVariables.APIENV_TARGET_HAPROXY_AUTH_ENDPOINT}/v1/raiffeisen-pay-auth/consent/create"
        responses:
          default:
            statusCode: "201"
        passthroughBehavior: "when_no_match"
        connectionType: "VPC_LINK"
        connectionId: "${stageVariables.APIENV_VPCLINK}"
        httpMethod: "POST"
        type: "http_proxy"
        requestParameters:
          integration.request.header.x-haproxy-endpoint: stageVariables.APIENV_HAPROXY_HEADER_AUTH_VALUE
  /consents-query:
    post:
      operationId: postConsentStatus
      summary: queryConsent
      description: Query Consent status
      security:
        - api_key: [ ]
      tags:
        - Transactions
        - Consents
        - Payment API
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/X-Request-ID'
        - $ref: '#/parameters/X-Correlation-Id'
        - $ref: '#/parameters/JWS-Signature'
        - name: body
          in: body
          schema:
            $ref: '#/definitions/QueryConsentRequest'
      responses:
        '200':
          description: |
            200 OK

            Consent status fetched successfully
          schema:
            $ref: '#/definitions/QueryConsentResponse'
        '400':
          description: |
            400 Bad Request
          schema:
            $ref: '#/definitions/ErrorDTO'
        '401':
          description: |
            401 Unauthorized
          schema:
            $ref: '#/definitions/ErrorDTO'
        '403':
          description: |
            403 Forbidden
          schema:
            $ref: '#/definitions/ErrorDTO'
        '404':
          description: |
            404 Not Found
          schema:
            $ref: '#/definitions/ErrorDTO'
      #x-amazon-apigateway-request-validator: "validate-body-query-parameters-headers"
      x-amazon-apigateway-integration:
        # https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-swagger-extensions-integration.html
        uri: "https://${stageVariables.APIENV_TARGET_HAPROXY_AUTH_ENDPOINT}/v1/raiffeisen-pay-auth/consent/query"
        responses:
          default:
            statusCode: "200"
        passthroughBehavior: "when_no_match"
        connectionType: "VPC_LINK"
        connectionId: "${stageVariables.APIENV_VPCLINK}"
        httpMethod: "POST"
        type: "http_proxy"
        requestParameters:
          integration.request.header.x-haproxy-endpoint: stageVariables.APIENV_HAPROXY_HEADER_AUTH_VALUE
  /init:
    post:
      operationId: postPaymentInit
      summary: initPayment
      description:
        Initiate a domestic payment transaction
      security:
        - api_key: [ ]
      tags:
        - Transactions
        - Payment Transactions
        - Payment API
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/X-Request-ID'
        - $ref: '#/parameters/X-Correlation-Id'
        - $ref: '#/parameters/JWS-Signature'
        - name: body
          in: body
          schema:
            $ref: '#/definitions/InitiatePaymentRequest'
      responses:
        '201':
          description: |
            201 Created

            Payment initiation successful
          schema:
            $ref: '#/definitions/paymentGenericResponse'
        '400':
          description: |
            400 Bad Request
          schema:
            $ref: '#/definitions/ErrorDTO'
        '401':
          description: |
            401 Unauthorized
          schema:
            $ref: '#/definitions/ErrorDTO'
      #x-amazon-apigateway-request-validator: "validate-body-query-parameters-headers"
      x-amazon-apigateway-integration:
        uri: "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:${stageVariables.APIENV_LAMBDA_ENV}-${stageVariables.APIENV_LAMBDA_NAME}:${stageVariables.APIENV_LAMBDA_LATEST_ALIAS}/invocations"
        passthroughBehavior: "when_no_match"
        httpMethod: "POST"
        type: "aws_proxy"
  /query:
    post:
      operationId: postPaymentQuery
      summary: queryPayment
      description:
        Query a domestic payment transaction
      security:
        - api_key: [ ]
      tags:
        - Transactions
        - Payment Transactions
        - Payment API
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/X-Request-ID'
        - $ref: '#/parameters/X-Correlation-Id'
        - $ref: '#/parameters/JWS-Signature'
        - name: body
          in: body
          schema:
            $ref: '#/definitions/QueryPaymentRequest'
      responses:
        '200':
          description: |
            200 OK

            Payment query successful
          schema:
            $ref: '#/definitions/QueryPaymentResponse'
        '400':
          description: |
            400 Bad Request
          schema:
            $ref: '#/definitions/ErrorDTO'
        '401':
          description: |
            401 Unauthorized
          schema:
            $ref: '#/definitions/ErrorDTO'
      #x-amazon-apigateway-request-validator: "validate-body-query-parameters-headers"
      x-amazon-apigateway-integration:
        uri: "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:${stageVariables.APIENV_LAMBDA_ENV}-${stageVariables.APIENV_LAMBDA_NAME}:${stageVariables.APIENV_LAMBDA_LATEST_ALIAS}/invocations"
        passthroughBehavior: "when_no_match"
        httpMethod: "POST"
        type: "aws_proxy"
  /balance-query:
    post:
      operationId: postBalanceQuery
      summary: balance query
      description:
        Query balance information
      security:
        - api_key: [ ]
      tags:
        - Transactions
        - Payment Transactions
        - Payment API
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/X-Request-ID'
        - $ref: '#/parameters/X-Correlation-Id'
        - $ref: '#/parameters/JWS-Signature'
        - name: body
          in: body
          schema:
            $ref: '#/definitions/QueryBalanceRequestCamt060'
      responses:
        '200':
          description: |
            200 OK

            Payment query successful
          schema:
            $ref: '#/definitions/QueryBalanceResponseCamt052'
        '400':
          description: |
            400 Bad Request
          schema:
            $ref: '#/definitions/ErrorDTO'
        '401':
          description: |
            401 Unauthorized
          schema:
            $ref: '#/definitions/ErrorDTO'
      #x-amazon-apigateway-request-validator: "validate-body-query-parameters-headers"
      x-amazon-apigateway-integration:
        uri: "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:${stageVariables.APIENV_LAMBDA_ENV}-${stageVariables.APIENV_LAMBDA_NAME}:${stageVariables.APIENV_LAMBDA_LATEST_ALIAS}/invocations"
        passthroughBehavior: "when_no_match"
        httpMethod: "POST"
        type: "aws_proxy"
  /sepa/init:
    post:
      operationId: postSepaInit
      summary: initSepa
      description:
        Initiate a sepa payment transaction
      security:
        - api_key: [ ]
      tags:
        - Transactions
        - Sepa Transactions
        - Payment API
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/X-Request-ID'
        - $ref: '#/parameters/X-Correlation-Id'
        - $ref: '#/parameters/JWS-Signature'
        - name: body
          in: body
          required: true
          schema:
            type: object
      responses:
        '201':
          description: |
            201 Created
            
            Sepa payment initiation successful
          schema:
            type: object
        '400':
          description: |
            General error response
          schema:
            type: object
        '401':
          description: |
            Access Denied. There is no access token or the api call was made
            with an invalid access token
          schema:
            type: object
      x-amazon-apigateway-integration:
        # https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-swagger-extensions-integration.html
        uri: "https://${stageVariables.APIENV_TARGET_HAPROXY_SEPA_ENDPOINT}/sepa/init"
        responses:
          default:
            statusCode: "201"
        passthroughBehavior: "when_no_match"
        connectionType: "VPC_LINK"
        connectionId: "${stageVariables.APIENV_VPCLINK}"
        httpMethod: "POST"
        type: "http_proxy"
        requestParameters:
          integration.request.header.x-haproxy-endpoint: stageVariables.APIENV_HAPROXY_HEADER_SEPA_VALUE
  /sepa/query:
    post:
      operationId: postSepaQuery
      summary: querySepa
      description:
        Query sepa transaction status
      security:
        - api_key: [ ]
      tags:
        - Transactions
        - Sepa Transactions
        - Payment API
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/X-Request-ID'
        - $ref: '#/parameters/X-Correlation-Id'
        - $ref: '#/parameters/JWS-Signature'
        - name: body
          in: body
          required: true
          schema:
            type: object
      responses:
        '200':
          description: |
            200 OK

            Sepa payment query successful
          schema:
            type: object
        '400':
          description: |
            General error response
          schema:
            type: object
        '401':
          description: |
            Access Denied. There is no access token or the api call was made
            with an invalid access token
          schema:
            type: object
      x-amazon-apigateway-integration:
        # https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-swagger-extensions-integration.html
        uri: "https://${stageVariables.APIENV_TARGET_HAPROXY_SEPA_ENDPOINT}/sepa/query"
        responses:
          default:
            statusCode: "200"
        passthroughBehavior: "when_no_match"
        connectionType: "VPC_LINK"
        connectionId: "${stageVariables.APIENV_VPCLINK}"
        httpMethod: "POST"
        type: "http_proxy"
        requestParameters:
          integration.request.header.x-haproxy-endpoint: stageVariables.APIENV_HAPROXY_HEADER_SEPA_VALUE
parameters:
  JWS-Signature:
    in: header
    name: x-jws-signature
    description: "Detached JWT Token"
    required: true
    type: string
  X-Request-ID:
    in: header
    required: true
    description: A unique random UUID that uniquely identifies a request, unique to the call, as determined by the initiating party.
    name: X-Request-ID
    type: string
    format: UUID
  X-Correlation-Id:
    in: header
    required: true
    description: A unique random UUID that uniquely identifies a request / response cycle between the app and the backend. X-Correlation-ID will be used to track requests through all involved services to be able to graph request flows, map how services contribute to response times, identify bottle necks, etc. The X-Correlation-ID must be propagated unchanged in any and all downstream service calls. Multiple calls from the app will potentially have equal X-Correlation-ID values.
    name: X-Correlation-Id
    type: string
    format: UUID
definitions:
  AccountNumber:
    title: AccountNumber
    type: string
    format: IBAN
    description: 'Account number in IBAN format'
    #example: 'HU96120106590163520000100000'
  accountReferenceDomestic:
    title: accountReferenceDomestic
    description: IBAN, of a payment accounts
    type: object
    properties:
      iban:
        $ref: '#/definitions/AccountNumber'
    required:
      - iban
  accountReferenceDomesticWithProxy:
    title: accountReferenceDomesticWithProxy
    description: IBAN, of a payment accounts
    type: object
    properties:
      iban:
        $ref: '#/definitions/AccountNumber'
      proxy:
        $ref: '#/definitions/ProxyIdentifier'
  amount:
    title: amount
    #example:
    #  currency: 'HUF'
    #  amount: '123'
    type: object
    properties:
      currency:
        $ref: '#/definitions/TransactionCurrency'
      amount:
        $ref: '#/definitions/TransactionAmount'
    required:
      - currency
      - amount
  CategoryPurpose:
    title: CategoryPurpose
    type: object
    required:
      - categoryPurposeCode
    properties:
      categoryPurposeCode:
        type: string
        minLength: 1
        maxLength: 4
        description: TODO categoryPurposeProprietary - ExternalCategoryPurpose1Code
        #example: EPAY
  AccountList:
    type: array
    items:
      $ref: '#/definitions/AccountNumber'
  ActivationUrl:
    title: ActivationUrl
    type: string
  ConsentId:
    title: ConsentId
    type: string
    minLength: 1
    maxLength: 10
    description: 'ConsentId referring to the approval of the signer of the payment transaction'
    #example: '439393042'
  ConsentStatus:
    type: string
    enum:
      - IN_PROGRESS
      - APPROVED
      - REVOKED
      - DECLINED
  CountryCode:
    title: CountryCode
    description: ISO 3166 ALPHA2 country code
    #example: HU
    type: string
    pattern: '[A-Z]{2}'
  CreditorDebtorAddress:
    title: CreditorDebtorAddress
    type: object
    properties:
      country:
        $ref: '#/definitions/CountryCode'
      address:
        type: string
        minLength: 1
        maxLength: 140
        description: TODO Address
        #example: Address
  CreditorDebtorName:
    title: CreditorDebtorName
    type: string
    minLength: 1
    maxLength: 70
    description: TODO Name
    #example: Name
  EndToEndIdentification:
    title: EndToEndIdentification
    type: string
    maxLength: 35
    description: TODO endToEndIdentification
    #example: endToEndIdentification
  ErrorDTO:
    type: object
    properties:
      errorId:
        type: string
        description: 'Unique UUID for audit purposes.'
        #example: '8d7b19f3-c97e-4627-b81e-9b6982bb9fc4'
      errorCode:
        type: string
        description: 'Optional error code for reporting purposes.'
        #example: 'ERR001'
      errorDescription:
        type: string
        description: 'The description of the error.'
        #example: 'The description of the error.'
      errorDetails:
        type: array
        items:
          type: object
          properties:
            field:
              type: string
            invalidValue:
              type: string
            errorDescription:
              type: string
  ExpiryDateTime:
    title: ExpiryDateTime
    type: string
    format: date-time
    description: 'Expiry date and time in ISO 8601 format. Past values and values more than 60 days in the future are not allowed.'
    #example: '2020-10-09T15:20:21.087Z'
  InstructionIdentification:
    title: InstructionIdentification
    type: string
    minLength: 1
    maxLength: 35
    description: TODO instructionIdentification Unique id, provided by the API user.
    #example: instructionIdentification
  ISOIdentification:
    title: ISOIdentification
    description: TODO ISOIdentification
    type: object
    required:
      - identificationType
      - identification
    properties:
      identificationType:
        type: string
        description: |
          identificationType

          accepted values: ORG-BIC, ORG-OTHR, PRV-OTHR
        #example: ORG-BIC
      identification:
        type: string
        minLength: 1
        maxLength: 35
        description: TODO identification
        #example: identification
  PackageId:
    type: string
    maxLength: 12
    #example: 'RP0000484365'
    description: TODO trafós HDPKID/DTPKID
  PaymentInformationId:
    type: string
    description: TODO Unique id, provided by the API user.
    #example: '6836502c43dfda20e'
  PaymentInformationStatus:
    type: string
    maxLength: 4
    #example: 'ACCP'
    description: TODO PaymentInformationStatus ISO kód
  BulkPaymentInitiationDomestic:
    title: BulkPaymentInitiationDomestic
    description: Creates domestic payment initiation request at the ASPSP.
    type: object
    required:
      - debtorAccount
      - requestedExecutionDate
      - paymentInformationId
      - payments
    properties:
      debtorAccount:
        $ref: '#/definitions/accountReferenceDomestic'
      debtorIdentification:
        $ref: '#/definitions/ISOIdentification'
      requestedExecutionDate:
        $ref: '#/definitions/RequestedExecutionDate'
      paymentInformationId:
        allOf:
          - $ref: '#/definitions/PaymentInformationId'
          - minLength: 1
          - maxLength: 17
      categoryPurpose:
        $ref: '#/definitions/CategoryPurpose'
      payments:
        type: array
        minItems: 1
        maxItems: 1
        items:
          $ref: '#/definitions/BulkPaymentItem'
  BulkPaymentItem:
    type: object
    required:
      - instructionIdentification
      - instructedAmount
      - creditorName
      - creditorAccount
    properties:
      instructionIdentification:
        $ref: '#/definitions/InstructionIdentification'
      endToEndIdentification:
        $ref: '#/definitions/EndToEndIdentification'
      instructedAmount:
        $ref: '#/definitions/amount'
      ultimateDebtorName:
        $ref: '#/definitions/UltimateDebtorName'
      ultimateDebtorIdentification:
        $ref: '#/definitions/ISOIdentification'
      creditorName:
        $ref: '#/definitions/CreditorDebtorName'
      creditorAddress:
        $ref: '#/definitions/CreditorDebtorAddress'
      creditorIdentification:
        $ref: '#/definitions/ISOIdentification'
      creditorAccount:
        $ref: '#/definitions/accountReferenceDomesticWithProxy'
      ultimateCreditorName:
        $ref: '#/definitions/UltimateCreditorName'
      ultimateCreditorIdentification:
        $ref: '#/definitions/ISOIdentification'
      purposeCode:
        $ref: '#/definitions/PurposeCode'
      remittanceInformationUnstructured:
        $ref: '#/definitions/RemittanceInformationUnstructured'
  QueryPaymentResponse:
    title: queryPaymentResponse
    description: Body of the response for a payment status query.
    type: object
    properties:
      payments:
        title: Payments
        description: TODO List of payments
        type: array
        items:
          type: object
          title: PaymentItem
          description: TODO PaymentItem
          properties:
            transactionIndividualStatus:
              type: string
              maxLength: 4
              #example: 'ACCP'
              description: TODO TransactionIndividualStatus ISO kód
            transactionReason:
              $ref: '#/definitions/transactionReasonWithoutAddInf'
  transactionReason:
    type: object
    properties:
      transactionReasonCode:
        $ref: '#/definitions/TrxStatusReasonCd'
      transactionReasonProprietary:
        $ref: '#/definitions/TrxStatusReasonPrtry'
      transactionReasonAdditionalInformation:
        $ref: '#/definitions/TrxStatusReasonAddInf'
  transactionReasonWithoutAddInf:
    type: object
    properties:
      transactionReasonCode:
        $ref: '#/definitions/TrxStatusReasonCd'
      transactionReasonProprietary:
        $ref: '#/definitions/TrxStatusReasonPrtry'
  TrxStatusReasonCd:
    title: trxStatusReasonCd
    type: string
    description: 'Explanation of the error in case of an ERROR response, otherwise empty.'
    #example: 'TrxStatusReasonCd'
  TrxStatusReasonPrtry:
    title: trxStatusReasonPrtry
    type: string
    description: 'Explanation of the error in case of an ERROR response, otherwise empty.'
    #example: 'TrxStatusReasonPrtry'
  TrxStatusReasonAddInf:
    title: trxStatusReasonAddInf
    type: string
    description: 'Explanation of the error in case of an ERROR response, otherwise empty.'
    #example: 'TrxStatusReasonAddInf'
  paymentGenericResponse:
    title: paymentInitiationRequestResponse
    description: Body of the response for a successful payment initiation request.
    type: object
    properties:
      originalPaymentInformationIdentification:
        $ref: '#/definitions/PaymentInformationId'
      paymentInformationStatus:
        $ref: '#/definitions/PaymentInformationStatus'
      packageId:
        $ref: '#/definitions/PackageId'
      payments:
        title: Payments
        description: TODO List of payments
        type: array
        items:
          $ref: '#/definitions/PaymentGenericResponseItem'
  PaymentGenericResponseItem:
    type: object
    title: PaymentItem
    description: TODO PaymentItem
    properties:
      originalInstructionId:
        $ref: '#/definitions/InstructionIdentification'
      sequenceNumber:
        $ref: '#/definitions/SequenceNumber'
      localReference:
        type: string
        maxLength: 16
        #example: 'ABK19D0000004618'
        description: TODO trafós DTLREF
      transactionIndividualStatus:
        type: string
        maxLength: 4
        #example: 'ACCP'
        description: TODO TransactionIndividualStatus ISO kód
      transactionReason:
        $ref: '#/definitions/transactionReason'
  ProxyIdentifier:
    title: ProxyIdentifier
    type: object
    properties:
      proxyType:
        type: string
        #example: 'TELE'
        enum:
          - 'TELE'
          - 'EMAL'
          - 'TXID'
          - 'TXNB'
      proxyId:
        type: string
        #example: '+36-18775530'
    required:
      - proxyType
      - proxyId
  PurposeCode:
    type: string
    minLength: 1
    maxLength: 4
    description: TODO PurposeCode - ExternalPurpose1Code
    #example: EPAY
  RemittanceInformationUnstructured:
    title: RemittanceInformationUnstructured
    type: string
    minLength: 1
    maxLength: 140
    description: TODO RemittanceInformationUnstructured
    #example: RemittanceInformationUnstructured
  RequestedExecutionDate:
    title: RequestedExecutionDate
    description: 'Requested execution date of the transaction'
    #example: '1993-10-08'
    type: string
    format: date
  SequenceNumber:
    type: string
    maxLength: 8
    #example: '1'
    description: TODO trafós DTSEQ
  TeleId:
    title: TeleId
    type: string
    minLength: 8
    maxLength: 8
    description: TeleId of the signer person
    #example: '87654321'
  TransactionAmount:
    title: TransactionAmount
    type: string
    description: 'Amount of the transaction'
    #example: '1000'
  TransactionCurrency:
    title: TransactionCurrency
    type: string
    pattern: '^[A-Z]{3}$'
    description: 'Currency of the transaction - ISO 4217 Alpha 3 currency code'
    #example: 'HUF'
  UltimateCreditorName:
    title: UltimateCreditorName
    type: string
    maxLength: 70
    description: TODO UltimateCreditorName
    #example: UltimateCreditorName
  UltimateDebtorName:
    title: UltimateDebtorName
    type: string
    maxLength: 70
    description: UltimateDebtorName
    #example: UltimateDebtorName
  CreateConsentRequest:
    type: object
    properties:
      signer:
        $ref: '#/definitions/TeleId'
      expiryDate:
        $ref: '#/definitions/ExpiryDateTime'
      accountList:
        $ref: '#/definitions/AccountList'
    required:
      - signer
      - expiryDate
      - accountList
  CreateConsentResponse:
    type: object
    properties:
      consentId:
        $ref: '#/definitions/ConsentId'
      activationUrl:
        $ref: '#/definitions/ActivationUrl'
  QueryConsentRequest:
    type: object
    required:
      - statusFilterList
      - needExpired
    properties:
      consentId:
        $ref: '#/definitions/ConsentId'
      signer:
        $ref: '#/definitions/TeleId'
      statusFilterList:
        description: List of consent statuses to include in the response
        type: array
        minItems: 1
        maxItems: 4
        items:
          $ref: '#/definitions/ConsentStatus'
      needExpired:
        type: boolean
        #example: true
        description: Include expired consent in the response?
  QueryConsentResponse:
    description: Filtered list of consents
    type: object
    properties:
      consentList:
        type: array
        items:
          $ref: '#/definitions/ConsentDetails'
  ConsentDetails:
    type: object
    title: consent
    description: details of the consent
    properties:
      consentId:
        $ref: '#/definitions/ConsentId'
      signer:
        $ref: '#/definitions/TeleId'
      status:
        $ref: '#/definitions/ConsentStatus'
      expiryDate:
        $ref: '#/definitions/ExpiryDateTime'
      accountList:
        $ref: '#/definitions/AccountList'
  InitiatePaymentRequest:
    type: object
    required:
      - consentList
      - paymentData
    properties:
      consentList:
        type: array
        minItems: 2
        maxItems: 2
        items:
          $ref: '#/definitions/ConsentId'
        #example:
        #  - '16306736'
        #  - '22269914'
      paymentData:
        $ref: '#/definitions/BulkPaymentInitiationDomestic'
  QueryPaymentRequest:
    type: object
    required:
      - paymentInformationId
    properties:
      paymentInformationId:
        $ref: '#/definitions/PaymentInformationId'
      instructionIdentification:
        $ref: '#/definitions/InstructionIdentification'
  QueryBalanceRequestCamt060:
    type: object
    required:
      - consentList
      - AcctRptgReq
    properties:
      consentList:
        type: array
        minItems: 2
        maxItems: 2
        items:
          $ref: '#/definitions/ConsentId'
        #example:
        #  - '16306736'
        #  - '22269914'
      AcctRptgReq:
        $ref: '#/definitions/AcctRptgReq'
  AcctRptgReq:
    required:
      - GrpHdr
      - RptgReq
    properties:
      GrpHdr:
          $ref: '#/definitions/GrpHdr'
      RptgReq:
          $ref: '#/definitions/RptgReq'
  GrpHdr:
    type: object
    required:
      - MsgId
      - CreDtTm
    properties:
      MsgId:
        $ref: '#/definitions/MsgId'
      CreDtTm:
        $ref: '#/definitions/CreDtTm'
  MsgId:
    type: string
    #example: "STMMSGID/20111125/1"
  CreDtTm:
    type: string
    #example: "2011-11-26T05:30:47+02:00"
  RptgReq:
    required:
      - ReqdMsgNmId
      - Acct
      - AcctOwnr
    type: object
    properties:
      ReqdMsgNmId:
        $ref: '#/definitions/ReqdMsgNmId'
      Acct:
        $ref: '#/definitions/Acct'
      AcctOwnr:
        $ref: '#/definitions/AcctOwnr'
  ReqdMsgNmId:
    type: string
    #example: "BALN"
  Acct:
    required:
      - Id
    type: object
    properties:
      Id:
        $ref: '#/definitions/AcctId'
  AcctId:
    type: object
    required:
      - IBAN
    properties:
      IBAN:
        $ref: '#/definitions/AccountNumber'
  AcctOwnr:
    type: object
    required:
      - Pty
    properties:
      Pty:
        $ref: '#/definitions/AcctOwnrPty'
  AcctOwnrPty:
    type: object
    required:
      - Nm
    properties:
      Nm:
        $ref: '#/definitions/PtyNm'
  PtyNm:
    type: string
    #example: "Cash Is King Kft."
  QueryBalanceResponseCamt052:
    type: object
    properties:
      BkToCstmrAcctRpt:
        $ref: '#/definitions/BkToCstmrAcctRpt'
  BkToCstmrAcctRpt:
    type: object
    properties:
      GrpHdr:
        allOf:
          - $ref: '#/definitions/GrpHdr'
          - $ref: '#/definitions/GrpHdrResponse'
      Rpt:
        $ref: '#/definitions/Rpt'
  GrpHdrResponse:
    type: object
    properties:
      OrgnlBizQry:
        $ref: '#/definitions/OrgnlBizQry'
      AddtlInf:
        $ref: '#/definitions/AddtlInf'
  AddtlInf:
    type: string
    #example: "BALN"
  OrgnlBizQry:
    type: object
    properties:
      MsgId:
        $ref: '#/definitions/MsgId'
  Rpt:
    type: object
    properties:
      Id:
        $ref: '#/definitions/MsgId'
      Acct:
        $ref: '#/definitions/AcctWithDetails'
      Bal:
        $ref: '#/definitions/Bal'
  AcctWithDetails:
    type: object
    properties:
      Id:
        $ref: '#/definitions/AcctId'
      Ccy:
        $ref: '#/definitions/TransactionCurrency'
      Nm:
        $ref: '#/definitions/AcctWithDetailsNm'
  AcctWithDetailsNm:
    type: string
    #example: AccountName
  Bal:
    type: array
    items:
      $ref: '#/definitions/BalItems'
  BalItems:
    type: object
    properties:
      Tp:
        $ref: '#/definitions/TpOfBal'
      CdtLine:
        $ref: '#/definitions/CdtLine'
      Amt:
        $ref: '#/definitions/Amt'
      CdtDbtInd:
        $ref: '#/definitions/CdtDbtInd'
      Dt:
        $ref: '#/definitions/Dt'
  CdtDbtInd:
    type: string
    #example: "CRDT"
  Amt:
    type: object
    properties:
      Ccy:
        $ref: '#/definitions/TransactionCurrency'
      Amt:       
        $ref: '#/definitions/TransactionAmount'
  TpOfBal:
    type: object
    properties:
      CdOrPrtry:
        $ref: '#/definitions/CdOrPrtry'
  CdOrPrtry:
    type: object
    properties:
      Cd:
        $ref: '#/definitions/TpOfBalCd'
  TpOfBalCd:
    type: string
    #example: "ITAV"
  CdtLine:
    type: object
    properties:
      Incl:
        $ref: '#/definitions/Incl'
      Amt:
        $ref: '#/definitions/Amt'
  Incl:
    type: string
    #example: "1"
  Dt:
    type: object
    properties:
      DtTm:
        $ref: '#/definitions/CreDtTm'