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

> Ghana — GHS Collection Application endpoint (POST /ghs/collect/apply) with request parameters including orderId, amount, payType, phone, 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)
* [Ghana — GHS Collection Query (POST /ghs/collect/query)](https://doc.haipay.net/en/history/V20260801/api-reference/ghs/collect-query.md)
* [Handle Asynchronous Notifications and Verify Signatures](https://doc.haipay.net/en/history/V20260801/operations/callback.md)
* [Look Up Collection Payment Types and Codes (payType)](https://doc.haipay.net/en/history/V20260801/resources/cashin-code-list.md)


## OpenAPI

````yaml docs/en/api-reference/ghs/ghs.openapi.json POST /ghs/collect/apply
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/apply:
    post:
      summary: GHS Collection Application
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                appId:
                  type: integer
                  format: int64
                  description: >-
                    Business ID obtained from the backend; it must match the URL
                    currency
                orderId:
                  type: string
                  maxLength: 48
                  description: Unique merchant order ID, up to 48 characters
                amount:
                  type: string
                  pattern: ^((([1-9]\d*)(\.\d{1,4})?)|(0\.(?!0+$)\d{1,4}))$
                  description: >-
                    Transaction amount in GHS, up to 2 decimal places; subject
                    to the merchant backend business configuration
                payType:
                  type: string
                  enum:
                    - EWALLET
                  description: Payment type; only EWALLET is supported
                inBankCode:
                  type: string
                  description: >-
                    Mobile Money operator payment code supported by the merchant
                    backend payment-code configuration
                name:
                  type: string
                  description: Payer name
                phone:
                  type: string
                  pattern: ^233\d{9}$
                  description: >-
                    Payer phone number: 12 digits starting with 233, without a
                    plus sign
                email:
                  type: string
                  format: email
                  description: Payer email
                callBackUrl:
                  type: string
                  format: uri
                  description: Redirect URL after successful payment
                callBackFailUrl:
                  type: string
                  format: uri
                  description: Redirect URL after failed payment
                notifyUrl:
                  type: string
                  format: uri
                  description: Asynchronous notification URL
                subject:
                  type: string
                  description: Transaction title, product name, or payment reason
                body:
                  type: string
                  description: Detailed remark
                partnerUserId:
                  type: string
                  maxLength: 64
                  pattern: ^[a-zA-Z0-9\-~!@#$%&*()_]+$
                  description: Unique user identifier
                sign:
                  type: string
                  description: Signature
              required:
                - appId
                - orderId
                - amount
                - payType
                - phone
                - sign
              additionalProperties: false
            example:
              appId: 1054
              orderId: GHSCOLLECT001
              amount: '100.00'
              payType: EWALLET
              inBankCode: operator-code
              phone: '233241234567'
              callBackUrl: https://shop.merchant.com/payment/success
              notifyUrl: https://api.merchant.com/webhooks/haipay
              sign: signature
      responses:
        '200':
          $ref: '#/components/responses/CollectApplyResponse'
components:
  responses:
    CollectApplyResponse:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CollectApplyEnvelope'
          examples:
            success:
              summary: Success
              value:
                status: '1'
                error: '00000000'
                msg: ''
                data:
                  orderId: GHSCOLLECT001
                  orderNo: '6023071013539074'
                  amount: '100.00'
                  exchangeRate: '1'
                  orderAmount: '100.00'
                  payUrl: https://pay.haipay.asia/cashier/1L9zQS2
                  description: Complete the Mobile Money authorization
                  expiryPeriod: 15
                  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:
    CollectApplyEnvelope:
      allOf:
        - $ref: '#/components/schemas/EnvelopeBase'
        - type: object
          properties:
            data:
              $ref: '#/components/schemas/CollectApplyData'
    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
    CollectApplyData:
      type: object
      properties:
        orderId:
          type: string
        orderNo:
          type: string
        amount:
          type: string
        exchangeRate:
          type: string
        orderAmount:
          type: string
        payUrl:
          type: string
          description: Payment URL for OTP, STK Prompt, or redirect authorization flows
        description:
          type: string
        expiryPeriod:
          type: integer
          description: Remaining payment validity in minutes
        sign:
          type: string

````

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