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

# Hong Kong

<Warning>
  **Before reading this document, please make sure to review [**API Description Guide**](/docs/en/guide/api_description_guide)**
</Warning>

## **限额**

| Transaction Type | Limit Range                   |
| :--------------- | ----------------------------- |
| Collection       | USD: 0.99-499.99, HKD: 1-5000 |

> **Amount Decimal Places:** HKD — 2 decimal places | USD — 2 decimal places

## **Collection API**

### **Collection Request**

**Description:**

* Create a collection order

**URL:**

* HKD: `/hkd/collect/apply`\
  Note: appId HKD, amount HKD, settlement HKD

* USD: `/usd/collect/apply`\
  Note: appId USD, amount USD, settlement USD

**Parameters:**

| Name            | Required | Type   | Description                                                                                                                                                        |
| :-------------- | :------- | :----- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| appId           | Yes      | Long   | Business ID (retrieved from the backend, must correspond to the currency in the URL)                                                                               |
| orderId         | Yes      | String | Merchant order number (must be unique, max length: 48)                                                                                                             |
| name            | Yes      | String | Customer name, recommended to use the real name. Format: firstName + lastName separated by a space, e.g. `John Doe`                                                |
| phone           | Yes      | String | Real phone number (format reference: [Phone Format](/docs/en/guide/frequently_asked_question#en_faq_phone-number-format))                                          |
| email           | Yes      | String | Valid email address                                                                                                                                                |
| amount          | Yes      | String | Transaction amount, up to 2 decimal places                                                                                                                         |
| payType         | Yes      | String | Transaction type                                                                                                                                                   |
| inBankCode      | Yes      | String | [Payment method](#inBankCode)                                                                                                                                      |
| callBackUrl     | Yes      | String | Redirect URL after successful payment                                                                                                                              |
| callBackFailUrl | Yes      | String | Redirect URL after failed payment                                                                                                                                  |
| cancelUrl       | No       | String | If provided, the payment page displays a Back button that redirects the user to this URL when clicked.                                                             |
| notifyUrl       | No       | String | Notification URL                                                                                                                                                   |
| subject         | No       | String | Payment note                                                                                                                                                       |
| body            | No       | String | Payment details                                                                                                                                                    |
| partnerUserId   | Yes      | String | Unique user identifier (e.g., userId). Must be valid, otherwise it may affect risk control. Allowed characters: digits, letters, and common symbols `-~!@#$%&*()_` |
| sign            | Yes      | String | Signature                                                                                                                                                          |

**Response Data**

| Name    | Type   | Description                            |
| :------ | :----- | :------------------------------------- |
| orderId | String | Merchant order number (must be unique) |
| orderNo | String | Platform order number                  |
| payUrl  | String | Payment URL                            |
| sign    | String | Signature                              |

***

### **Collection Query**

**Description:**

* Query collection order

**URL:**

* HKD: `/hkd/collect/query`

* USD: `/usd/collect/query`

**Parameters:**

| Name    | Required | Type   | Description                                                                          |
| :------ | :------- | :----- | :----------------------------------------------------------------------------------- |
| appId   | Yes      | Long   | Business ID (retrieved from the backend, must correspond to the currency in the URL) |
| orderId | Yes      | String | Merchant order number                                                                |
| orderNo | No       | String | Platform order number (faster response)                                              |
| sign    | Yes      | String | Signature                                                                            |

**Response Data**

| Name         | Type    | Description                                                                                             |
| :----------- | :------ | :------------------------------------------------------------------------------------------------------ |
| orderId      | String  | Merchant order number (must be unique)                                                                  |
| orderNo      | String  | Platform order number                                                                                   |
| amount       | String  | Transaction amount                                                                                      |
| actualAmount | String  | Amount received                                                                                         |
| fee          | String  | Fee                                                                                                     |
| status       | Integer | Status (0: Not started, 1: Processing, 2: Success (final), 3: Failed (final), -1: Pending confirmation) |
| payTime      | String  | Payment success time (present when status=2)(local currency time), <br />format: `yyyy-MM-dd HH:mm:ss`  |
| errorMsg     | String  | Error message (present when status=3)                                                                   |
| sign         | String  | Signature                                                                                               |

***

### **Payment Methods** <a id="inBankCode" />

| Currency | Payment Type (payType) | Payment Code (inBankCode) | Limit       | Status      | Description               |
| :------- | :--------------------- | :------------------------ | :---------- | :---------- | :------------------------ |
| HKD      | EWALLET                | WXPAY\_SCANCODE           | 1-1000      | Available   | WeChat HK QR Code Payment |
| HKD      | EWALLET                | ALIPAY\_HKD               | 1-5000      | Available   | AlipayHK                  |
| USD      | EWALLET                | HK\_WXPAY\_SCANCODE\_USD  | 0.99-120    | Available   | WeChat HK QR Code Payment |
| USD      | BANK\_TRANSFER         | ALIPAY\_USD               | 0.99-499.99 | Available   | AlipayHK                  |
| USD      | BANK\_TRANSFER         | PAYME\_USD                | 1-1000      | Maintenance | PayMe                     |

## Related Topics

* [Common API](/docs/en/api/version2/CommonApi)
* [HaiPay API Description and Common Rules](/docs/en/guide/api_description_guide)
* [Taiwan Payment API](/docs/en/api/version2/Taiwan)
