Error handling
HTTP statuses
We use HTTP statuses for our response as per the HTTP specification
| Status range | Description |
|---|---|
| 2xx | indicates a successful request |
| 4xx | indicates there is a problem with the client's request |
| 5xx | indicates there is a problem with The Kingdom Bank's servers/infrastructure. In this case it is The Kingdom Bank's responsibility to fix the issue |
If you receive a 4xx HTTP status response, it is safe to retry the request after fixing the root cause of the problem (either your request parameters or your account configuration).
In the case of a socket timeout or a 5xx HTTP status response where the exact reason for the failure is unknown, it's usually not safe to resend the same request, as it may have already been processed by our servers.
In these cases it's better to double-check that no transaction occurred or contact us with the traceId from the error response. Additionally, if we did process your request, a subsequent call with the same foreignTransactionId
will be denied by our system.
A 503 response with code 1042 means the system is under maintenance and the request was rejected before processing; it is safe to
retry later.
Error codes
For responses in the 4xx range we usually give a numeric error code and a description on what went wrong and what the client should do in order to correct the error. We use the same error codes when sending webhooks for failed transactions.
Common error codes (request related)
| Code | Message |
|---|---|
| 500 | General error |
| 510 | Provider timed out |
| 1000 | Please provide X-Api-Key and X-Api-Secret headers with your request |
| 1001 | The credentials provided with the request are invalid |
| 1002 | The request signature is invalid |
| 1003 | An X-Signature header containing the request body signature must be present with your request |
| 1004 | An X-Signature-Key-Id header must be present with your request |
| 1005 | The specified signature key was not found or is inactive |
| 1006 | Your IP is not whitelisted |
| 1020 | The request body is missing |
| 1021 | The request is not parseable |
| 1022 | Malformed request syntax |
| 1023 | Required query parameter is missing |
| 1024 | Required request part is missing |
| 1025 | Path parameter is invalid |
| 1026 | HTTP Method not allowed |
| 1027 | Unsupported media type |
| 1028 | No transaction identifying parameter provided |
| 1029 | Invalid request body |
| 1040 | Rate limit reached |
| 1041 | Too many requests |
| 1042 | System is under maintenance |
| 1050 | Your merchant account is not active |
| 1051 | The requested feature is not enabled on your account |
| 1052 | Invalid account configuration, please contact support |
| 1053 | Invalid account configuration, please contact support |
| 1054 | Invalid account configuration, please contact support |
| 1055 | Action not allowed (e.g. API IBAN issuing is not enabled on your account) |
General payment errors
| Code | Message |
|---|---|
| 2000 | Request validation failed |
| 2001 | Account not found |
| 2002 | A payment with the specified foreign transaction ID already exists |
| 2010 | Requested time period is too large. Maximum is 1 year |
| 2011 | nextPageId token is invalid |
| 2012 | Requested pageSize is too large. Maximum is 10 000 |
| 2013 | Invalid include parameter |
| 2020 | The specified original transaction was not found |
| 2021 | The specified original transaction is not in a processed status |
| 2022 | Payment request not found |
| 2030 | Not enough balance in your account |
| 2040 | Destination bank account details are invalid |
| 2041 | Destination bank account cannot be used for transfer |
| 2050 | Payment provider returned an error |
| 2051 | Transaction received after the cut-off time |
| 2052 | Beneficiary waiting verification |
| 2053 | Balance not enough |
| 2060 | Payment abandoned by customer |
| 2061 | Transaction expired |
Payment related errors
| Code | Message |
|---|---|
| 3000 | Payment currency is not supported |
| 3001 | Customer country is not supported |
| 3002 | Transaction type is not eligible for webhook simulation |
| 3010 | Invalid first name |
| 3011 | Invalid last name |
| 3012 | Invalid email |
| 3013 | Invalid phone number |
| 3014 | Address must not be empty |
| 3015 | City must not be empty |
| 3016 | Invalid state |
| 3017 | Invalid postal code |
| 3018 | The external wallet with the specified identifier does not exist |
| 3019 | Invalid account |
| 3020 | Holder name must be written in full width katakana |
| 3021 | Invalid voucher details |
| 3022 | Voucher currency does not match |
| 3023 | Voucher amount is exceeded |
| 3025 | Account number must not be empty |
| 3026 | Holder name must not be empty |
| 3027 | Incompatible account number and recipient name |
| 3028 | Document is invalid |
| 3029 | Document is missing |
| 3030 | Account details are invalid |
| 3031 | Payment was unsuccessful. Verify your payment details or try a different method |
| 3032 | The recipient's account has been restricted by the user through the provider portal |
| 3033 | Mobile number not registered |
| 3034 | Invalid account number |
| 3035 | Invalid BIC/SWIFT code |
| 3100 | The transaction has been declined by the provider |
| 3101 | The transaction has been declined by the customer |
| 3102 | The transaction has been declined by the customer's bank |
| 3103 | The transaction has been declined due to network error |
| 3104 | The transaction has been cancelled |
| 3105 | The transaction was processed but not confirmed during the cancellation period and has been auto-cancelled |
| 3106 | The transaction was scheduled but not confirmed during the cancellation period and has been auto-failed |
| 3110 | Invalid transaction provided by the merchant or transaction sent to the provider was invalid or not found |
| 3130 | Maximum number of incomplete transactions reached |
| 3150 | Unable to complete the request |
| 3151 | The transaction request has been declined |
| 3152 | The transaction request has been declined due to network error |
| 3200 | The customer has failed to answer the security question correctly |
| 3201 | The customer has failed to answer the security otp correctly |
| 3202 | Authentication failed |
| 3600 | Volume limit reached |
| 3601 | Limit validation failed |
| 3602 | Transaction amount exceeds maximum allowed amount |
| 3603 | Customer is at or above limits |
| 3604 | The customer is blocked for eTransfer |
| 3605 | Customer account is blocked |
Refund related errors
| Code | Message |
|---|---|
| 4000 | The transaction is already fully refunded |
| 4001 | Refundable transaction not found |
| 4002 | The original transaction is not refundable |
| 4003 | Payment method of original transaction is not supported for refunds |
| 4004 | The original transaction is not eligible for refund |
| 4005 | Refund validation failed |
Transfer related error
| Code | Message |
|---|---|
| 5000 | The requested payment currency doesn't match the account currency |
| 5001 | Payment request type is not valid |
| 5002 | Transfer recipient not found |
| 5003 | Recipient onboarding is required in order to initiate the transfer |
Risk related errors
| Code | Message |
|---|---|
| 6000 | Transaction limit exceeded |
| 6001 | Transaction amount is below minimum |
| 6019 | Blocked by risk rules |
| 6020 | The customer is blacklisted |
| 6021 | The customer is blacklisted |
| 6040 | Transaction not allowed |
| 6041 | Transaction cannot be completed |
| 6043 | Transaction declined due name mismatch |
Payout related errors
| Code | Message |
|---|---|
| 7000 | Payout instrument details not found |
| 7001 | Payment method of original transaction is not supported for payouts |
| 7002 | The original transaction is not eligible for payout |
| 7003 | Transaction for payout not found |
On demand payment errors
| Code | Message |
|---|---|
| 9000 | Cannot find active on demand initial payment |
| 9001 | On demand payment request amount is above of set maximum |
| 9002 | The requested payment currency doesn't match the token currency |
Cash voucher payment errors
| Code | Message |
|---|---|
| 10000 | Invalid voucher details |
| 10001 | The voucher is in a different currency |
| 10002 | The requested amount exceeds the voucher amount |
| 10003 | Maximum voucher redemption attempts have been reached |
Exchange related errors
| Code | Message |
|---|---|
| 13000 | Exchange pair is not supported |
| 13001 | Invalid exchange pair |
| 13500 | FX rate not found |
| 13600 | FX quote not found |
| 13601 | FX quote has expired |
| 13602 | Payment currency mismatch |
| 13603 | Settlement currency mismatch |
| 13604 | Transfer amount mismatch |
Instant Bank Transfer error codes (transaction related)
| Code | Message |
|---|---|
| 21000 | Payment cancelled by the customer |
| 21001 | Payment cancelled by the customer |
| 21002 | Payment cancelled by the customer |
| 21003 | Payment cancelled by the customer |
| 21004 | Session timeout |
| 21005 | Session timeout |
| 23000 | Additional information or actions required by customer bank before completion of the transfer |
| 23002 | Transfer is rejected by customer's bank |
| 23003 | Instant payments are not available at this time |
| 23005 | Customer bank temporarily unavailable |
| 23007 | Insufficient funds in customer's bank account |
| 23015 | Payment amount is too small |
| 23021 | Max volume available for transfers reached |
| 23022 | Max volume available for single transfer reached |
| 23030 | Max failed login attempts reached by the customer |
| 23032 | Max failed confirmation attempts reached by the customer |
| 24000 | Transfers from customer's selected account are not allowed |
| 24001 | Unsupported currency used by the customer for this transfer |
| 24002 | Sender and recipient account could not be the same |
| 24003 | No suitable customer accounts found to be used with this service |
| 24004 | Specified sender account not found |
| 24005 | General error, related to customer's banking or invalid data input |
| 24006 | Recipient account is not recognized by bank |
| 24012 | General error, related to customer's banking or invalid data input |
| 24013 | General error, related to customer's banking or invalid data input |
| 25000 | An issue with customer's online banking or integration to the bank has occurred |
| 25001 | General error |
| 25003 | Payment may be successful |
| 25004 | Name match could not be performed |
| 25010 | Temporarily unable to establish secure connection with the customer's bank |
| 25011 | Customer's business banking not supported |
| 25013 | General error, related to customer's banking |
| 28002 | General error |
| 28003 | General error |
| 28007 | Insufficient funds in customer's bank account |
| 28008 | Insufficient funds in customer's bank account to cover the transaction fee charged by the bank |
| 28010 | Customer name does not match |
| 28020 | Maximum number of payment attempts reached by the customer |
| 28021 | Max volume available for transfers reached |
| 28022 | Max volume available for single transfer reached |
| 28023 | Max volume available for transfers reached |
| 28024 | Max volume available for transfers reached |
| 28030 | Max failed login attempts reached by the customer |
| 28031 | Max failed confirmation attempts reached by the customer |
| 28032 | Max failed confirmation attempts reached by the customer |