API Reference

Overview

Merchants who manage multiple sub-vendors can streamline payments using UPay’s Multi-vendor API. This feature allows a single payment request to handle payments across multiple sub-vendors.

Steps to Enable Multi-vendor API

  1. Using the Multi-vendor API
    To activate the multi-vendor functionality, include an array called "ExtraMerchantsData" within your payment request. This array allows you to provide specific information for each sub-vendor involved in the transaction.

  2. Manage Payments for Sub-vendors
    With the "ExtraMerchantsData" array, you can define details for multiple sub-vendors, making it easy to organize and distribute payments efficiently within a single transaction. Fees for multiple sub-vendors can be defined within the array for each transaction.

  3. Set Up Your UPay Account
    Ensure you have a UPay account with complete and verified information in the “My Account” section. This information is essential for verification purposes, and once verified, deposits can be facilitated through this account.

This setup provides an efficient way to manage transactions for multiple sub-vendors, saving time and simplifying reconciliation. If you need additional assistance with setting up the Multi-vendor API, our support team is here to help!

Request Model

The request is a POST request with the following parameters:

Input ParameterTypeLengthDescription
extraMerchantData.knetChargefloat, mandatory2,2Main vendor Knet charge rate for the sub vendor. This is the merchant's (main vendor) commission for each transaction from the sub-vendor. This amount is credited to the main vendor
extraMerchantData.knetChargeTypestring, mandatory10Knet charge type (Fixed or Percentage)
extraMerchantData.ccChargefloat, mandatory2,2Main vendor Credit Card charge rate for the sub-vendor. This is the merchants' (main vendor) commission for each transaction from the sub-vendor. (Includes MasterCard, Visa, Samsung Pay, Google Pay, and Apple Pay). This amount is credited to the main vendor
extraMerchantData.ccChargeTypestring, mandatory10CC charge type (Fixed or Percentage)
extraMerchantData.ibanNumberstring, array, mandatory30Sub-vendor IBAN Numbers. Defines which Sub vendor bank account to deposit the Order amount after commisions are deducted.
"extraMerchantData": [
	{
		"amount": 100,
		"knetCharge": 0.500,
		"knetChargeType": "fixed",
		"ccCharge": 10,
		"ccChargeType": "percentage",
		"ibanNumber": KW81CBKU0000000000001234560101"
	},
	{
		"amount": 120,
		"knetCharge": 0.750,
		"knetChargeType": "fixed",
		"ccCharge": 12,
		"ccChargeType": "percentage",
		"ibanNumber": "KW81CBKU0000000000001234560101"
	}
]

Example

"extraMerchantData": [
        {
            "amount": 100,
            "knetCharge": 0.900,
            "knetChargeType": "percentage",
            "ccCharge": 10,
            "ccChargeType": "percentage",
            "ibanNumber": "Sub-vendor-A"
        },
        {
            "amount": 120,
            "knetCharge": 10,
            "knetChargeType": "percentage",
            "ccCharge": 15,
            "ccChargeType": "percentage",
            "ibanNumber": "Sub-vendor-B"
        },
        {
            "amount": 30,
            "knetCharge": 0.750,
            "knetChargeType": "fixed",
            "ccCharge": 18,
            "ccChargeType": "percentage",
            "ibanNumber": "Sub-vendor-C"
        }
    ]

Explanation

For Sub-vendor-A

  • If a cardholder pays through KNET, Sub-vendor-A gets 99.100KWD and 0.900 KWD will go to the main vendor (API owner).
  • If a cardholder pays via MasterCard/Visa/Apple Pay/Samsung Pay/Google Pay, the Sub-vendor-A will get 90 KWD (90%) and 10% will go to the main vendor which is the owner of the API.

For Sub-vendor-B

  • If a cardholder pays through KNET, Sub-vendor-B gets 108 KWD and 12 KWD (10%) will go to the main vendor (API owner).
  • If a cardholder pays via MasterCard/Visa/Apple Pay/Samsung Pay/Google Pay, the Sub-vendor-B will get 102 KWD (85%) and 18 KWD (15%) will go to the main vendor which is the owner of the API.

For Sub-vendor-C

  • If a cardholder pays through KNET, Sub-vendor-C gets 29.250 KWD and 0.750 KWD will go to the main vendor (API owner).
  • If a cardholder pays via MasterCard/Visa/Apple Pay/Samsung Pay/Google Pay, the Sub-vendor-C will get 24.6 KWD (82%) and 5.4KWD (18%) will go to the main vendor which is the owner of the API.