When you encounter an error while calling the PayKKa API,there are two possible cases:
- Non-
200HTTP Code is returned
This is a standard PayKKa response. We recommend checking the request based on the returned
ret_codeandret_msg.
{
"ret_code": "010000",
"ret_msg": "Invalid request"
}
{
"ret_code": "1004",
"ret_msg": "Merchant does not support this payment method"
}200HTTP Code is returned,but the response body contains additional business error details
For example,in a transaction request,although the request itself was successful,a business error is returned with the parameters
error_codeanderror_description.
We recommend handling business errors appropriately to ensure a smooth experience for your customers.Note: The business parameters may vary for different APIs.
{
"ret_code": "000000",
"ret_msg": "Success",
"data": {
"error_code": "2099",
"error_description": "Invalid Card",
"merchant_id": "18356675194960",
"trans_id": "T4329476032",
"order_id": "GW206194332333335",
"status": "FAILURE",
"amount": 322,
"currency": "HKD"
}
}| Parameter Name | Description | Type | Required |
|---|---|---|---|
ret_code | Response error code | String | ✅ |
ret_msg | Response error message | String | ✅ |
data | Response business data,may be empty if the business fails | Object | ❌ |
| Code | Description |
|---|---|
000000 | Request successful |
999999 | System exception |
010000 | Invalid request,parameter error |
Transaction error codes see Transaction Error Codes for more details.