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:
400XX00Bad RequestBad Request
400XX01Invalid Field Format {fieldName}{fieldName} is invalid. Check the format / value of field
400XX02Invalid Field Format {fieldName}{fieldName} is invalid. Check the format / value of field
400XX03Bad RequestBad Request
401XX00UnauthorizedInvalid Authorization-Customer Header /
401XX00UnauthorizedInvalid mandatory header X-SIGNATURE
401XX00UnauthorizedInvalid Authorization Header
401XX01Invalid Token (B2B)Invalid Token (B2B).
401XX02Invalid Customer TokenCustomer token is invalid.
401XX03Token Not Found (B2B)Token Not Found (B2B).
401XX04Customer Token Not FoundToken not found in the system. This occurs on any API that requires token as input parameter.
403XX00Session ExpiredSession expired. Please try again
403XX00Too many RequestsThe OTP requests have reached the maximum
403XX01Feature Not AllowedFeature Not Allowed At This Time.
403XX02Exceeds Transaction Amount LimitExceeds Transaction Amount Limit.
403XX03Suspected Fraud TransactionSuspected Fraud.
403XX04Activity Count Limit ExceededRetry count exhausted. Please try after some time
403XX05Do Not HonorThe customer is blocked / Card account has been frozen / Maximum (OTP) passcode retries have been attempted. The customer is blocked
403XX05Card BlockedThe Card is blocked.
403XX06Feature Not Allowed At This TimeFeature Not Allowed At This Time.
403XX07Card BlockedCard is blocked or temporarily disabled by bank
403XX08Card ExpiredCard has expired
403XX09Dormant AccountThe account is dormant.
403XX10Need To Set Token Limit.Need To Set Token Limit.
403XX11OTP BlockedOTP has been blocked.
403XX12OTP Lifetime ExpiredThe (OTP) passcode has expired
403XX13OTP Sent To CardholderOTP is already sent
403XX14Insufficient FundsInsufficient Funds
403XX15Transaction Not PermittedTransaction Not Permitted.
403XX16Suspend TransactionsAn error occurred while performing the transaction using the card
403XX17Token Limit ExceededPurchase amount exceeds the token limit set prior
403XX18Inactive Card/Account/CustomerInactive Account.
403XX18Inactive CardCard is inactive
403XX18Inactive CustomerThe customer is inactive.
403XX19Technical occurred from bank, please check with our customer support team.Technical occurred from bank, please check with our customer support team.
403XX20Transaction Limit ExceededExceeds Transaction Amount Limit
403XX20Transaction FailedPayment without OTP is not allowed for this amount
403XX20Transaction FailedAmount is lesser than the merchant limit
403XX20Transaction FailedPayment with OTP requires minimum amount
403XX20Transaction FailedPayment without OTP is not allowed for this amount
403XX21Set Limit Not AllowedSet Limit Not Allowed.
403XX22Token Limit InvalidToken Limit Invalid.
403XX23Invalid TransactionInvalid Transaction from bank
404XX00Invalid Transaction StatusThe transaction status is invalid
404XX01Transaction Not FoundTransaction Not Found
404XX02Invalid TokenThe bank card token or account token is invalid/expired
404XX02Invalid ActionInvalid mandatory parameter action
404XX02Invalid XExternalIdInvalid mandatory parameter XExternalId
404XX03Bank Not SupportedOperation could not be performed because the bank is inactive
404XX06Need To Request OTPNeed To Request OTP
404XX07Invalid publicUserIdThe publicUserId is invalid
404XX08Inactive MerchantMerchant is inactive
404XX08Invalid MerchantMerchant not found
404XX08Invalid MerchantThe merchantId is invalid
404XX11Invalid CardCard number is invalid
404XX11Invalid CardCard was not found
404XX11Invalid CustomerCustomer not found
404XX11Invalid CustomerMerchant and Customer details are mismatched
404XX13Invalid AmountThe amount is invalid
404XX15Invalid OTPThe (OTP) passcode is incorrect
404XX15Invalid OTPThe otpToken is invalid
404XX15Invalid OTPThe (OTP) passcode is invalid
404XX16Partner Not FoundPartner Not Found
404XX17Invalid TerminalInvalid Terminal
404XX18Inconsistent RequestInconsistent Request Parameter.
405XX00Requested Function Is Not SupportedPayment with OTP is not supported at this time
405XX01Requested Operation Is Not AllowedRequested operation is not allowed at this time
409XX00ConflictCannot use same 'X-EXTERNAL-ID' in different flow
409XX01Duplicate partnerReferenceNoTransaction has previously been processed indicates the same partnerReferenceNo already success.
429XX00Too Many RequestsThe OTP requests have reached the maximum
500XX00General ErrorGeneral Error
500XX00Technical error from Ayoconnect, please check with our customer support.Technical error from Ayoconnect, please check with our customer support.
500XX02Internal Server ErrorInternal Server Error from bank
500XX03Transaction FailedA bank error occurred while performing this operation
504XX00TimeoutServer Timeout
504XX00TimeoutBank gateway timeout