Skip to main content
If you need the short version, this page answers three things first: which integration modes HaiPay supports, which communication rules apply, and what the API request structure looks like.

1. Integration Methods

Interface TypeAPI Documentation PathBusiness ScopeDescription
Global CashierGlobal (Cashier)Global BusinessOne integration supports multiple payment methods worldwide. The system automatically redirects users to the corresponding country’s payment page based on their IP, allowing users to choose payment methods to complete payment.
Local CashierNorth America, South America, Europe, Asia, Middle East, etc.Single Country BusinessIndependent integration, API synchronously returns payment pages supported by specific countries for users to choose and complete payment.
Pure API Payment InterfaceNorth America, South America, Europe, Asia, Middle East, etc.Single Country BusinessIndependent integration, API synchronously returns relevant information for specific payment methods, facilitating customer-customized payment pages.
Other Payment InterfacesGlobal (International Credit Cards, Credit Card Subscriptions) and StablecoinGlobal BusinessIndependent integration, API synchronously returns payment pages, credit Cards supports subscription deductions.

2. Communication Protocol

When merchants integrate with HaiPay services and call the API, they must follow the rules below:
TypeDescription
TransmissionTo ensure transaction security, HTTPS transmission is required
SubmissionRequests must be submitted using the POST method
Data FormatBoth requests and responses must use application/json format
Character SetUTF-8 character encoding must be used
Signature AlgoSHA256WithRSA
Signature Req.Both request and response data must be signed and verified. See Configuration & Signature Rules for details
SSL/TLS VersionTLSv1.2, TLSv1.3

3. API Structure

Below is the structure for calling HaiPay APIs. The API name is appended to the request URL. The content inside data contains the concatenated payload for different business operations.
POST https://uat-interface.haipay.asia/{currency}/{api_endpoint}
{
    "appId": 1054,
    "orderId": "M233323000059",
    ...
    "sign": "af0gAHkUOyYHu9owQp8NJ4mPEeUW4vuJcjdxqLIzrVw8AvpLSjD1DXupReSG/CyuSkFRyiIvCp5u703AuGGmfgD2gKDH3Ywau41bAbG2jnHJ8mtjiSJ5iWUzanyd4Kr7d1+rETbzUl7/BkW3t0X8UUFdqpxwG8DPUjAwUKfplWDHV7koG51Ozexd80DCsmW6eWdouAZ1uNXGLYmV3ftE3BmfNRtuv1C5bfTJWrTEIOxbF6g2uYOFZTlIgrQgd7/2PsAYwQQXNz8Q8CYl4OxqCv4pXJxaLWPbR5tqZu9og5kn32C9aHW/NlU1y39vzz+4ef81yPAqUV9oHlSMSPrMmw=="
}
Request URL:
EnvironmentURL
Testhttps://uat-interface.haipay.asia
ProductionTo be provided at go-live

4. API List

ProductAPI NameEndpointDescription
CollectionCollection Apply/collect/applyUser makes a payment to the merchant (Top-up)
Collection Query/collect/query
Refund Apply/refund/apply
DisbursementDisbursement Apply/pay/applyMerchant makes a payment to the user (Withdrawal)
Disbursement Query/pay/query
Account BalanceAccount Query/account/ledgerMerchant queries account balance
For details, see API Documentation.

5. Parameters

Common Request Parameters
ParameterRequiredTypeDescription
appIdYesIntegerBusiness ID (retrieved from the backend, must correspond to the currency in the request URL)
signYesStringSignature (see Configuration & Signature Rules)
Request Example:
{
    "appId": 1000,
    "...": "...",
    "sign": "fCywFPOojpRIPi4ph81+CwoAvMXV1va2XR1DQVJeGnZwzNVd0hmvpud7nbP/3lc5JeTVELomruwVTGLtr+BTGT0IweAFTGNvNUuqOs3I4KG5tjvhPM7wm9NtwK2uAX1niLoylt4DcLfy2TeaxPQYDCJJRf7Qm7sDwJX5VoFt8RO9EC2ih+0Ike2+cAyRpIfKENPoIGQbUwvH6KkzHzjljcuvcSqq4D+iZid7up58A866RFrrJH9vkwaF+2mYxa/7awQIwAq8HPOxHkzLfVg74MZC8I1TOKvQAxkAquoNMMyrcAqRIopURfrgEaAtyW/ThPdyduYVlFeMg7BkpGLqZQ=="
}
Common Response Parameters
ParameterRequiredTypeDescription
statusYesString1: Normal, 0: Exception
errorYesStringError code
msgYesStringError description
dataYesObjectBusiness data (included in signature check)
Response Example:
    {
        "status": "1",
        "error": "00000000",
        "msg": "",
        "data": {
            "...": "...",
            "sign": "PWA7B2u1hGr1VRxOCZbRuXQXtJiA6BgPExFnFv73hKJ+zcZfOe/R+y+inlwWcdDBzfix35+dl6raEs/yG/hcYyQOwDQ+mVjIt5wFk6iX7GPw557138yBdAmuMqvWM2IF+omLFcQFJvzfbR84rCyOmebDJlhkYMga5TTFHVLicUx3bPIrOJLoWJHrnZfcVFAJ+P5mUQhMH/cf+YmYZvrqq34pMJh6PcP5vyruJ8aNV0QfyHR42AHLIgp+HnOcZpA0aUzFXM5zpsgXK3QR/KO3vLiKd77UaZNO6g5TN/Ck2MtLkBVxyvIHstgXFXKF1e+uc91FdBHK5nfmrjLQ2wyeUA=="
        }
    }
Error Codes
Error CodeEnglish ResponseDescription
1001param is nullParameter is null
1002Illegal ParamIllegal parameter
1003system exceptionSystem exception (order may already be recorded, awaiting async notification or query for final status)
1004system is busySystem busy (order may already be recorded, awaiting async notification or query for final status)
4005order already exitOrder already exists
4011appId do not exitappId does not exist
4012you do not have an available product, please connect adminMerchant product unavailable, contact administrator
4013order not exitOrder does not exist
4014order is already end statusOrder is already in a final status
4015this merchant do not have a collect bankNo available collection account
4016your account do not have enough moneyInsufficient account balance
4031ip adress is ForbiddenIllegal IP
5012pay in channel not functional, please connect customer serviceSystem exception
Last modified on April 15, 2026