Refunds
Introduction
This endpoint allows you to create a refund transaction request from details of a successful transaction.
Process Flow
Step 1: Make a call to Create Refund Transaction while supplying the details of a successful transaction to be reversed.
Step 2: View Response.
NOTE:
To get a list of refund requests, make a call to get refund by merchant code and date or get refund by refund reference.
Sample Request
curl https://qa.interswitchng.com/paymentgateway/api/v1/refunds \
-H "Authorization: <token>" \
-H "Content-Type: application/json" \
-D '{
"refundReference": "REFUND-1543818751-JB-MX187",
"parentTransactionReference": "HelloStores0001",
"merchantCode": "MX187",
"refundType": "PARTIAL",
"refundAmount": 22200,
"reasonForRefund": "Reason for Refund!"
}'
-X POST
Sample Response
{
"id": 10174,
"refundReference": "REFUND-1543818751-JB-MX187",
"merchantCode": "MX187",
"parentPaymentId": 269089,
"refundType": "PARTIAL",
"refundAmount": 22200,
"createdDate": 1543818875243,
"refundStatus": "PENDING",
"createdBy": "[email protected]",
"reasonForRefund": "Reason for REfund!"
}
Refund Statuses
Refund Status | Comment |
---|---|
SUCCESS | This is the first state of a refund after the refund has been created via API. This means the refund is going to be processed the next business day automatically. |
PENDING | Refund has been successfully created and is now pending fulfilment. No debit has impacted your position |
PROCESSING | Automated refund process is in progress (T+1) |
FAILED | Refund failed. This is a final status it means we have exhasuted all means to refund the customers' funds or the Refund request sent is invalid. |
COMPLETE | Automated refund was successfully processed. Customer receives instant credit refund |
COMPLETE_MANUAL | Issuing bank has been infomred to refund money back to customer's account. |
Refunds are processed with settlement the next working day. All refund statuses should be final after 2 working days from when the refund was created.
Failure Responses
We would return HTTP statues 400 and 500 when there's an inssue with the request or trying to process the refund request
Code | Description |
---|---|
10500 | This means an unexpected server error occured. You should always call the Get Refund Info endpoint to confirm the refund status before marking it as failed or successful |
10400 | There was an issue creating the refund and the description would contain the exact reason why it failed. |
Sample Response
{"code":"10500","description":"Error creating refund","logId":"17aaaxxx-xxxx-xxxbe","errors":null}}
{"code":"10400","description":"Refund account number not found","logId":"xxx-48d8-4afb-a74b-xx","errors":null
Updated 17 days ago