Create a Payment Split

To create a payment split for transactions, you must first add all the vendors involved and then specify the amount to be settled for each vendor.

Cashfree provides you with the flexibility to easily integrate your website or mobile application with Cashfree Payment Gateway to easily split payments with vendors and partners on time. Collect payments, set up a flexible settlement cycle and simplify customer refund management with Cashfree.

To split payments to vendors,

  1. Add Vendors
  2. Split Payment
  3. Reconcile

📘

Example of a Payment Split

  1. Customer orders 3 items on an e-commerce website ABC worth Rs. 2000. The items purchased are from 3 different vendors.
  2. Seller A - Rs. 800, Seller B - Rs. 400, Seller C - Rs. 500. The remaining amount of Rs. 300 includes service (Rs. 200) and delivery charges (Rs. 100).
  3. You need to specify how the payment must be split to each of the stakeholders involved. You can specify the amount or percentage based on the order amount.
  4. Split Payment details:
    Seller A - Rs. 760 (ABC commission amount Rs. 40)
    Seller B - Rs. 380 (ABC commission amount Rs. 20)
    Seller C - Rs. 380 (ABC commission amount Rs. 120)
    Delivery Service - Rs. 100
  5. Specified amount will be transferred to the stakeholders. The remaining amount after deducting Cashfree's charges will be transferred to ABC's bank account.
[
     {
       "vendorId" : "Seller A",
       "amount" : 760
     },
     {
       "vendorId" : "Seller B",
       "amount" : 380
     }
     {
      "vendorId" : "Seller C",
      "amount" : 380
     }
     {
       "vendorId" : "Delivery Service",
       "amount" : 100
     }
]

Add Vendors

To initiate a payment split, you must first add all the vendors involved in the transaction. You can add the vendors individually or in batches using the product dashboard, or you can use the APIs to add.

Split Payment

To split payments on your website, you should integrate using our Checkout and Seamless Pro integration methods and include the paymentSplits parameter. You can also use our mobile SDK to split the payments.

If you are using the new Payment Gateway APIs for integration use order_splits parameter instead of paymentSplits to split the payment.

You can specify the split value in amount (INR) or percentage (of order amount). Payments through Cards, UPI, Netbanking, and all major Wallets (except PayTM and PayPal) are supported.

You assign each vendor a Vendor ID which must be passed with the split amount as shown below.

While submitting the order details, an extra parameter, paymentSplits must be passed. The parameter paymentSplits is a base64 encoded JSON array of Vendor Ids and their corresponding splits. To generate paymentSplits first generate the JSON array of Vendors as follows:

[
 {
   "vendorId" : "Vendor_1",
   "percentage" : 10
 },
 {
   "vendorId" : "Vendor_2",
   "amount" : 15000
 }
]

📘

If any of the below conditions fail, the order will not be created:

  • The Easy Split feature is enabled for your Cashfree Account and you have added the required vendor's details.
  • The sum of all split amounts/percentages must be equal to or less than the order amount.
    If the total split is less than the order amount the remaining amount will be processed as merchant settlement.
  • The number of vendor splits is less than 20.

Once the JSON array is generated, encode it using the base64 encoding. The resulting value is the paymentSplits to be attached during the order creation.

For example, the base64 encoded value of the above JSON array will look like this:

paymentSplits => "WwoJewoJCSJiZW5lSWQiIDogIkFYSVNfRlVORCIsCgkJInNwbGl0QW1vdW50IiA6IDEwMDAwCgl9LAoJewoJCSJiZW5lSWQiIDogIkhERkNfRlVORCIsCgkJInNwbGl0QW1vdW50IiA6IDE1MDAwCgl9Cl0K"

Integrating paymentSplits

The paymentSplits value generated above must be sent during the PG order creation. For Checkout and Seamless Pro, include an additional field in the form you generate:

<input type="hidden" name="paymentSplits" value="<payment_split_value>"/>

Reconcile

All payments or settlements made to your vendors is available in the vendor settlement report and vendor settlement reconciliation report. You can also use our APIs to view the settlement details.


Integrating Payment Splits for Mobile SDKs

The paymentSplits value generated above must be sent as part of the input parameters while invoking the SDK function.

The code specific to each platform is available below:

Android

params.put("paymentSplits","<payment_split_value>");

iOS

[
   ...//other input params
   "paymentSplits": "payment_split_value",
]

React Native

var map = {
  ... // required params
  'paymentSplits': 'payment_split_value',
}

Flutter

inputs[ "paymentSplits"] = “payment_split_value”;

Xamarin (Android, iOS, and Forms)

params["paymentSplits"] = "payment_split_value";

Cordova

params.put( "paymentSplits", “payment_split_value”);