Features Documentation

CustomizeSupplierCommissions

Endpoint

Overview

The "CustomizeSupplierCommissions" endpoint is a POST request. It is used to set a customized commission for the supplier based on the payment method that will be used to make the payment. Detailed functionality of how to use this endpoint is explained in the Multiple Suppliers section.

The endpoint on Swagger is Supplier_CustomizeSupplierCommissions.

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
SupplierCodeinteger
SupplierCommissionsSupplierCommissions object, optional

SupplierCommissions

This parameter is used for payment methods that have the authorization and capture feature enabled.

Input Parameter

Type

Value

PaymentMethodId

integer

CommissionValue

integer

A fixed value that will be deducted from each transaction.

CommissionPercentage

integer

A percentage value that will be deducted from each transaction.

IsPercentageOfNetValue

Boolean

  • *true**: deduct the percentage from the (total amount - transaction fees)
  • *false**: deduct the percentage from the total amount
    Affects only in case of one supplier in the request.

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
SupplierCodeinteger
SupplierEmailstring
Datestring

Sample Message

{
    "SupplierCode": 11,
    "SupplierCommissions": [
        {
            "PaymentMethodId": 1,
            "CommissionValue": 1,
            "CommissionPercentage": 1,
            "IsPercentageOfNetValue": true
        },
        {
            "PaymentMethodId": 11,
            "CommissionValue": 0.1,
            "CommissionPercentage": 10,
            "IsPercentageOfNetValue": false
        }
    ]
}
{
    "IsSuccess": true,
    "Message": "The Supplier Updated Successfully!",
    "FieldsErrors": null,
    "Data": {
        "SupplierCode": 11,
        "SupplierEmail": "[email protected]",
        "Date": "2022-06-21T12:25:00.94"
    }
}