Errors
Error
json
{
"code": 409,
"label": "64",
"message": "Refund or capture currency does not match the original transaction currency."
}When an API request fails, NihaoPay will return an error object.
NihaoPay errors follow conventional HTTP status codes. A 2xx code indicates request success; therefore, you will not see any of these codes in the error object. A 4xx code indicates an error in the information provided. These could be anything from a malformed request, an unauthenticated request, or an unknown endpoint. A 5xx code indicates NihaoPay’s internal server error.
There are certain features that are not yet available but are documented in this API Reference. Requesting those features from the API will result in a 501 error.
Feel free to contact our tech support team at tech_support@nihaopay.com if you encounter errors.
Error Object
| Property | Description |
|---|---|
codeint | HTTP status code. |
labelstring | Label of the error generated by NihaoPay. Support team may ask for this to help with integration questions. |
messagestring | A human readable message as to the cause of the encountered error. |
Error List
| code | label | message |
|---|---|---|
| 200 | 00 | Success |
| 402 | 01 | Transaction failed. Please try again. |
| 402 | 02 | Cardholder input an incorrect card number. |
| 402 | 03 | Cardholder's issuing bank prevented the transaction. |
| 402 | 06 | Customer input an expired card number. |
| 402 | 11 | Customer has insufficient funds available. |
| 402 | 14 | Cardholder input an incorrect expiration date. |
| 402 | 15 | Cardholder authentication failed. Please verify cardholder's information. |
| 402 | 21 | Cardholder authentication failed. Please verify cardholder's information. |
| 402 | 22 | Card state is incorrect. |
| 402 | 30 | The amount exceeds transaction limit placed. |
| 400 | 31 | Transaction reference number must be unique. Please re-submit. |
| 400 | 32 | This payment channel is restricted. Please contact NihaoPay customer service. |
| 409 | 33 | Transaction failed. Information submitted in a repeat transaction must match the original attempted transaction exactly. |
| 402 | 36 | Transaction exceeds the cardholder's credit limit. |
| 429 | 39 | Too many transactions attempts by cardholder. |
| 402 | 56 | Cardholder's chosen payment card is not supported in this Gateway. |
| 402 | 57 | Cardholder has not activated online payments with their issuing bank. |
| 404 | 59 | Failed. Transaction have refund or chargeback. |
| 404 | 60 | Transaction has been cleared, please request refund. |
| 402 | 61 | Transaction not found. |
| 402 | 62 | Transaction is not within the acceptance time range. |
| 402 | 63 | The original transaction failed. You cannot refund, cancel, capture, or release an unsuccessful transaction. |
| 409 | 64 | Refund or capture currency does not match the original transaction currency. |
| 409 | 65 | Transaction has previously been cancelled. |
| 409 | 66 | Failed to refund transaction. Transaction has previously been fully refunded. |
| 402 | 67 | Failed to refund transaction. Refund amount exceeds original transaction amount or remaining transaction balance . |
| 402 | 68 | Failed to capture transaction. Transaction has previously been released. |
| 402 | 69 | Failed to capture transaction. Transaction has previously been captured. |
| 402 | 70 | Failed to capture transaction. Capture amount exceeds authorization amount. |
| 402 | 71 | Buyer not exist or buyer account info error |
| 402 | 72 | Transaction amount is exceed the limit |
| 500 | 81 | Merchant config error |
| 500 | 82 | Merchant unavailable |
| 500 | 83 | QRcode has expired |
| 500 | 84 | Service is not activated for this account |
| 402 | 86 | Withdrawal amount exceeds account balance |
| 402 | 87 | Withdrawal amount less than the minimum withdrawal amount |
| 402 | 88 | Invalid application, it's only available for manually withdrawal merchant |
| 400 | 90 | The field not valid. |
| 500 | 91 | Signature error |
| 500 | 92 | The {0} field is required. |
| 404 | 93 | The Exchange rate not found. |
| 500 | 96 | Timeout |
| 500 | 97 | Inner error |
| 500 | 98 | Vendor error |
| 500 | 99 | System error |
| 401 | 301 | Invalid merchant credentials provided |
