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:
"errorMessage": "Invalid argument error occurred. Check additionalInfo for more details.",
"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. It needs to be shared with Zeta while referring to any error response where support is needed.
Default Error Codes
To support better error handling, we iteratively improve and add 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:
HTTP Status Code
Unexpected server error occurred.
Invalid argument error occurred. Check additionalInfo for more details.
Transition not supported from current state.
Transaction not found.
Transaction with given requestId already present
Missing request parameter
Invalid source id given
SaveForFuture is not enabled for this source
Given merchant info is invalid
Given API Key is not valid
apiKey header is missing
Transaction amount and refund request amount should be same
Request timed out.
Transaction already modified by another request
Unauthorized pull request made for merchant
Source not verified
Unauthorized access to the source requested, user consent needed
Source not found
Unable to retrieve balance for the source
Requested amount is different from amount mentioned in token
Transaction already refunded
Requested amount cannot be refunded for the transaction