Error Codes

Direct Debit List of Error Codes

The Direct Debit API uses conventional HTTP response codes to indicate the success or failure of an API request. In general:

  • codes in the 2xx range indicate success
  • codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a header is missing, etc.)
  • codes in the 5xx range indicate an error with Ayoconnect or the bank's system (these are rare but they happen).

As our API can raise errors for many reasons, such as a failed charge, invalid parameters, authentication errors.. we recommend writing code that gracefully handles all possible error codes.

All the errors include an error code and a short human-readable message that briefly explains the error reported (you can use it internally but don't share it with your clients/users).


Error responses

Error responses are a combination of the HTTP response code, the service code, and the case dode.

Error response = HTTP response code + service code + case code

Service Codes

Below is a list with all the service codes:

Service codeService
00Callback API
10Generate B2B Access Token API
20Generate B2B2C Customer Authorization Token API
30Get Oauth Code API
31Account Binding API
32Account Unbinding API
33Direct Debit Payment API
34Verify OTP API
35Get a List of Cards Bound to a Customer API
36Get the Status of a transaction API

HTTP Response Codes

Below is a list of possible HTTP response codes, along with additional information about them:

HTTP ResponseMessageDescription
400Bad RequestThe server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
401UnauthorizedAlthough the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response.
403ForbiddenThe client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.
404Not FoundThe server cannot find the requested resource. In the browser, this means the URL is not recognized. In an API, this can also mean that the endpoint is valid but the resource itself does not exist. Servers may also send this response instead of 403 Forbidden to hide the existence of a resource from an unauthorized client.
405Method Not AllowedThis means the server is refusing to accept the request because the specific HTTP method (e.g., GET, POST, PUT, DELETE) used is not permitted for that particular URL or resource.
409ConflictThis response is sent when a request conflicts with the current state of the server.
429Too Many RequestsThe user has sent too many requests in a given amount of time.
500Internal Server ErrorThe server has encountered a situation it does not know how to handle.
504Gateway TimeoutThis error response is given when the server is acting as a gateway and cannot get a response in time.

Case Codes

Below is a list of all possible HTTP response codes and case codes, along with additional information about them:

HTTP CodeService CodeCase CodeResponse MessageDescription of the error:Recommendation
400XX00Bad RequestBad RequestRetry
400XX01Invalid Field Format {fieldName}{fieldName} is invalid. Check the format / value of fieldRetry with correct format
400XX02Invalid Field Format {fieldName}{fieldName} is invalid. Check the format / value of fieldRetry with correct format
400XX03Bad RequestBad RequestRetry
401XX00UnauthorizedInvalid Authorization-Customer Header /Retry
401XX00UnauthorizedInvalid mandatory header X-SIGNATURERetry
401XX00UnauthorizedInvalid Authorization HeaderRetry
401XX01Invalid Token (B2B)Invalid Token (B2B).Retry with correct credentials
401XX02Invalid Customer TokenCustomer token is invalid.Unbind the account (Unbinding API)
401XX03Token Not Found (B2B)Token Not Found (B2B).Retry with correct credentials
401XX04Customer Token Not FoundToken not found in the system. This occurs on any API that requires token as input parameter.Raise to Ayoconnect support team
403XX00Session ExpiredSession expired. Please try againRetry
403XX00Too many RequestsThe OTP requests have reached the maximumRetry after some time
403XX01Feature Not AllowedFeature Not Allowed At This Time.Retry after some time
403XX02Exceeds Transaction Amount LimitExceeds Transaction Amount Limit.Retry after some time
403XX03Suspected Fraud TransactionSuspected Fraud.Unbind the account (Unbinding API)
403XX04Activity Count Limit ExceededRetry count exhausted. Please try after some timeRetry after some time
403XX05Do Not HonorThe customer is blocked / Card account has been frozen / Maximum (OTP) passcode retries have been attempted. The customer is blockedUnbind the account (Unbinding API)
403XX05Card BlockedThe Card is blocked.Retry after some time
403XX06Feature Not Allowed At This TimeFeature Not Allowed At This Time.Retry after some time
403XX07Card BlockedCard is blocked or temporarily disabled by bankUnbind the account (Unbinding API)
403XX08Card ExpiredCard has expiredUnbind the account (Unbinding API)
403XX09Dormant AccountThe account is dormant.Unbind the account (Unbinding API)
403XX10Need To Set Token Limit.Need To Set Token Limit.Raise to Ayoconnect support team
403XX11OTP BlockedOTP has been blocked.Retry after some time
403XX12OTP Lifetime ExpiredThe (OTP) passcode has expiredRetry
403XX13OTP Sent To CardholderOTP is already sent-
403XX14Insufficient FundsInsufficient FundsRetry
403XX15Transaction Not PermittedTransaction Not Permitted.Retry
403XX16Suspend TransactionsAn error occurred while performing the transaction using the cardRetry
403XX17Token Limit ExceededPurchase amount exceeds the token limit set priorRaise to Ayoconnect support team
403XX18Inactive Card/Account/CustomerInactive Account.Unbind the account (Unbinding API)
403XX18Inactive CardCard is inactiveUnbind the account (Unbinding API)
403XX18Inactive CustomerThe customer is inactive.Unbind the account (Unbinding API)
403XX19Technical occurred from bank, please check with our customer support team.Technical occurred from bank, please check with our customer support team.Retry
403XX20Transaction Limit ExceededExceeds Transaction Amount LimitRetry after some time
403XX20Transaction FailedPayment without OTP is not allowed for this amountRetry with proper OTP configuration
403XX20Transaction FailedAmount is lesser than the merchant limitRetry with proper amount
403XX20Transaction FailedPayment with OTP requires minimum amountRetry with proper amount
403XX20Transaction FailedPayment without OTP is not allowed for this amountRetry with proper OTP configuration
403XX21Set Limit Not AllowedSet Limit Not Allowed.Raise to Ayoconnect support team
403XX22Token Limit InvalidToken Limit Invalid.Raise to Ayoconnect support team
403XX23Invalid TransactionInvalid Transaction from bankRetry
404XX00Invalid Transaction StatusThe transaction status is invalidRetry
404XX01Transaction Not FoundTransaction Not FoundRetry
404XX02Invalid TokenThe bank card token or account token is invalid/expiredUnbind the account (Unbinding API)
404XX02Invalid XExternalIdInvalid mandatory parameter XExternalIdRetry with proper X-External-ID value
404XX03Bank Not SupportedOperation could not be performed because the bank is inactiveRaise to Ayoconnect support team
404XX06Need To Request OTPNeed To Request OTPRetry after 24 hours
404XX07Invalid publicUserIdThe publicUserId is invalidRaise to Ayoconnect support team
404XX08Inactive MerchantMerchant is inactiveRaise to Ayoconnect support team
404XX08Invalid MerchantMerchant not foundRaised to Ayoconnect support team
404XX08Invalid MerchantThe merchantId is invalidRetry with correct merchantID / Raise to Ayoconnect Support team
404XX11Invalid CardCard number is invalidRetry with correct details / Raise to Ayoconnect support team
404XX11Invalid CardCard was not foundRetry with correct details / Raise to Ayoconnect support team
404XX11Invalid CustomerCustomer not foundRetry with correct details / Raise to Ayoconnect support team
404XX11Invalid CustomerMerchant and Customer details are mismatchedRetry with correct details / Raise to Ayoconnect support team
404XX13Invalid AmountThe amount is invalidRetry with valid amount / Raise to Ayoconnect support team
404XX15Invalid OTPThe (OTP) passcode is incorrectRetry with correct OTP
404XX15Invalid OTPThe otpToken is invalidRetry with correct OTP
404XX15Invalid OTPThe (OTP) passcode is invalidRetry with correct OTP
404XX16Partner Not FoundPartner Not FoundRaise to Ayoconnect support team
404XX17Invalid TerminalInvalid TerminalRaise to Ayoconnect support team
404XX18Inconsistent RequestInconsistent Request Parameter.Retry / Raise to Ayoconnect support team
405XX00Requested Function Is Not SupportedPayment with OTP is not supported at this timeRaise to Ayoconnect support team
405XX01Requested Operation Is Not AllowedRequested operation is not allowed at this timeRetry after some time
409XX00ConflictCannot use same 'X-EXTERNAL-ID' in different flowRetry with proper X-External-ID value
409XX01Duplicate partnerReferenceNoTransaction has previously been processed indicates the same partnerReferenceNo already success.Retry with proper partnerReferenceNo
429XX00Too Many RequestsThe OTP requests have reached the maximumRetry after some time
500XX00General ErrorGeneral ErrorRetry
500XX00Technical error from Ayoconnect, please check with our customer support.Technical error from Ayoconnect, please check with our customer support.Retry / Raise to Ayoconnect Support team
500XX02Internal Server ErrorInternal Server Error from bankRetry / Raise to Ayoconnect Support team
500XX03Transaction FailedA bank error occurred while performing this operationRetry / Raise to Ayoconnect Support team
504XX00TimeoutServer TimeoutRetry / Raise to Ayoconnect Support team
504XX00TimeoutBank gateway timeoutRetry / Raise to Ayoconnect support team