- Created by user-e873e, last modified by user-5c3b0 on Jul 10, 2020
Overview
Exceptions occur when an API operation fails to process a request payload. In such scenarios, error codes and its corresponding HTTP status codes help troubleshoot the possible failure reason. For example, in a scenario where a user provides invalid inputs such as card number, CVV or expiry date.
The sample error response given below shows the HTTP response body structure that is returned in case of errors:
HTTP Response Body: { "errorCode": "ER007", "errorType": "INVALID_ARGUMENT_ERROR", "errorMessage": "Invalid argument error occurred. Check additionalInfo for more details.", "traceId": "adb0213f-63aa-48f4-9dda-d033fa1c6641", "additionalInfo": { "amount": "may not be null", "requestId": "may not be null" } } HTTP Status Code: 400
- The corresponding HTTP status codes are mapped as 4xx or 5xx based on the 'Error Type'.
- traceId is a unique identifier of the error being reported. traceId needs to be shared with Zeta while referring to any error response where support is needed.
Default Error Codes
Note: To support better error handling, we iteratively keep on improving and adding more error codes to this list. Please expect to receive new unseen error codes in API responses. In such cases we recommend you to revisit this section and add handling for new codes as well.
The following table lists the possible error codes and its descriptions that are generated by the payment API services:
Error Type | Error Code | Error Description | HTTP Status Code |
---|---|---|---|
INTERNAL_SERVER_ERROR | ER000 | Unexpected server error occurred. | 500 |
INVALID_CARD_NUMBER | ER001 | Invalid card number. It can only be numeric. | 400 |
INVALID_CARD_NUMBER_LENGTH | ER002 | Card number can only be of length 16. | 400 |
INVALID_CVV | ER003 | Invalid card CVV. It can only be numeric | 400 |
INVALID_CVV_LENGTH | ER004 | Card CVV can only be of length 3. | 400 |
INVALID_CARD_EXPIRY_MONTH | ER005 | Card expiry month is invalid. | 400 |
INVALID_CARD_EXPIRY_YEAR | ER006 | Card expiry year is invalid. | 400 |
INVALID_ARGUMENT_ERROR | ER007 | Invalid argument error occurred. Check additionalInfo for more details. | 400 |
INVALID_TRANSITION | ER008 | Transition not supported from current state. | 422 |
TRANSACTION_NOT_FOUND | ER010 | Transaction not found. | 404 |
TRANSACTION_ALREADY_PRESENT | ER011 | Transaction with given requestId already present | 400 |
MISSING_REQUEST_PARAMETER | ER012 | Missing request parameter | 400 |
PRECONDITION_MISMATCH | ER013 | IllegalStateException | 400 |
INVALID_SOURCE | ER014 | Invalid source id given | 400 |
SAVE_FOR_FUTURE_DISABLED | ER015 | SaveForFuture is not enabled for this source | 401 |
INVALID_MERCHANT_INFO | ER016 | Given merchant info is invalid | 400 |
INVALID_API_KEY | ER017 | Given API Key is not valid | 400 |
MISSING_API_KEY_HEADER | ER019 | apiKey header is missing | 400 |
INVALID_PUBLISHABLE_KEY | ER020 | Unauthorised request made | 401 |
REFUND_AMOUNT_MISMATCH | ER021 | Transaction amount and refund request amount should be same | 400 |
REQUEST_TIMED_OUT | ER022 | Request timed out. | 408 |
CONCURRENT_UPDATE_ATTMEPTED | ER023 | Transaction already modified by another request | 422 |
INVALID_MERCHANT | ER024 | Unauthorized pull request made for merchant | 401 |
UNVERIFIED_SOURCE | ER025 | Source not verified | 400 |
UNAUTHORIZED_SOURCE_ACCESS | ER026 | Unauthorized access to the source requested, user consent needed | 401 |
SOURCE_NOT_FOUND | ER027 | Source not found | 404 |
BALANCE_RETRIEVAL_FAILED | ER028 | Unable to retrieve balance for the source | 500 |
TOKEN_NOT_PRESENT | ER031 | No Token present with the given tokenId | 404 |
TOKEN_ALREADY_PRESENT | ER032 | Token with given requestId already exists | 400 |
AMOUNT_MISMATCH | ER033 | Requested amount is different from amount mentioned in token | 400 |
INVALID_TOKEN_CODE | ER034 | No chargeable token found for mentioned token code | 400 |
UNAUTHORIZED_TOKEN_ACCESS | ER035 | Unauthorized access to token requested | 401 |
TRANSACTION_ALREADY_REFUNDED | ER041 | Transaction already refunded | 400 |
INVALID_REFUND_AMOUNT | ER042 | Requested amount cannot be refunded for the transaction | 400 |
INVALID_CARD_BIN_RANGE | ER043 | Invalid card bin range | 400 |
UNAUTHORIZED_API_ACCESS | ER044 | Unauthorized access to API | 405 |
INVALID_DEVELOPER_ID | ER045 | Invalid developer ID | 401 |
INVALID_OTP | ER046 | Invalid OTP | 400 |
INVALID_PHONE_NUMBER | ER047 | No user found for this phone number | 403 |
INVALID_SOURCE_PERMISSION | ER048 | Source Permission or Permission combination not allowed | 400 |
TOKEN_EXPIRED | ER049 | Token already expired | 400 |
INCORRECT_PIN | ER050 | Incorrect PIN | 400 |
CARD_NOT_FOUND | ER051 | Card not found | 404 |
WEB_HOOK_NOT_FOUND | ER052 | Webhook not found | 404 |
TRANSACTION_EXPIRED | ER053 | Capture timeout passed | 400 |
SUPER_CARD_PIN_BLOCKED | ER055 | Card PIN blocked | 400 |
SUPER_CARD_DISABLED | ER056 | Card disabled | 400 |
SUPER_CARD_BLOCKED | ER057 | Card blocked | 400 |
SUPER_CARD_DELETED | ER058 | Card deleted | 400 |
SUPER_CARD_NOT_ASSOCIATED | ER059 | Card not associated with wallet | 400 |
INVALID_EMAIL_ID | ER060 | Invalid email ID format | 403 |
NO_USER_FOUND | ER061 | No user found for this email ID | 404 |
NO_SESSION_FOUND | ER062 | No session found | 404 |
REQUIRED_AMOUNT_NOT_PRESENT_IN_WALLET | ER063 | Requested amount not present in wallet | 400 |
ACQUIRER_CONFIG_NOT_FOUND | ER064 | Acquirer not configured | 404 |
INVALID_CURRENCY | ER065 | Invalid currency | 400 |
IDENTITY_NOT_SUPPORTED | ER067 | Identity not supported | 400 |
OTP_EXPIRED | ER068 | OTP expired | 400 |
INVALID_ACCOUNTS | ER069 | Accounts used in request not valid | 400 |
INVALID_SIGNATURE | ER070 | Signature ID not valid | 401 |
On this page:
- No labels