> ## 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 Collection Query

> Ghana — GHS Collection Query endpoint (POST /ghs/collect/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/history/V20260801/payments/local/ghana.md)
* [HaiPay API Reference Overview](https://doc.haipay.net/en/history/V20260801/api-reference/overview.md)
* [HaiPay Configuration and Signature Guide](https://doc.haipay.net/en/history/V20260801/get-started/configuration-and-signatures.md)


## OpenAPI

````yaml docs/en/api-reference/ghs/ghs.openapi.json POST /ghs/collect/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/collect/query:
    post:
      summary: GHS Collection Query
      requestBody:
        $ref: '#/components/requestBodies/QueryRequest'
      responses:
        '200':
          $ref: '#/components/responses/CollectQueryResponse'
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:
    CollectQueryResponse:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CollectQueryEnvelope'
          examples:
            success:
              summary: Success
              value:
                status: '1'
                error: '00000000'
                msg: ''
                data:
                  orderId: GHSCOLLECT001
                  orderNo: '6023071013539074'
                  amount: '100.00'
                  actualAmount: '100.00'
                  fee: '1.00'
                  status: 2
                  payTime: '2026-08-01 12:30:00'
                  errorMsg: ''
                  inBankCode: MTN
                  currency: GHS
                  originalCurrency: GHS
                  floatExchangeRate: '1'
                  originalAmount: '100.00'
                  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:
    CollectQueryEnvelope:
      allOf:
        - $ref: '#/components/schemas/EnvelopeBase'
        - type: object
          properties:
            data:
              $ref: '#/components/schemas/CollectQueryData'
    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
    CollectQueryData:
      type: object
      properties:
        orderId:
          type: string
        orderNo:
          type: string
        amount:
          type: string
        actualAmount:
          type: string
        fee:
          type: string
        status:
          type: integer
          description: >-
            0 Not Started, 1 Collecting, 2 Collection Successful (final), 3
            Collection 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
        inBankCode:
          type: string
        currency:
          type: string
        originalCurrency:
          type: string
        floatExchangeRate:
          type: string
        originalAmount:
          type: string
        certificateId:
          type: string
        sign:
          type: string

````

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