---
updatedAt: 2026-02-16T08:49:12.000Z
agentTools:
  projectIndex: https://docs.myfatoorah.com/llms.txt
---

# MakeSupplierRefund

Endpoint

## **Overview**

The "MakeSupplierRefund" endpoint is a POST request. It is used to cancel the payment and return the funds to the customer if the invoice has supplier information. This request has been created specifically for the [Multiple Suppliers](https://docs.myfatoorah.com/docs/multiple-suppliers) feature. It accepts invoices that contain one supplier or more.

The endpoint on Swagger is [Refund\_MakeSupplierRefund](https://apitest.myfatoorah.com/swagger/ui/index#!/Refund/Refund_MakeSupplierRefund).

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](https://docs.myfatoorah.com/docs/test-token).

> ❗️ Refund Request Responsibility
>
> Please make sure to send one refund request each time, to avoid duplicate partial refund requests (You need to handle this from your system front-end side).\
> Moreover, Kindly note that the refund request responsibility is on the vendor side not on MyFatoorah Side.

<hr />

## **Request Model**

The request is a POST request with the following parameters:

| Input Parameter        | Type                                                         | Description                                                                      |
| :--------------------- | :----------------------------------------------------------- | :------------------------------------------------------------------------------- |
| **KeyType**            | string                                                       | State either it's "InvoiceId" or "PaymentId"                                     |
| **Key**                | string                                                       | Value of the key type mentioned                                                  |
| **VendorDeductAmount** | number, optional                                             | The amount that the vendor will refund from their balance                        |
| **Comment**            | string                                                       | Extra comments for your reference                                                |
| **ExternalIdentifier** | string                                                       | External data associated with the refund, which will be received in the webhook. |
| **Suppliers**          | Array of [RefundSupplier](#refundsupplier) objects, optional |                                                                                  |

## RefundSupplier

| Input Parameter            | Type              | Description                                                  |
| :------------------------- | :---------------- | :----------------------------------------------------------- |
| **SupplierCode**           | integer, optional | The supplier code you need to associate the invoice with.    |
| **SupplierDeductedAmount** | number, optional  | The amount that the supplier will send back to the customer. |

> ❗️ Currency Parameter
>
> In the request the currency parameter has been omitted, as the value passed for the refund would represent the account base currency based on the token you are using. So, please get sure of the amount and used token as they determine the exact amount to be refunded

<hr />

## **Response Model**

After viewing the [Response Model](https://docs.myfatoorah.com/docs/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                                                                         |
| :--------------------- | :----- | :---------------------------------------------------------------------------------- |
| **Key**                | string | The key value you have passed for the Request Transaction                           |
| **RefundId**           | number |                                                                                     |
| **RefundReference**    | string | The refund reference generated by MyFatoorah for following up with the finance team |
| **RefundInvoiceId**    | number | The InvoiceId of the refunded amount                                                |
| **Amount**             | string | The amount needed to be refunded                                                    |
| **Comment**            | string | The comments that you have passed in the request.                                   |
| **ExternalIdentifier** | string | The External Identifier you provided in the request                                 |

## **Sample Message**

```json Make Refund Request
{
    "Key": 6424985,
    "KeyType": "InvoiceId",
    "VendorDeductAmount": 0,
     "ExternalIdentifier": "refund-external-id",
    "Comment": "refund-comment",
    "Suppliers": [
        {
            "SupplierCode": 2,
            "SupplierDeductedAmount": 5
        }
    ]
}
```
```json Make Refund Response
{
    "IsSuccess": true,
    "Message": "Refund Created Successfully!",
    "ValidationErrors": null,
    "Data": {
        "Key": "6424985",
        "RefundId": 246274,
        "RefundReference": "2026000011",
        "RefundInvoiceId": 6426234,
        "ExternalIdentifier": "refund-external-id",
        "Amount": 5.0,
        "Comment": "refund-comment"
    }
}
```