Unknown macro: {hivestonebreadcrumb}
Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

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:

ER007: Sample Error Response
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

The following table lists the possible error codes and its descriptions that are generated by the payment API services:

Error TypeError CodeError DescriptionHTTP Status Code
INTERNAL_SERVER_ERRORER000Unexpected server error occurred.500
INVALID_CARD_NUMBERER001Invalid card number. It can only be numeric.400
INVALID_CARD_NUMBER_LENGTHER002Card number can only be of length 16.400
INVALID_CVVER003Invalid card CVV. It can only be numeric400
INVALID_CVV_LENGTHER004Card CVV can only be of length 3.400
INVALID_CARD_EXPIRY_MONTHER005Card expiry month is invalid.400
INVALID_CARD_EXPIRY_YEARER006Card expiry year is invalid.400
INVALID_ARGUMENT_ERRORER007Invalid argument error occurred. Check additionalInfo for more details.400
INVALID_TRANSITIONER008Transition not supported from current state.422
TRANSACTION_NOT_FOUNDER010Transaction not found.404
TRANSACTION_ALREADY_PRESENTER011Transaction with given requestId already present400
MISSING_REQUEST_PARAMETERER012Missing request parameter400
PRECONDITION_MISMATCHER013IllegalStateException400
INVALID_SOURCEER014Invalid source id given400
SAVE_FOR_FUTURE_DISABLEDER015SaveForFuture is not enabled for this source401
INVALID_MERCHANT_INFOER016Given merchant info is invalid400
INVALID_API_KEYER017Given API Key is not valid400
MISSING_API_KEY_HEADERER019apiKey header is missing400
INVALID_PUBLISHABLE_KEYER020Unauthorised request made401
REFUND_AMOUNT_MISMATCHER021Transaction amount and refund request amount should be same400
REQUEST_TIMED_OUTER022Request timed out.408
CONCURRENT_UPDATE_ATTMEPTEDER023Transaction already modified by another request422
INVALID_MERCHANTER024Unauthorized pull request made for merchant401
UNVERIFIED_SOURCEER025Source not verified400
UNAUTHORIZED_SOURCE_ACCESSER026Unauthorized access to the source requested, user consent needed401
SOURCE_NOT_FOUNDER027Source not found404
BALANCE_RETRIEVAL_FAILEDER028Unable to retrieve balance for the source500
TOKEN_NOT_PRESENTER031No Token present with the given tokenId404
TOKEN_ALREADY_PRESENTER032Token with given requestId already exists400
AMOUNT_MISMATCHER033Requested amount is different from amount mentioned in token400
INVALID_TOKEN_CODEER034No chargeable token found for mentioned token code400
UNAUTHORIZED_TOKEN_ACCESSER035Unauthorized access to token requested401
TRANSACTION_ALREADY_REFUNDEDER041Transaction already refunded400
INVALID_REFUND_AMOUNTER042Requested amount cannot be refunded for the transaction400
INVALID_CARD_BIN_RANGEER043Invalid card bin range400

On this page:

  • No labels