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 |
| RefundAmount | number | The actual amount refunded to the customer. |
Sample Message
{
"Key": "1647850",
"KeyType": "InvoiceId"
}{
"IsSuccess": true,
"Message": "",
"ValidationErrors": null,
"Data": {
"RefundStatusResult": [
{
"RefundId": 49496,
"RefundStatus": "Pending",
"InvoiceId": 1647850,
"Amount": 1,
"RefundReference": "2022000273",
"RefundAmount": 1
},
{
"RefundId": 49497,
"RefundStatus": "Pending",
"InvoiceId": 1647850,
"Amount": 3,
"RefundReference": "2022000274",
"RefundAmount": 1.64
}
]
}
}Updated 2 days ago
