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 Header

Add "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 ParameterTypeDescription
KeyTypestringsupported keys are "InvoiceId", "RefundReference", and "RefundId"
KeystringValue 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 FieldTypeDescription
RefundStatusResultArrayAn array of refund status result data

RefundStatusResult

Response FieldTypeDescription
RefundIdnumber
RefundStatusstringThe status of the refund. It takes one of the following values: "Refunded", "Canceled", or "Pending".
InvoiceIdnumberRepresents the invoice ID that was used in the inquiry call.
AmountnumberThe amount to be refunded.
RefundReferencestringThe refund reference generated by MyFatoorah
RefundAmountnumberThe 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
      }
    ]
  }
}