> ## Documentation Index
> Fetch the complete documentation index at: https://nextgen-docs.enfuce.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Send Batch Transactions

> Send a request to this endpoint to trigger a series of transactions in sequence. Each transaction consists of an authorisation description with a series of events.

Each `batchTransactionEvent` combination:

| `messageCategory`        | `messageFunction` | Description                  |
|--------------------------|-------------------|------------------------------|
| `INITIAL_AUTHORIZATION`  | `REQUEST`         | First authorisation       |
| `INITIAL_AUTHORIZATION`  | `ADVICE`          | Authorisation advice         |
| `DECLINED_AUTHORIZATION` | `REQUEST`         | Force-declined authorization |
| `REVERSAL`               | `REQUEST`         | Full reversal                |
| `REVERSAL`               | `ADVICE`          | Reversal advice              |
| `ADJUSTMENT`             | `ADVICE`          | Amount adjustment advice     |




## OpenAPI

````yaml json-files/mycore-test-api.openapi.json post /v1/batch-transactions
openapi: 3.0.3
info:
  version: '1'
  title: Test API
  description: >
    Available in the integration environment. Use this API to simulate payment
    card transactions

    for integration testing and card programme.


    All endpoints require **HTTP Basic Authentication** with the `CAT2_API_ALL`
    role.
servers:
  - url: https://test-api.ext-uat1-sandbox.mycore.enfuce.com/test-api
security:
  - basicAuth: []
tags:
  - name: authorizations
    description: Send authorisation, reversal, advice, and adjustment messages.
  - name: incremental
    description: >-
      Incremental authorisation — add authorized amount on top of an existing
      authorization.
  - name: stip
    description: Stand-In Processing — simulate scheme-initiated authorization decisions.
  - name: batch-transactions
    description: Run a full transaction lifecycle in one call.
  - name: legacy
    description: Legacy load-testing endpoint.
paths:
  /v1/batch-transactions:
    post:
      tags:
        - batch-transactions
      summary: Send Batch Transactions
      description: >
        Send a request to this endpoint to trigger a series of transactions in
        sequence. Each transaction consists of an authorisation description with
        a series of events.


        Each `batchTransactionEvent` combination:


        | `messageCategory`        | `messageFunction` |
        Description                  |

        |--------------------------|-------------------|------------------------------|

        | `INITIAL_AUTHORIZATION`  | `REQUEST`         | First
        authorisation       |

        | `INITIAL_AUTHORIZATION`  | `ADVICE`          | Authorisation
        advice         |

        | `DECLINED_AUTHORIZATION` | `REQUEST`         | Force-declined
        authorization |

        | `REVERSAL`               | `REQUEST`         | Full
        reversal                |

        | `REVERSAL`               | `ADVICE`          | Reversal
        advice              |

        | `ADJUSTMENT`             | `ADVICE`          | Amount adjustment
        advice     |
      operationId: postTransactionsBatch
      parameters:
        - $ref: '#/components/parameters/auditUser'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/transactionBatchRequest'
      responses:
        '200':
          description: Batch request successfully processed
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/batchTransactionResponse'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '500':
          $ref: '#/components/responses/internalServerError'
