API ReferenceIntegrationsKnowledge Base

RazorpayX - API Errors Codes

API error codes are sent to you when an API cannot be fired. Instead, we return a JSON error response that contains the reason for the failure. You can use this response to make changes to the API request body and try to fire them again.

Sample Code🔗

Copy{ "error": { "code": "BAD_REQUEST_ERROR", "description": "The id provided does not exist", "source": "business", "reason": "input_validation_failed", "step": "NA", "metadata": {} } }
code
string Type of the error. For example, BAD_REQUEST_ERROR.
description
string A description for the error. For example, The id provided does not exist.
source
string Possible values:
  • business: Merchant action required.
  • internal: Technical error at Razorpay's server.
reason
string The error reason. For example, input_validation_failed.
step
NA Not applicable for API Error Codes, value displayed to maintain consistency of error object.
metadata
Null value Not applicable for API Error Codes, value displayed to maintain consistency of error object.

API Error Source🔗

Source

Explanation

business

Merchant action required.

internal

Technical error at Razorpay's server.

API Error Reason and Next Steps🔗

The table below lists the various API error reasons, explains the likely reason for the error and suggests the next steps you can take to fix the error.

Reason

Explanation

Next Step

input_validation_failed

Failed due to wrong request or input sent in the request parameter. Check the error description parameter for more information about the error.

Make the necessary changes and retry. Refer to the API reference guide for parameter descriptions.

insufficient_funds

You do not have enough funds in your account to make the transaction.

Add funds to your account or use different account and retry.

server_error

Technical error at Razorpay's server. This usually occurs when there is some server issue at Razorpay's end.

Retry after some time or reach out to RazorpayX Support from the Dashboard.

×