payment_id.
-
The amount is deducted from your main account balance when refunding a payment. You can set the
reverse_allparameter totruein the refund POST request to recover the amount from the Linked Account. This will recover the amount for every transfer made on the payment before processing the refund to the customer. -
You can automate reversals with the
reverse_allparameter in the following refund scenarios:- Full refund
- Partial refund for a payment transferred to a single account.
Request
Curl
Response
Success
Parameters
id mandatory
: string A unique identifier of the payment that should be refunded.
Parameters
amount mandatory
: string The amount of refund in the smallest unit of currency. For example, for an amount of ₹200.35, the value of this field should be 20035.
reverse_all optional
: boolean Reverses transfer made to a linked account. Possible values:
true: Reverses transfer made to a linked account.false: Does not reverse transfer made to a linked account.
Parameters
id
: string Unique identifier of the refund.
entity
: string Indicates the type of entity. Here, it is refund.
amount
: integer The amount of refund in the smallest unit of currency. For example, for an amount of ₹200.35, the value of this field should be 20035.
currency
: string The currency of refund. Currently, only INR is supported.
payment_id
: string Unique identifier of the payment for which this refund has been requested.
created_at
: integer Timestamp, in Unix, of refund creation.
notes
: json object Set of key-value pairs that can be associated with an entity. These pairs can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported.
receipt
: string Unique identifier that you can use for internal reference.
acquirer_data
: array A dynamic array consisting of a unique reference number (either RRN, ARN or UTR) that is provided by the banking partner when a refund is processed. This reference number can be used by the customer to track the status of the refund with the bank.
Errors
The api key/secret provided is invalid- code: 4xx
- description: This error occurs when there is a mismatch between the API credentials passed in the API call and the API credentials generated on the Dashboard.
- solution: Make sure the API Keys are active and entered correctly. Also, there should not be any whitespaces before or after the keys.
- code: 400
- description: This error occurs when the total transferred amount exceeds the payment amount.
- solution: Make sure to check the amount passed with the payment made.
- code: 400
- description: This error occurs when the amount is less than the minimum amount. The transaction amount expressed in the currency subunit, such as paise (in INR) should always be greater than or equal to ₹1.
- solution: Make sure the amount is equal to or greater than the minimum amount of ₹1.
- code: 400
- description: This error occurs when you pass an invalid
payment_idin the API endpoint. - solution: Make sure to pass a vaild
payment_id.