Allows to control the refunds through API call
It allows refunding a transaction that has been charged successfully, and not yet refunded.
It may include or exclude the merchant's processing fee, based on agreements & account configurations. And funds will be refunded to the same card used to make the transaction.
Full refund
A full refund returns the total amount of the transaction to the customer — it can only be performed once.
Partial refund
Any partial amount, but it should not exceed the original payment total amount. Multiple partial requests are possible
Sample Request
Sample request
{
"charge_id": "chg_TS07A2120231341g9R42703981",
"amount": 1,
"currency": "KWD",
"description": "Test Description",
"reason": "requested_by_customer",
"reference": {
"merchant": "txn_0001"
},
"metadata": {
"udf1": "test1",
"udf2": "test2"
},
"post": {
"url": "http://your_url.com/post"
}
}
Sample Response
{
"id": "re_xxxx",
"object": "refund",
"api_version": "V2",
"live_mode": false,
"amount": 3,
"charge_id": "chg_xxxx",
"created": "1723481040882",
"date": "1723481042085",
"currency": "AED",
"status": "REFUNDED",
"reference": {
"id": "xxxx",
"gateway": "xxxx",
"payment": "xxxx",
"acquirer": "xxxx"
},
"response": {
"code": "000",
"message": "Refunded"
},
"post": {
"status": "PENDING",
"url": "http://your_website.com/post_url"
},
"acquirer": {
"response": {
"code": "000",
"message": "Refunded"
}
},
"gateway": {
"response": {
"code": "00",
"message": "Approved"
}
},
"method": "CREATE",
"transaction": {
"timezone": "UTC+03:00",
"asynchronous": false,
"amount": 3,
"currency": "AED",
"date": {
"created": 1723481040882,
"completed": 1723481042085
}
},
"wallet": {
"debit": false
},
"merchant": {
"id": "xxxx"
},
"reverse_destination": false,
"reason": "The product is out of stock"
}