Note:If you are using an official Razorpay Language-wise SDK Integration, the error responses result in exceptions that need to be handled in your integration.
Error Response
The error response containscode, description, field, source, step, reason and metadata parameters that help you diagnose and solve the error.
To understand more about error codes, refer to the Error Codes section.
Sample Error Response
Response Parameters
error
: object The error object.
code
: string Type of the error.
description
: string Descriptive text about the error.
field
: string Name of the parameter in the API request that caused the error.
source
: string The point of failure in the specific operation (payment in this case). For example, customer, business
step
: string The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction.
reason
: string The exact error reason. It can be handled programmatically.
metadata
: object Contains additional information about the request.
payment_id
: string Unique identifier of the payment.
order_id
: string Unique identifier of the order associated with the payment.