GetRefundStatus
Endpoint
Overview
The "GetRefundStatus" endpoint is a POST request. It is used to get the status of the refund to check if it is refunded, rejected, or still pending.
The endpoint on Swagger is: Refund_GetRefundStatus.
Now, we are going to declare the endpoint and its models along with each accepted parameter and possible value.
Request HeaderAdd "Authorization": "Bearer {Token}" to request header. Token of demo configuration can be found here.
Request Model
The request is a POST request with the following parameters:
| Input Parameter | Type | Description |
|---|---|---|
| KeyType | string | supported keys are "InvoiceId", "RefundReference", and "RefundId" |
| Key | string | Value of the key type mentioned |
Response Model
After viewing the Response Model that you will get as a result of your request, here, you will find full details about the Data Model of this API endpoint. Let's check it and its contents.
| Response Field | Type | Description |
|---|---|---|
| RefundStatusResult | Array | An array of refund status result data |
RefundStatusResult
| Response Field | Type | Description |
|---|---|---|
| RefundId | number | |
| RefundStatus | string | The status of the refund. It takes one of the following values: "Refunded", "Canceled", or "Pending". |
| InvoiceId | number | Represents the invoice ID that was used in the inquiry call. |
| Amount | number | The amount to be refunded. |
| RefundReference | string | The refund reference generated by MyFatoorah |
| ExternalIdentifier | string | The ExternalIdentifier that you passed in the MakeRefund request. |
| RRN | string | Refund Reference Number that the customer can check with their bank. |
| RefundAmount | number | The actual amount refunded to the customer. |
| BaseCurrency | string | Your account base currency |
Sample Message
{
"Key": "6867014",
"KeyType": "InvoiceId"
}{
"IsSuccess": true,
"Message": "",
"ValidationErrors": null,
"Data": {
"RefundStatusResult": [
{
"RefundId": 275988,
"RefundStatus": "Refunded",
"InvoiceId": 6867014,
"Amount": 1.000,
"RefundReference": "2026002024",
"ExternalIdentifier": "MF-222",
"RefundAmount": 1.000,
"RRN": "617614024566",
"BaseCurrency": "KWD"
},
{
"RefundId": 275990,
"RefundStatus": "Pending",
"InvoiceId": 6867014,
"Amount": 1.000,
"RefundReference": "2026002025",
"ExternalIdentifier": "MF-33",
"RefundAmount": 1.000,
"RRN": null,
"BaseCurrency": "KWD"
}
]
}
}
