> ## 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.

# Fetch Terminal Payment Session



## OpenAPI

````yaml /openapi-spec.yaml get /v1/terminal/sessions/{id}
openapi: 3.0.3
info:
  title: Xendit in-person payments API (H2H)
  version: 0.5.1
  description: >-
    API specification for Xendit's in-person payments H2H payment sessions and
    command endpoints.
servers:
  - url: https://terminal-dev.xendit.co
    description: Development
  - url: https://terminal.xendit.co
    description: Live
security: []
paths:
  /v1/terminal/sessions/{id}:
    get:
      tags:
        - In-person payments H2H API
      summary: Fetch Terminal Payment Session
      operationId: fetchTerminalPaymentSession
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            pattern: >-
              ^[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}$
          description: Terminal Payment Session ID
      responses:
        '200':
          description: Terminal Payment Session fetched successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TerminalPaymentSessionResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Terminal Payment Session not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - BasicAuth: []
components:
  schemas:
    TerminalPaymentSessionResponse:
      type: object
      required:
        - payment_session_id
        - reference_id
        - business_id
        - session_type
        - mode
        - country
        - currency
        - amount
        - status
        - channel_properties
        - latest_payment_id
        - created
        - updated
      properties:
        payment_session_id:
          type: string
          pattern: >-
            ^[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}$
        latest_payment_id:
          type: string
          pattern: >-
            ^[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}$
        business_id:
          type: string
        reference_id:
          type: string
          example: ref_123456789
        customer_id:
          type: string
          example: cus_123456789
        session_type:
          type: string
          enum:
            - PAY
        currency:
          type: string
          enum:
            - IDR
            - VND
            - THB
            - MYR
        amount:
          type: number
          format: decimal
          minimum: 1
        country:
          type: string
          enum:
            - ID
            - VN
            - TH
            - MY
        mode:
          type: string
          enum:
            - TERMINAL
        status:
          type: string
          enum:
            - ACTIVE
            - COMPLETED
            - FAILED
            - CANCELED
        description:
          type: string
          nullable: true
          example: 'Payment for order #123'
        metadata:
          type: object
          additionalProperties: true
        canceled_at:
          type: string
          nullable: true
          format: date-time
        channel_properties:
          $ref: '#/components/schemas/ChannelProperties'
        created:
          type: string
          format: date-time
          example: '2024-11-06T15:32:42Z'
        updated:
          type: string
          format: date-time
          example: '2024-11-06T15:32:42Z'
    ErrorResponse:
      type: object
      required:
        - error_code
        - message
      properties:
        error_code:
          type: string
          enum:
            - INVALID_REQUEST
            - DUPLICATED_REQUEST
            - UNAUTHORIZED
            - CURRENCY_NOT_SUPPORTED
            - TERMINAL_NOT_FOUND
            - COMMAND_NOT_SUPPORTED
          example: INVALID_REQUEST
        message:
          type: string
          example: 'Missing required parameter: terminal_id'
    ChannelProperties:
      type: object
      required:
        - terminal_id
      properties:
        terminal_id:
          type: string
          example: abcd-3254fsd-3242
        order_id:
          type: string
          example: order-12345
          maxLength: 255
        payment_methods:
          type: array
          nullable: true
          items:
            type: string
            enum:
              - ID_INSERT_CARD
              - ID_CONTACTLESS
              - ID_BRIZZI
              - ID_QRIS
              - VN_CARD
              - VN_QR
              - TH_ALIPAY_PLUS
              - TH_WECHATPAY
              - TH_TRUEMONEY
              - TH_LINEPAY
              - TH_SHOPEEPAY
              - TH_SABUYMONEY
              - TH_MAXME
              - TH_CARD
              - TH_BBL_QRCS
              - TH_MULTIIPP
              - TH_QRCODE
              - MY_QR
              - MY_CARD
              - MY_EWALLET
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic

````