You must specify two decimal places for each split, but ensure the sum split amounts are equal to the transaction amount.
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
Test Environment | <https://test.payu.in/merchant/postservice.php?form=2> |
Production Environment | <https://info.payu.in/merchant/postservice.php?form=2> |
Request parameters
Parameter | Description | Sample Value |
---|---|---|
key |
|
vDy3i7 |
command |
|
payment_split |
hash |
|
 |
var1 |
|
For an example, refer the Request Structure subsection. |
JSON request structure
The var1 parameter is in JSON format. The fields in the JSON format are described in the following table:
Field | Description | Example |
---|---|---|
type |
The type of split is specified in this field. Use absolute in this field. The absolute amount is specified for each part of the split. The absolute amount is specified in the aggregatorSubAmt field of the JSON for each child or aggregator. |
absolute |
payuid |
The payment identifier provided by PayU for the transaction. |
403993715525003544 |
splitInfo |
This parameter must include the list of aggregator sub transaction IDs and sub amounts as specified in the Request Structure for var1 subsection:
|
Refer to Request Structure for var1 subsection. |
Request structure for var1 to be included in payment_split API
{  "type": "absolute", Â
"payuId": "xxxxxxxx", # PayuID of parent transaction which needs to be split. Â
"splitInfo":
{Â Â Â Â
"merchantKey1":
{
"aggregatorSubTxnId": "30nknyhkhib",
"aggregatorSubAmt": "8",
"aggregatorCharges": "2" // parent merchant commission (Optional)Â Â Â Â
},
"merchantKey2":
{
      "aggregatorSubTxnId": "13u0nknou0",
      "aggregatorSubAmt": "2"
    },
    "merchantKey3":
{
      "aggregatorSubTxnId": "13u0nknou02",
      "aggregatorSubAmt": "2",
      "aggregatorCharges": "1" // parent merchant commission (Optional)
}
  }
}
Sample response
Sample response for a successful split:
{Â Â
"status": 1, Â
"message": "Splits creation successful.", Â
"splitStatus": "success",  "splitSegments":
[
    {
      "merchantKey": "merchantKey1",
      "amount": 8,
      "subvention_amount": 0,
      "txnId": "30nknyhkhib",
      "additional_charges": 0,
      "transaction_fee": 8    },
    {
      "merchantKey": "merchantKey2",
      "amount": 2,