Get Split Info API

The Get Split Info API is used for getting split info of the parent transaction in the aggregator flow.

Environment

Request parameters

The request body contains the following parameters:

ParamsDescriptionExample
key
mandatory
Merchant key provided by PayUJPM***g
command
mandatory
This parameter must contain the API Command for getting Transaction. It should be get_split_info for Get Split Info API.
var1
mandatory
This parameter must contain the PayU ID 403993715532325577
hash
mandatory
This parameter must contain the hash value to be calculated at your end. Hash logic for this API is: sha512(key|command|payuId|salt)
sha512

Sample request

curl --location 'https://test.payu.in/merchant/postservice.php?form=1' \
--header 'Cookie: PHPSESSID=j601h8g2u1cofo4u5it8v1lk8r; PHPSESSID=670cf11080b74' \
--form 'key="JPM***g"' \
--form 'command="get_split_info"' \
--form 'var1="403993715532325577"' \
--form 'hash="49fa996d81f66374fbe2eedfc494b48149f1abb9555afa0b0c03d671d7a769efd07e40eabee6571fba124966b1a2d219b8118ff9500456effb1e0ae63d94a3e2"' \

Response parameters

ParameterDescriptionExample
statusThis parameter returns the status of web service call. The status can be any of the following:
0 - If web service call failed.
1 - If web service call succeeded
0
payuIdThis parameter returns the parent merchant PayU ID that was posted in the API request.403993715532325577
splitStatusThis parameter returns the reason string. For a list of error codes for failure scenarios, refer to Error codes for failure scenariosuccess
splitsThis parameter contains the response in a JSON array format. Each JSON object contains the following:

- merchant key
- aggregator sub-transaction ID
- amount
- Transaction_details field.
{ "merchantKey": "iC***G", "aggregatorSubTxnId": "dkjgfrfgnfm", "amount": 900.00, "splitType": "split" }

Sample response

Success scenariro

{
    "status": 1,
    "payuId": 403993715532325577,
    "splitStatus": "success",
    "splits": [
        {
            "merchantKey": "iC***G",
            "aggregatorSubTxnId": "dkjgfrfgnfm",
            "amount": 900.00,
            "splitType": "split"
        },
        {
            "merchantKey": "ut***U",
            "aggregatorSubTxnId": "dkfhdgfcdcddfn",
            "amount": 100.00,
            "splitType": "commission"
        }
    ]
}

Error codes for failure scenario

Conditionerror_codeerror_message
Hash validation failedAGG-300Hash validation failed
invalid parent transaction Payu ID:

- non-existent PayuID
- PayuID is not a parent transaction of aggregator flow
- Payu ID belongs to some other merchant.
AGG-301Invalid PayuID
Split doesn’t exist for the transactionAGG-302Split doesn't exist for this transaction