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

# Void a Terminal Payment



## OpenAPI

````yaml /openapi-spec.yaml post /v1/terminal/payments/{id}/void
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/payments/{id}/void:
    post:
      tags:
        - In-person payments H2H API
      summary: Void a Terminal Payment
      operationId: voidPayment
      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 ID
      responses:
        '200':
          description: Terminal void request created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VoidPaymentResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Terminal Payment not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - BasicAuth: []
components:
  schemas:
    VoidPaymentResponse:
      type: object
      properties:
        code:
          type: string
          example: SUCCESS
        error_code:
          type: string
          example: ''
        message:
          type: string
          example: Void request created successfully
    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'
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic

````