Refunds
This section will describe the Refunds API overview, the request and response example.
Refund requests allow you to refund a charge that has previously been created. Funds will be refunded to the card that was originally charged.
Full refund: A full refund returns the total amount of the transaction to the customer — it can only be performed once.
Partial refund: A partial refund returns a sum less than the captured amount. A payment can be refunded multiple times, but cannot exceed the original payment amount.
The Request Model
Refund amount, currency, reason and original Charge ID are required to process the refund. Refund amount and currency can be either merchant settlement amount and currency or payer charge amount and currency.
{
"charge_id": "chg_86dfjghadfuda7ft",
"amount": 2,
"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"
}
}
The Response Model
If the refund request is valid, then Tap will return the refund response. In the response, you can find the "status" field. This field will define the status of the refund. Possible values are below
REFUNDED, PENDING, IN_PROGRESS, CANCELLED, FAILED, DECLINED, RESTRICRTED, TIMEDOUT, UNKNOWN

"PENDING" - Tap will process the refund manually and update the status (Refund will be processed within 24 hours)
"REFUNDED" - Requested amount refunded successfully
"IN_PROGRESS" - You can use the Retrieve a Refund endpoint to get the status
{
"id": "re_ndf8s6d7fsdfn",
"object": "refund",
"api_version": "V1.2",
"live_mode": false,
"amount": 5,
"charge_id": "chg_dfdsg8ysfgdfdf",
"created": "1323232323",
"currency": "KWD",
"status": "PENDING",
"reference": {
"merchant": "txn_0001"
},
"response": {
"code": "100",
"message": "Pending"
},
"metadata": {
"udf1": "test1",
"udf2": "test2"
},
"description": "test",
"reason": "requested_by_customer",
"post": {
"url": "http://your_url.com/post",
"status": "SUCCESS"
}
}
Updated 21 days ago