> ## Documentation Index
> Fetch the complete documentation index at: https://doc.haipay.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Ghana — GHS Disbursement Query

> Ghana — GHS Disbursement Query endpoint (POST /ghs/pay/query) with request parameters including appId, orderId, sign, signature verification, and response status.

> [!NOTE]
>
> All example requests on this page are based on the **sandbox (test) environment**. Please be careful to distinguish it from the production environment.

#### Secret Key & Private Key (Generate Signature)

## Related Topics

* [Ghana Payment API](https://doc.haipay.net/en/payments/local/ghana.md)
* [HaiPay API Reference Overview](https://doc.haipay.net/en/api-reference/overview.md)
* [HaiPay Configuration and Signature Guide](https://doc.haipay.net/en/get-started/configuration-and-signatures.md)


## OpenAPI

````yaml docs/en/api-reference/ghs/ghs.openapi.json POST /ghs/pay/query
openapi: 3.0.1
info:
  title: Ghanaian Cedi API
  description: ''
  version: 1.0.0
servers:
  - url: https://uat-interface.haipay.asia
    description: Test environment
security: []
paths:
  /ghs/pay/query:
    post:
      summary: GHS Disbursement Query
      requestBody:
        $ref: '#/components/requestBodies/QueryRequest'
      responses:
        '200':
          $ref: '#/components/responses/PayQueryResponse'
components:
  requestBodies:
    QueryRequest:
      required: true
      content:
        application/json:
          schema:
            type: object
            properties:
              appId:
                type: integer
                format: int64
                description: Business ID
              orderId:
                type: string
                description: Merchant order ID
              orderNo:
                type: string
                description: Platform order ID (optional)
              sign:
                type: string
                description: Signature
            required:
              - appId
              - orderId
              - sign
            additionalProperties: false
          example:
            appId: 1054
            orderId: GHSORDER001
            orderNo: '6023071013539074'
            sign: signature
  responses:
    PayQueryResponse:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PayQueryEnvelope'
          examples:
            success:
              summary: Success
              value:
                status: '1'
                error: '00000000'
                msg: ''
                data:
                  orderId: GHSPAY001
                  orderNo: '3023062014149637'
                  amount: '100.00'
                  fee: '1.00'
                  status: 2
                  payTime: '2026-08-01 12:30:00'
                  errorMsg: ''
                  certificateId: ''
                  sign: signature
            param_error:
              summary: Parameter validation failed
              value:
                status: '0'
                error: '1001'
                msg: orderId can not blank
                data: null
            sign_error:
              summary: Signature error
              value:
                status: '0'
                error: '1002'
                msg: Invalid request signature
                data: null
  schemas:
    PayQueryEnvelope:
      allOf:
        - $ref: '#/components/schemas/EnvelopeBase'
        - type: object
          properties:
            data:
              $ref: '#/components/schemas/PayQueryData'
    EnvelopeBase:
      type: object
      properties:
        status:
          type: string
          description: 'API status: 1 normal, 0 exception'
        error:
          type: string
          description: Error code
        msg:
          type: string
          description: Message
    PayQueryData:
      type: object
      properties:
        orderId:
          type: string
        orderNo:
          type: string
        amount:
          type: string
        fee:
          type: string
        status:
          type: integer
          description: >-
            0 Not Started, 1 Disbursing, 2 Disbursement Successful (final), 3
            Disbursement Failed (final), -1 Exception Pending Confirmation
        payTime:
          type: string
          description: 'Success time in Ghana local time, format: yyyy-MM-dd HH:mm:ss'
        errorMsg:
          type: string
        certificateId:
          type: string
        sign:
          type: string

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.