Split by Percentage after Transaction

You can split after a transaction is complete using the  payment_split API by percentage, where you must ensure that the sum of the percentage of all splits is equal to 100.

📘

Note:

You must specify two decimal places for each split, but ensure the sum of the percentage of all splits is equal to 100.

HTTP Method: POST

Environment

Request structure for var1 to be included in  payment_split API

The sample JSON structure for a split request:

{
  "type": "percentage",
  "payuId": "xxxxxxxx", # PayuID of parent transaction which needs to be split.
  "splitInfo": {
    "merchantKey1": {
      "aggregatorSubTxnId": "30nknyhkhib",
      "aggregatorSubAmt": "53.33", // %age wrt to total payable amount
      "aggregatorCharges": "13.33" // parent merchant commission (Optional) | %age wrt to total payable amount
    },
    "merchantKey2": {
      "aggregatorSubTxnId": "13u0nknou0", //%age wrt to total payable amount
      "aggregatorSubAmt": "13.33" // %age wrt to total payable amount
    },
    "merchantKey3": {
      "aggregatorSubTxnId": "13u0nknou0",
      "aggregatorSubAmt": "13.33", // %age wrt to total payable amount
      "aggregatorCharges": "6.68" // parent merchant commission (Optional) | %age wrt to total payable amount
    }
  }
}

Fields in JSON request

FieldDescriptionExample
typeThe type of split is specified in this field. Specify percentage must be specified in this field for split by percentage.percentage
payuidThe payment identifier provided by PayU for the transaction.403993715525003544
splitInfoThis parameter must include the list of aggregator sub transaction IDs and sub amounts as specified in the Request Structure for var1 subsection:
- aggregatorSubTxnId: The aggregator sub transaction ID is specified in this field.
- aggregatorSubAmt: The aggregator sub amount is specified in this field.
- aggregatorCharges: The aggregator charges is specified in this field.
Note: The aggregatorCharges field can only be used by parent merchant to get the aggregator commission.

Sample response

Without convenience fee

{
  "status": 1,
  "message": "Splits creation successful.",
  "splitStatus": "success",
  "splitSegments": [
    {
      "merchantKey": "merchantKey1",
      "amount": 50,
      "subvention_amount": 0,
      "txnId": "CHild101",
      "additional_charges": 0,
      "transaction_fee": 50    },
    {
      "merchantKey": "merchantKey2",
      "amount": 50,
      "subvention_amount": 0,
      "txnId": "Child202",
      "additional_charges": 0,
      "transaction_fee": 50    },
  ]
}

With convenience fee

The response for Rs.100 transaction with Rs. 10 as convenience fee:

{
  "status"1,
  "message": "Splits creation successful.",
  "splitStatus": "success",
  "splitSegments": [
    {
      "merchantKey": "merchantKey1",
      "amount": 40,
      "subvention_amount": 0,
      "txnId": "T1",
      "additionalCharges": 0,
      "transaction_fee": 40
    },
    {
      "merchantKey": "merchantKey2",
      "amount": 60,
      "subvention_amount": 0,
      "txnId": "T1",
      "additionalCharges": 0,
      "transaction_fee": 60
    },
    {
      "merchantKey": "parentMerchantKey",
      "amount": 10,
      "subvention_amount": 0,
      "txnId": "T",
      "additionalCharges": 10,
      "transaction_fee": 0
    }
  ]
}