Absolute Split After Transaction Integration
Use this integration to split a completed parent transaction into fixed amounts using the payment_split API.
In absolute split mode, each child merchant receives a fixed amount through aggregatorSubAmt.
Prerequisites
Before you start, ensure the following:
- Your parent merchant account is activated for Split Settlements.
- Child merchants have completed onboarding process and are marked Completed/Active .
- You have your parent merchant
keyandsalt, along with the child merchant(s) key. - You have server-side logic to generate hash and process webhooks/You have the
payuIdof the already completed parent transaction.
Steps to integrate:
Verify the payment status to confirm the transaction is successful before initiating the split
Prepare the var1 JSON payload with the required split details and partner-specific parameters
Generate a secure hash for the API request to ensure data integrity and authentication
Make the API call to the payment_split endpoint to execute the split on the verified transaction
Step 1: Verify the Payment
After completing the payment using the Collect Payment (_payment) API, perform this step to verify the payment.
Reference: Refer to any of the following API Reference pages for the sample request/response for collecting payments using the Collection (_payment) API:
Upon receiving the response, PayU recommends performing a reconciliation step to validate all transaction details. You can verify your payments using either of the following methods:
Upon receiving the response, PayU recommends you performing a reconciliation step to validate all transaction details.
You can verify your payments using either of the following methods:
Configure the webhooks to monitor the status of payments.
Webhooks enable a server to communicate with another server by sending an HTTP callback or message.
These callbacks are triggered by specific events or instances and operate at the server-to-server (S2S) level.
Know how to manage Webhooks for Payments.
Step 2: Prepare var1 JSON payload
Set type as absolute and pass parent payuId:
{
"type": "absolute",
"payuId": "403993715525003544",
"splitInfo": {
"merchantKey1": {
"aggregatorSubTxnId": "subtxn-abs-after-001",
"aggregatorSubAmt": "800.00",
"aggregatorCharges": "100.00"
},
"merchantKey2": {
"aggregatorSubTxnId": "subtxn-abs-after-002",
"aggregatorSubAmt": "100.00"
}
}
}Important: Ensure all split amounts and charges map correctly to the original transaction amount.
Step 3: Generate hash
Use:
sha512(key|command|var1|salt)Where:
command=payment_splitvar1= compact JSON string from Step 1
Step 4: Call payment_split API
Environment endpoints:
- Test:
https://test.payu.in/merchant/postservice.php?form=2 - Production:
https://info.payu.in/merchant/postservice.php?form=2
Sample request:
curl -X POST "https://test.payu.in/merchant/postservice.php?form=2" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "key=vDy3i7" \
-d "command=payment_split" \
-d 'var1={"type":"absolute","payuId":"403993715525003544","splitInfo":{"merchantKey1":{"aggregatorSubTxnId":"subtxn-abs-after-001","aggregatorSubAmt":"800.00","aggregatorCharges":"100.00"},"merchantKey2":{"aggregatorSubTxnId":"subtxn-abs-after-002","aggregatorSubAmt":"100.00"}}}' \
-d "hash=<generated_hash>"Sample success response:
{
"status": 1,
"message": "Splits creation successful.",
"splitStatus": "success",
"splitSegments": [
{
"merchantKey": "merchantKey1",
"amount": 800,
"subvention_amount": 0,
"txnId": "subtxn-abs-after-001",
"additional_charges": 0,
"transaction_fee": 800
},
{
"merchantKey": "merchantKey2",
"amount": 100,
"subvention_amount": 0,
"txnId": "subtxn-abs-after-002",
"additional_charges": 0,
"transaction_fee": 100
}
]
}Updated about 1 hour ago
