Error handling

HTTP statuses

We use HTTP statuses for our response as per the HTTP specification

Status rangeDescription
2xxindicates a successful request
4xxindicates there is a problem with the client's request
5xxindicates 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.

CodeMessage
500General error
510Provider timed out
1000Please provide X-Api-Key and X-Api-Secret headers with your request
1001The credentials provided with the request are invalid
1002The request signature is invalid
1003An X-Signature header containing the request body signature must be present with your request
1004An X-Signature-Key-Id header must be present with your request
1005The specified signature key was not found or is inactive
1006Your IP is not whitelisted
1020The request body is missing
1021The request is not parseable
1022Malformed request syntax
1023Required query parameter is missing
1024Required request part is missing
1025Path parameter is invalid
1026HTTP Method not allowed
1027Unsupported media type
1028No transaction identifying parameter provided
1029Invalid request body
1040Rate limit reached
1041Too many requests
1042System is under maintenance
1050Your merchant account is not active
1051The requested feature is not enabled on your account
1052Invalid account configuration, please contact support
1053Invalid account configuration, please contact support
1054Invalid account configuration, please contact support
1055Action not allowed (e.g. API IBAN issuing is not enabled on your account)

General payment errors

CodeMessage
2000Request validation failed
2001Account not found
2002A payment with the specified foreign transaction ID already exists
2010Requested time period is too large. Maximum is 1 year
2011nextPageId token is invalid
2012Requested pageSize is too large. Maximum is 10 000
2013Invalid include parameter
2020The specified original transaction was not found
2021The specified original transaction is not in a processed status
2022Payment request not found
2030Not enough balance in your account
2040Destination bank account details are invalid
2041Destination bank account cannot be used for transfer
2050Payment provider returned an error
2051Transaction received after the cut-off time
2052Beneficiary waiting verification
2053Balance not enough
2060Payment abandoned by customer
2061Transaction expired
CodeMessage
3000Payment currency is not supported
3001Customer country is not supported
3002Transaction type is not eligible for webhook simulation
3010Invalid first name
3011Invalid last name
3012Invalid email
3013Invalid phone number
3014Address must not be empty
3015City must not be empty
3016Invalid state
3017Invalid postal code
3018The external wallet with the specified identifier does not exist
3019Invalid account
3020Holder name must be written in full width katakana
3021Invalid voucher details
3022Voucher currency does not match
3023Voucher amount is exceeded
3025Account number must not be empty
3026Holder name must not be empty
3027Incompatible account number and recipient name
3028Document is invalid
3029Document is missing
3030Account details are invalid
3031Payment was unsuccessful. Verify your payment details or try a different method
3032The recipient's account has been restricted by the user through the provider portal
3033Mobile number not registered
3034Invalid account number
3035Invalid BIC/SWIFT code
3100The transaction has been declined by the provider
3101The transaction has been declined by the customer
3102The transaction has been declined by the customer's bank
3103The transaction has been declined due to network error
3104The transaction has been cancelled
3105The transaction was processed but not confirmed during the cancellation period and has been auto-cancelled
3106The transaction was scheduled but not confirmed during the cancellation period and has been auto-failed
3110Invalid transaction provided by the merchant or transaction sent to the provider was invalid or not found
3130Maximum number of incomplete transactions reached
3150Unable to complete the request
3151The transaction request has been declined
3152The transaction request has been declined due to network error
3200The customer has failed to answer the security question correctly
3201The customer has failed to answer the security otp correctly
3202Authentication failed
3600Volume limit reached
3601Limit validation failed
3602Transaction amount exceeds maximum allowed amount
3603Customer is at or above limits
3604The customer is blocked for eTransfer
3605Customer account is blocked
CodeMessage
4000The transaction is already fully refunded
4001Refundable transaction not found
4002The original transaction is not refundable
4003Payment method of original transaction is not supported for refunds
4004The original transaction is not eligible for refund
4005Refund validation failed
CodeMessage
5000The requested payment currency doesn't match the account currency
5001Payment request type is not valid
5002Transfer recipient not found
5003Recipient onboarding is required in order to initiate the transfer
CodeMessage
6000Transaction limit exceeded
6001Transaction amount is below minimum
6019Blocked by risk rules
6020The customer is blacklisted
6021The customer is blacklisted
6040Transaction not allowed
6041Transaction cannot be completed
6043Transaction declined due name mismatch
CodeMessage
7000Payout instrument details not found
7001Payment method of original transaction is not supported for payouts
7002The original transaction is not eligible for payout
7003Transaction for payout not found

On demand payment errors

CodeMessage
9000Cannot find active on demand initial payment
9001On demand payment request amount is above of set maximum
9002The requested payment currency doesn't match the token currency

Cash voucher payment errors

CodeMessage
10000Invalid voucher details
10001The voucher is in a different currency
10002The requested amount exceeds the voucher amount
10003Maximum voucher redemption attempts have been reached
CodeMessage
13000Exchange pair is not supported
13001Invalid exchange pair
13500FX rate not found
13600FX quote not found
13601FX quote has expired
13602Payment currency mismatch
13603Settlement currency mismatch
13604Transfer amount mismatch
CodeMessage
21000Payment cancelled by the customer
21001Payment cancelled by the customer
21002Payment cancelled by the customer
21003Payment cancelled by the customer
21004Session timeout
21005Session timeout
23000Additional information or actions required by customer bank before completion of the transfer
23002Transfer is rejected by customer's bank
23003Instant payments are not available at this time
23005Customer bank temporarily unavailable
23007Insufficient funds in customer's bank account
23015Payment amount is too small
23021Max volume available for transfers reached
23022Max volume available for single transfer reached
23030Max failed login attempts reached by the customer
23032Max failed confirmation attempts reached by the customer
24000Transfers from customer's selected account are not allowed
24001Unsupported currency used by the customer for this transfer
24002Sender and recipient account could not be the same
24003No suitable customer accounts found to be used with this service
24004Specified sender account not found
24005General error, related to customer's banking or invalid data input
24006Recipient account is not recognized by bank
24012General error, related to customer's banking or invalid data input
24013General error, related to customer's banking or invalid data input
25000An issue with customer's online banking or integration to the bank has occurred
25001General error
25003Payment may be successful
25004Name match could not be performed
25010Temporarily unable to establish secure connection with the customer's bank
25011Customer's business banking not supported
25013General error, related to customer's banking
28002General error
28003General error
28007Insufficient funds in customer's bank account
28008Insufficient funds in customer's bank account to cover the transaction fee charged by the bank
28010Customer name does not match
28020Maximum number of payment attempts reached by the customer
28021Max volume available for transfers reached
28022Max volume available for single transfer reached
28023Max volume available for transfers reached
28024Max volume available for transfers reached
28030Max failed login attempts reached by the customer
28031Max failed confirmation attempts reached by the customer
28032Max failed confirmation attempts reached by the customer