The Get Split Info API is used for getting split info of the parent transaction in the aggregator flow.
Request parameters
The request body contains the following parameters:
Params | Description | Example |
|---|---|---|
key
| Merchant key provided by PayU | JPM***g |
command | This parameter must contain the API Command for getting Transaction. It should be | |
var1 | This parameter must contain the PayU ID | 403993715532325577 |
hash | This parameter must contain the hash value to be calculated at your end. Hash logic for this API is: |
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
Parameter | Description | Example |
|---|---|---|
status | This parameter returns the status of web service call. The status can be any of the following:
| 0 |
payuId | This parameter returns the parent merchant PayU ID that was posted in the API request. | 403993715532325577 |
splitStatus | This parameter returns the reason string. For a list of error codes for failure scenarios, refer to Error codes for failure scenario | success |
splits | This parameter contains the response in a JSON array format. Each JSON object contains the following:
| |
Sample response
Success scenario
{
"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
Condition | error_code | error_message |
|---|---|---|
Hash validation failed | AGG-300 | Hash validation failed |
invalid parent transaction Payu ID:
| AGG-301 | Invalid PayuID |
Split doesn’t exist for the transaction | AGG-302 | Split doesn't exist for this transaction |
