Split Validation
The Split Validation API helps validate how a payment is distributed across multiple accounts before processing a transaction. This ensures accurate, real-time validation of split settlement logic for vendor and self-owned accounts. Ideal for platforms handling multiple payouts, it prevents common errors like exceeding amounts or using invalid account IDs. Use this API to streamline split payments and maintain seamless payment gateway operations.
Environment
| Environment | HTTP Method | API |
|---|---|---|
Sandbox | POST | https://api-preprod.phonepe.com/apis/pg-sandbox/settlements/v1/split-settlement/validate |
Production | | https://api.phonepe.com/apis/pg/settlements/v1/split-settlement/validate |
Request
| Header Name | Header Value |
| Content-Type | application/json |
| Authorization | O-Bearer <partner-auth-token> |
| X-MERCHANT-ID | MID |
| Parameter Name | Type | Description |
|---|---|---|
totalAmount | Integer | Total amount specified in paisa. |
type | enum | Possible values: • ABSOLUTE • PERCENT |
accountId | Integer | Unique identifier of the account. This value is received from the Get Account Info API response |
{
"totalAmount": 10000, //Paisa
"type": "ABSOLUTE",
"accountsSplit": [
{
"accountId": "ACC1234",
"value": 3000
},
{
"accountId": "ACC3456",
"value": 2000
}
]
}Response
{
"isValid":
true,
"maxAllowedAmountForSplit": 9400
}{
"isValid": false
}{
"errorCode": "SPLIT_SETTLEMENT_NOT_ENABLED",
"message": "message"
}
{
"errorCode": "INVALID_SPLIT_DETAILS",
"message": "Duplicate Account Id"
}
{
"errorCode": "INVALID_SPLIT_DETAILS",
"message": "Split Account is not enabled or valid"
}| Parameter Name | Type | Description |
|---|---|---|
isValid | Boolean | • True: Split is Valid • False: Split is Invalid |
| Double | The maximum total split amount where we can guarantee the split will be successful as the remaining amount will be cut as MDR depending upon instrument. |
⚠️ Set maxAllowedAmountForSplit After MDR Deduction!
maxAllowedAmountForSplit should be the exact amount that needs to be split after MDR deduction. This ensures that the split amount is correctly calculated based on the net payable value.
Example:
If the total amount is Rs. 100 and MDR is Rs. 2, then:maxAllowedAmountForSplit = Rs. 98