---
title: "MakeSupplierRefund"
method: POST
path: "/v2/MakeSupplierRefund"
tags: ["Refund"]
---

# MakeSupplierRefund

`POST /v2/MakeSupplierRefund`

Cancels a payment and returns the funds to the customer for invoices that have supplier information. This endpoint is specifically designed for the Multiple Suppliers feature and accepts invoices that contain one or more suppliers.

## Request body

- object
  - `KeyType` 'InvoiceId' | 'PaymentId', required — State either it's 'InvoiceId' or 'PaymentId' to identify the transaction to be refunded.
  - `Key` string, required — Value of the key type mentioned. If KeyType is 'InvoiceId', provide the invoice ID. If KeyType is 'PaymentId', provide the payment ID.
  - `VendorDeductAmount` number — 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` object[] — Array of RefundSupplier objects specifying the refund amounts for each supplier.
    - `SupplierCode` integer — The supplier code you need to associate the invoice with.
    - `SupplierDeductedAmount` number — The amount that the supplier will send back to the customer.

## Response `200`

Supplier refund processed successfully

- object
  - `IsSuccess` boolean — Indicates if the request was successful.
  - `Message` string — Response message associated with the refund request.
  - `ValidationErrors` object[] — List of validation errors, if any.
    - `Name` string — Name of the field with validation error.
    - `Error` string — Description of the validation error.
  - `Data` object, nullable
    - `Key` string — The key value you have passed for the Request Transaction.
    - `RefundId` number — The unique identifier for this refund transaction.
    - `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.

---

[API](https://skmtc.net/myfatoorah/apis/myfatoorah-api-v3.md) · [All operations](https://skmtc.net/myfatoorah/apis/myfatoorah-api-v3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/myfatoorah/myfatoorah-api-v3/revisions/994a74287a16/schema)
