dvcrn/openclaw-skills-marketplace/hongkong-payment-qfpay
- community
Checking that the SKILL.md file is still in the repository.
QFPay API is a comprehensive payment solution that offers various payment methods to meet the needs of different businesses. This skill provides complete API integration guidelines including environment configuration, request formats, signature generation, payment types, supported currencies, and status codes.
Install
npx vskill@latest install dvcrn/openclaw-skills-marketplace/hongkong-payment-qfpaySKILL.md
QFPay Payment API Skill
Overview
QFPay API is a comprehensive payment solution that offers various payment methods to meet the needs of different businesses. This skill provides complete API integration guidelines including environment configuration, request formats, signature generation, payment types, supported currencies, and status codes.
Environment Configuration
QFPay API is accessible via three main environments:
| Environment | Base URL | Description | |
|---|---|---|---|
| Sandbox | https://openapi-int.qfapi.com | For simulating payments without real fund deduction | |
| Testing | https://test-openapi-hk.qfapi.com | Real payment flow but linked to test accounts (no settlement) | |
| Production | https://openapi-hk.qfapi.com | Real live payments with actual settlement |
Important Notes:
- Transactions in Testing environment using test accounts will NOT be settled
- Always ensure refunds are triggered immediately for test transactions
- Mixing credentials or endpoints across environments will result in signature or authorization errors
Environment Variables Setup
Configure these environment variables before using the API:
API Usage Guidelines
Rate Limiting
To ensure fair usage and optimal performance:
- Limit: Maximum 100 requests per second (RPS) and 400 requests per minute per merchant
- Exceeding Limit: API responds with HTTP 429 (Too Many Requests)
Best Practices
- Batch Requests: Use batch processing to minimize individual requests
- Efficient Queries: Utilize filtering and pagination
- Caching: Implement response caching to avoid repeated requests
- Monitoring: Track API usage and implement logging for request patterns
Error Handling
When receiving HTTP 429:
- Pause further requests for a specified duration
- Implement exponential backoff for retries
- Log errors for monitoring
Traffic Spike Management
For anticipated traffic spikes (e.g., promotional events), contact:
- Technical Support: technical.support@qfpay.com
Request Format
HTTP Request
Public Payment Request Parameters
| Attribute | Required | Type | Description | |
|---|---|---|---|---|
txamt | Yes | Int(11) | Transaction amount in cents (100 = $1). Suggest > 200 to avoid risk control | |
txcurrcd | Yes | String(3) | Transaction currency. See Currencies section for full list | |
pay_type | Yes | String(6) | Payment type code. See Payment Types section | |
out_trade_no | Yes | String(128) | External transaction number. Must be unique per merchant account | |
txdtm | Yes | String(20) | Transaction time format: YYYY-MM-DD hh:mm:ss | |
auth_code | Yes (CPM only) | String(128) | Authorization code for scanning barcode/QR. Expires within one day | |
expired_time | No (MPM only) | String(3) | QR expiration in minutes. Default: 30, Min: 5, Max: 120 | |
goods_name | No | String(64) | Item description. Max 20 chars, UTF-8 for Chinese. Required for App payments | |
mchid | No | String(16) | Merchant ID. Required if assigned, must NOT be included if not assigned | |
udid | No | String(40) | Unique device ID for internal tracking | |
notify_url | No | String(256) | URL for asynchronous payment notifications |
HTTP Header Requirements
| Field | Required | Description | |
|---|---|---|---|
X-QF-APPCODE | Yes | App code assigned to merchant | |
X-QF-SIGN | Yes | Signature generated per signature algorithm | |
X-QF-SIGNTYPE | No | Signature algorithm. Use SHA256 or defaults to MD5 |
Content Specifications
- Character Encoding: UTF-8
- Method: POST/GET (depends on endpoint)
- Content-Type: application/x-www-form-urlencoded
Response Format
Success Response Structure
Response Fields
| Field | Type | Description | |
|---|---|---|---|
respcd | String(4) | Return code. "0000" means success | |
respmsg | String(64) | Message description of respcd | |
data | Object | Payment transaction data |
Data Object Fields
| Field | Type | Description | |
|---|---|---|---|
txamt | String | Transaction amount in cents | |
out_trade_no | String | Merchant's original order number | |
txcurrcd | String | Currency code (e.g., HKD) | |
txstatus | String | Payment status: SUCCESS, FAILED, PENDING | |
qf_trade_no | String | QFPay's unique transaction number | |
pay_type | String | Payment method code | |
txdtm | String | Payment time (YYYY-MM-DD HH:mm:ss) |
Signature Verification
Response may include X-QF-SIGN and X-QF-SIGNTYPE headers. Verify by:
- Extracting data fields in sorted order
- Concatenating as key1=value1&key2=value2&...
- Appending client key
- Generating MD5 hash and comparing
Signature Generation
All API requests must include a digital signature in the HTTP header:
Step-by-Step Guide
Step 1: Sort Parameters
Sort all request parameters by parameter name in ASCII ascending order.
Example:
| Parameter | Value | |
|---|---|---|
mchid | ZaMVg12345 | |
txamt | 100 | |
txcurrcd | HKD |
Sorted result:
Step 2: Append Client Key
Append your secret client_key to the string.
If client_key = abcd1234:
Step 3: Hash the String
Hash using MD5 or SHA256 (SHA256 recommended):
Step 4: Add to Header
Important Notes
- Do NOT insert line breaks, tabs, or extra spaces
- Parameter names and values are case-sensitive
- Double-check parameter order and encoding if signature fails
Code Examples
Python
Payment Types
The pay_type parameter specifies which payment method to use. This affects transaction routing and UI requirements.
Note: Not all pay_type values are enabled for every merchant. Contact technical.support@qfpay.com for clarification.
Supported Payment Types
| Code | Description | |
|---|---|---|
| 800008 | CPM for WeChat, Alipay, UnionPay QuickPass, PayMe | |
| 800101 | Alipay MPM (Overseas Merchants) | |
| 800108 | Alipay CPM (Overseas & HK Merchants) | |
| 801101 | Alipay Web Payment (Overseas) | |
| 801107 | Alipay WAP Payment (Overseas) | |
| 801110 | Alipay In-App Payment (Overseas) | |
| 800107 | Alipay Service Window H5 Payment | |
| 801501 | Alipay MPM (HK Merchants) | |
| 801510 | Alipay In-App (HK Merchants) | |
| 801512 | Alipay WAP (HK Merchants) | |
| 801514 | Alipay Web (HK Merchants) | |
| 800201 | WeChat MPM (Overseas & HK) | |
| 800208 | WeChat CPM (Overseas & HK) | |
| 800207 | WeChat JSAPI Payment (Overseas & HK) | |
| 800212 | WeChat H5 Payment | |
| 800210 | WeChat In-App Payment (Overseas & HK) | |
| 800213 | WeChat Mini-Program Payment | |
| 801008 | WeChat Pay HK CPM (Direct Settlement, HK) | |
| 801010 | WeChat Pay HK In-App (Direct Settlement, HK) | |
| 805801 | PayMe MPM (HK Merchants) | |
| 805808 | PayMe CPM (HK Merchants) | |
| 805814 | PayMe Web Payment (HK Merchants) | |
| 805812 | PayMe WAP Payment (HK Merchants) | |
| 800701 | UnionPay QuickPass MPM | |
| 800708 | UnionPay QuickPass CPM | |
| 800712 | UnionPay WAP Payment (HK) | |
| 800714 | UnionPay PC-Web Payment (HK) | |
| 802001 | FPS MPM (HK Merchants) | |
| 803701 | Octopus MPM (HK Merchants) | |
| 803712 | Octopus WAP Payment (HK) | |
| 803714 | Octopus PC-Web Payment (HK) | |
| 802801 | Visa / Mastercard Online | |
| 802808 | Visa / Mastercard Offline | |
| 806527 | ApplePay Online | |
| 806708 | UnionPay Card Offline | |
| 806808 | American Express Card Offline |
Special Remarks
- 801101: Transaction amount must be greater than 1 HKD
- 802001: This payment method does not support refunds
Supported Currencies
All codes follow ISO 4217 format (3-letter uppercase):
| Code | Description | |
|---|---|---|
| AED | Arab Emirates Dirham | |
| CNY | Chinese Yuan | |
| EUR | Euro | |
| HKD | Hong Kong Dollar | |
| IDR | Indonesian Rupiah | |
| JPY | Japanese Yen | |
| MMK | Myanmar Kyat | |
| MYR | Malaysian Ringgit | |
| SGD | Singapore Dollar | |
| THB | Thai Baht | |
| USD | United States Dollar | |
| CAD | Canadian Dollar | |
| AUD | Australian Dollar |
Note: Some payment methods may only support HKD. Verify with your integration manager before non-HKD transactions.
Status Codes
Standard respcd values returned by QFPay API:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/xingstudy--hongkong-payment-qfpay/skills/hongkong-payment-qfpay/SKILL.md
Popularity
- Repository stars
- 24
- Repository forks
- 9
- 7-day trend score
- 16
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/dvcrn/openclaw-skills-marketplace/hongkong-payment-qfpay)