MPGS Refund Payment
Test URL
POSThttps://uat.finserve.africa/mpgs-direct-integration/api/v3.1/refundPayment
Live URL
POSThttps://api-unt.finserve.africa/mpgs-direct-integration/api/v3.1/refundPayment
This API will refund a payment.
200 Success Response Schema
| Field Name | Field Type | Field Descriptions | 
|---|---|---|
status | bool | Response status | 
code | number | Response code | 
message | string | Response message | 
data | object | Response data | 
dateTime | string | Time of the transaction record | 
orderAmount | string | Amount plus charge | 
scheme | string | The card scheme | 
api_operation | string | The api operation type i.e., REFUND in this case | 
orderId | string | The order id | 
currency | string | Transaction currency | 
transactionId | string | Transaction id | 
refundedAmount | string | Refund amount | 
totalRefundedAmount | string | Total refunded amount | 
status | string | Refund status e.g. PARTIALLY_REFUNDED | 
Example Request
⚠️
In the example below, please remember to replace the variables enclosed within curly brackets {{ }} with the actual values.
Signature Formula
transactionReference+amountRequest Fields
| Field Name | Type | Description | Example | Required | 
|---|---|---|---|---|
transactionReference | string | A unique reference for the transaction. | "NCJASSOPK101004" | Yes | 
amount | number | The amount to be refunded. | 50 | Yes | 
merchantNote | string | A note or reference associated with the refund transaction. | "2179103820" | No | 
Example Request
curl --request POST \
     --url https://uat-unt.finserve.africa/mpgs-direct-integration/api/v3.1/refundPayment \
     --header 'Authorization: {{token}}' \
     --header 'content-type: application/json' \
     --data '
        {
            "transactionReference": "NCJASSOPK101004",
            "amount": 50,
            "merchantNote": "2179103820"
        }
'Example Response
Example Response
{
    "status": true,
    "code": 200,
    "message": "Payment refunded successfully.",
    "data": {
        "dateTime": "2022-11-10T12:24:09.379Z",
        "orderAmount": "51.6",
        "api_operation": "REFUND",
        "orderId": "ORDER0051159",
        "currency": "KES",
        "transactionId": "ZNOGZsC8TB",
        "refundAmount": "50.0",
        "totalRefundedAmount": "50.0",
        "status": "PARTIALLY_REFUNDED"
    }
}