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

# Transaction List

> The application stores a running 24-hour history of past transactions.



## OpenAPI

````yaml /openapi-spec-c2c.yaml post /commands/histories
openapi: 3.1.0
info:
  title: Xendit in-person payments API (C2C)
  description: >-
    This specification documents the client-to-client command API for Xendit
    in-person payments. Use it for local-network terminal commands such as pay,
    cancel, receipt, settlement, and transaction history.
  version: 1.3.0
servers:
  - url: http://{IP_ADDRESS}:{PORT}
    description: Client-to-Client Endpoint
    variables:
      IP_ADDRESS:
        default: 172.0.0.1
        description: The IP address displayed on the Terminal Gateway App main screen.
      PORT:
        default: '8189'
        description: The port number configured in the Terminal Gateway App.
  - url: https://{IP_ADDRESS}:{PORT}
    description: Secure Client-to-Client Endpoint
    variables:
      IP_ADDRESS:
        default: 172.0.0.1
        description: The IP address displayed on the Terminal Gateway App main screen.
      PORT:
        default: '8189'
        description: The port number configured in the Terminal Gateway App.
security:
  - ApiKeyAuth: []
tags:
  - name: In-person payments C2C API
    description: Payment operations and transactions
paths:
  /commands/histories:
    post:
      tags:
        - In-person payments C2C API
      summary: Transaction List
      description: The application stores a running 24-hour history of past transactions.
      operationId: getTransactionHistory
      parameters:
        - name: provider
          in: header
          required: true
          schema:
            type: string
            enum:
              - BRI
              - NTT
              - CASHUP
              - SHC
          description: Provider name.
        - name: simulation
          in: header
          required: false
          schema:
            type: boolean
          description: Simulation/mock response flag.
          example: false
        - name: pretty-print
          in: header
          required: false
          schema:
            type: boolean
          description: Json Pretty Formatter flag.
          example: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HistoriesRequest'
            example:
              commands:
                - PAY
              statuses:
                - SUCCESS
              from: '2025-06-17T15:00:00.000Z'
              to: '2025-06-20T15:00:00.000Z'
      responses:
        '200':
          description: A list of transaction histories.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HistoriesResponse'
              example:
                histories:
                  - order_id: test1223323
                    terminal_id: '10362517'
                    terminal_reference: 1750407594445|1750407594
                    payment_method: QRIS
                    amount: 100
                    currency: IDR
                    transaction_date: '2025-06-20T08:19:54.000Z'
                    status: SUCCESS
        '400':
          description: Bad request - invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error_code: INVALREQUEST
                message: Invalid date range
        '401':
          description: Unauthorized - invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error_code: INVALCREDENTIAL
                message: Invalid API key
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error_code: INTERNAL_SERVER_ERROR
                message: Internal server error
        default:
          description: An error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    HistoriesRequest:
      allOf:
        - type: object
          properties:
            commands:
              type:
                - array
                - 'null'
              items:
                type: string
                enum:
                  - PAY
              description: List of command types to filter by.
              example:
                - PAY
            statuses:
              type: array
              items:
                $ref: '#/components/schemas/TransactionStatus'
              description: List of statuses to filter by.
              example:
                - SUCCESS
            from:
              type:
                - string
                - 'null'
              format: date-time
              description: Start date-time for the filter (ISO 8601 format).
              example: '2025-06-17T15:00:00.000Z'
            to:
              type:
                - string
                - 'null'
              format: date-time
              description: End date-time for the filter (ISO 8601 format).
              example: '2025-06-20T15:00:00.000Z'
    HistoriesResponse:
      allOf:
        - type: object
          required:
            - histories
          properties:
            histories:
              type: array
              description: A list of past transactions.
              items:
                $ref: '#/components/schemas/PaymentResponse'
    Error:
      type: object
      required:
        - error_code
        - message
      properties:
        error_code:
          $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
          description: Error message.
          example: Transaction Failed
    TransactionStatus:
      type: string
      enum:
        - SUCCESS
        - FAILED
      description: Transaction status values
      example: SUCCESS
    PaymentResponse:
      allOf:
        - $ref: '#/components/schemas/BaseResponse'
        - type: object
          required:
            - order_id
            - status
          properties:
            order_id:
              type: string
              description: >-
                Merchant's order ID. Uses only letters and numbers
                (alphanumeric). Hyphens, underscores, and other special
                characters are not allowed and may cause the transaction to fail
                to execute or complete.
              example: test1223323
    ErrorCode:
      type: string
      enum:
        - INVALCREDENTIAL
        - INVALREQUEST
        - INTERNAL_SERVER_ERROR
        - UNKNOWN_ERROR
        - KEY_INVALID
        - SEND_FAILED
        - NOT_CONNECTED
        - FAILED_TO_CONNECT
        - UNSUPPORTED
        - TERMINAL_BUSY
        - ENCRYPTION_FAILED
        - DECLINED_BY_READER
        - PAYMENT_UNPAID
        - DUPLICATED
        - CANCELLED
        - TIMEOUT
        - NO_DATA_FOUND
        - VOFAILED
        - REFUNDED
        - NEED_DO_SETTLEMENT
        - CHIP_CARD_DETECTED
        - TRANSACTION_FAILED
        - TNOT_SET
        - TNOT_MATCH
        - TNOT_FOUND
        - AUTHENTICATION_FAILED
        - WRONG_PIN
      description: Error codes returned by the API
      example: INVALREQUEST
    BaseResponse:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/TransactionStatus'
        terminal_reference:
          type: string
          description: Reference for Void & Receipt.
          example: 1750407594445|1750407594
        payment_method:
          $ref: '#/components/schemas/PaymentMethod'
        amount:
          type: number
          format: double
          minimum: 0
          description: The transaction amount.
          example: 100
        currency:
          type: string
          minLength: 3
          maxLength: 3
          description: The transaction currency (ISO 4217).
          example: IDR
        transaction_date:
          type: string
          format: date-time
          description: The date and time of the transaction.
          example: '2025-06-20T08:19:54.000Z'
    PaymentMethod:
      type: string
      enum:
        - CARD
        - EWALLET
        - QRIS
      description: Available payment methods
      example: QRIS
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: API key for authentication

````