components:
  parameters:
    auditUser:
      name: auditUser
      in: query
      description: Identifier of the user performing the action, used for audit logging.
      required: true
      schema:
        type: string
  schemas:
    transactionBatchRequest:
      description: A series of transactions sent in sequence.
      type: object
      required:
        - transactions
      properties:
        transactions:
          type: array
          items:
            $ref: '#/components/schemas/batchTransaction'
    batchTransactionResponse:
      description: Result for a single transaction in a batch.
      type: object
      properties:
        id:
          type: string
          description: docId of the processed transaction.
        transactionEventResponses:
          type: array
          items:
            $ref: '#/components/schemas/batchTransactionEventResponse'
    batchTransaction:
      description: A single transaction entry in a batch request.
      type: object
      required:
        - transactionDescription
        - transactionEvents
      properties:
        transactionDescription:
          $ref: '#/components/schemas/authorizationRequest'
        transactionEvents:
          type: array
          items:
            $ref: '#/components/schemas/batchTransactionEvent'
        includeInClearing:
          type: boolean
          description: Whether to include this transaction in clearing.
          default: true
    batchTransactionEventResponse:
      description: Result for a single event within a batch transaction.
      type: object
      properties:
        messageCategory:
          $ref: '#/components/schemas/messageCategory'
        messageFunction:
          $ref: '#/components/schemas/messageFunction'
        response:
          $ref: '#/components/schemas/authorizationResponse'
    errorResponse:
      description: Standard error response.
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        id:
          type: string
          format: uuid
        errorCode:
          type: string
        errorType:
          type: string
          enum:
            - STATIC_VALIDATION_ERROR
            - DYNAMIC_VALIDATION_ERROR
            - INTEGRATION_ERROR
            - SECURITY_ERROR
            - UNEXPECTED_ERROR
        errorReason:
          type: string
        timestamp:
          type: string
          format: date-time
    authorizationRequest:
      description: Request payload of initial authorisation request.
      type: object
      required:
        - card
        - transactionData
        - merchantData
      properties:
        card:
          $ref: '#/components/schemas/cardRequestData'
        transactionData:
          $ref: '#/components/schemas/transactionRequestData'
        merchantData:
          $ref: '#/components/schemas/merchantRequestData'
        threeDsData:
          $ref: '#/components/schemas/threeDsRequestData'
    batchTransactionEvent:
      description: A single event within a batch transaction.
      type: object
      required:
        - messageCategory
        - messageFunction
      properties:
        messageCategory:
          $ref: '#/components/schemas/messageCategory'
        messageFunction:
          $ref: '#/components/schemas/messageFunction'
        adjustedTransactionAmount:
          $ref: '#/components/schemas/moneyAmount'
    messageCategory:
      type: string
      description: Category of the transaction event.
      enum:
        - INITIAL_AUTHORIZATION
        - DECLINED_AUTHORIZATION
        - ADJUSTMENT
        - REVERSAL
    messageFunction:
      type: string
      description: Function of the transaction event.
      enum:
        - REQUEST
        - ADVICE
    authorizationResponse:
      description: Response to the request.
      type: object
      properties:
        metadata:
          type: object
          properties:
            mti:
              type: string
              description: ISO 8583 Message Type Indicator of the response.
              maxLength: 4
              example: '0110'
            id:
              $ref: '#/components/schemas/docId'
        transactionData:
          type: object
          properties:
            authResponseCode:
              $ref: '#/components/schemas/authResponseCode'
            retrievalReferenceNumber:
              $ref: '#/components/schemas/retrievalReferenceNumber'
    cardRequestData:
      description: Card used in the transaction.
      type: object
      required:
        - cardId
      properties:
        cardId:
          type: string
          description: Card identifier.
        applicationSelection:
          $ref: '#/components/schemas/applicationSelection'
    transactionRequestData:
      description: Transaction details.
      type: object
      required:
        - transactionAmount
        - transactionType
        - cardEntryMode
      properties:
        transactionAmount:
          $ref: '#/components/schemas/moneyAmount'
        settlementAmount:
          $ref: '#/components/schemas/moneyAmount'
        transactionType:
          $ref: '#/components/schemas/transactionType'
        cardEntryMode:
          $ref: '#/components/schemas/cardEntryMode'
        transactionDateTime:
          type: string
          format: date-time
          description: >
            Date and time of the transaction in ISO 8601 format with timezone
            offset

            (e.g. `2025-05-21T14:30:00Z`). Defaults to current time if omitted.
          example: '2025-05-21T14:30:00Z'
    merchantRequestData:
      description: Merchant and acquirer data (ISO 8583 DE18, DE32, DE41–43).
      type: object
      required:
        - merchantId
        - merchantName
        - merchantCity
        - merchantCountry
        - merchantCategoryCode
        - acquirerId
        - acquirerCountry
        - terminalId
      properties:
        merchantId:
          type: string
          description: Uniquely identifies the card acceptor (ISO 8583 DE42).
          maxLength: 15
        subMerchantId:
          type: string
          maxLength: 15
        merchantName:
          type: string
          description: Merchant name (part of ISO 8583 DE43).
          maxLength: 25
        merchantCity:
          type: string
          description: City where the transaction occurred (part of ISO 8583 DE43).
          maxLength: 13
        merchantCountry:
          $ref: '#/components/schemas/country'
        merchantCategoryCode:
          type: string
          description: >
            Merchant category code per card scheme classification (ISO 8583
            DE18).

            Use `6011` for ATM transactions.
          maxLength: 4
          example: '5812'
        acquirerId:
          type: string
          description: Financial institution acting as the acquirer (ISO 8583 DE32).
          maxLength: 11
        acquirerCountry:
          $ref: '#/components/schemas/country'
        terminalId:
          type: string
          description: Uniquely identifies the terminal at the merchant (ISO 8583 DE41).
          maxLength: 8
        partialApprovalCapable:
          type: boolean
          description: >-
            Whether the merchant accepts partial approval of the requested
            amount.
    threeDsRequestData:
      description: 3DS authentication data to include in the authorization.
      type: object
      properties:
        eci:
          type: string
          description: >-
            E-Commerce Indicator — the level of security achieved during
            cardholder verification.
        authenticationValue:
          type: string
          description: Cryptographic authentication value from 3DS (CAVV/AAV).
        dsTransactionId:
          type: string
          description: Directory Server Transaction ID.
        protocolVersion:
          type: string
          description: 3DS protocol version used for authentication.
          enum:
            - 2.1.0
            - 2.2.0
    moneyAmount:
      description: A monetary amount with currency.
      type: object
      required:
        - amount
        - currency
      properties:
        amount:
          type: number
          minimum: 0
          example: 25
        currency:
          type: string
          description: ISO 4217 currency code.
          example: EUR
    docId:
      type: string
      description: Unique authorization identifier (internal docId / ISO 8583 DE37).
      maxLength: 18
    authResponseCode:
      type: string
      description: |
        ISO 8583 DE39 response code. Common values:
        - `00` — Approved
        - `05` — Do not honour
        - `51` — Insufficient funds
        - `54` — Expired card
      maxLength: 2
      example: '00'
    retrievalReferenceNumber:
      type: string
      description: |
        Merchant/acquirer reference number (ISO 8583 DE37).
        Stays the same across all messages in a transaction lifecycle.
      maxLength: 12
    applicationSelection:
      type: string
      description: Card application selected for the transaction (for combo cards).
      enum:
        - credit
        - debit
    transactionType:
      type: string
      description: |
        The transaction type.
        - `ATM` requires `merchantCategoryCode: 6011`
      enum:
        - RETAIL
        - CASH
        - ATM
        - CREDIT
        - UNIQUE
        - P2P_CREDIT
        - P2P_DEBIT
        - BALANCE_INQUIRY
    cardEntryMode:
      type: string
      description: How card credentials were captured.
      enum:
        - MANUAL_ENTRY
        - MAGNETIC_STRIPE_READ
        - CHIP_READ
        - CONTACTLESS
        - ELECTRONIC_COMMERCE
    country:
      type: string
      description: ISO 3166-1 alpha-3 country code.
      example: FIN
  responses:
    badRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
    unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
    forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
    internalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: HTTP Basic Auth. Credentials must carry the `CAT2_API_ALL` role.

````