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

# GHS Collection Application

<div class="flex flex-col gap-4">
  <div class="api-section-heading flex flex-col gap-y-4 w-full">
    <div class="flex items-baseline border-b pb-2.5 border-gray-100 dark:border-gray-800 w-full">
      <h4 class="api-section-heading-title flex-1 mb-0">Secret Key & Private Key (Generate Signature)</h4>
    </div>

    <div />
  </div>

  <input id="secret-key" placeholder="Secret Key" class="px-3 py-2 border rounded-md" />

  <input id="private-key" placeholder="Private Key" class="px-3 py-2 border rounded-md" />
</div>

## Related Topics

* [Ghana Payment API](/docs/en/api/version2/Ghana)
* [HaiPay API Reference Overview](/docs/en/api-reference/overview)
* [HaiPay Configuration and Signature Guide](/docs/en/guide/config_settings_and_signature_rules_guide)


## 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://merchant.example.com/success
              notifyUrl: https://merchant.example.com/notify
              sign: signature
      responses:
        '200':
          $ref: '#/components/responses/CollectApplyResponse'
components:
  responses:
    CollectApplyResponse:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CollectApplyEnvelope'
  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

````