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

# Create Terminal commands



## OpenAPI

````yaml /openapi-spec.yaml post /v1/terminal/commands
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/commands:
    post:
      tags:
        - In-person payments H2H API
      summary: Create Terminal commands
      operationId: PushTerminalCommands
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PushCommandRequest'
      responses:
        '200':
          description: Create command successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PushCommandResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - BasicAuth: []
components:
  schemas:
    PushCommandRequest:
      type: object
      properties:
        terminal_id:
          type: string
          example: abcd-3254fsd-3242
        type:
          type: string
          enum:
            - PRINT_RECEIPT
            - SETTLE
            - QUERY
        properties:
          $ref: '#/components/schemas/CommandProperties'
      required:
        - terminal_id
        - type
    PushCommandResponse:
      type: object
      properties:
        id:
          type: string
          example: abcd-3254fsd-3242
        status:
          type: string
          enum:
            - ACTIVE
            - COMPLETED
          example: ACTIVE
        terminal_id:
          type: string
          example: abcd-3254fsd-3242
        business_id:
          type: string
          example: abcd-3254fsd-3242
        type:
          type: string
          enum:
            - PRINT_RECEIPT
            - SETTLE
            - QUERY
          example: PRINT_RECEIPT
        created:
          type: string
          format: date-time
          example: '2024-11-06T15:32:42Z'
        updated:
          type: string
          format: date-time
          example: '2024-11-06T15:32:42Z'
      required:
        - id
        - status
        - terminal_id
        - business_id
        - type
    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'
    CommandProperties:
      type: object
      properties:
        order_id:
          type: string
          example: order-12345
        payment_method:
          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

````