Split payments products and prices
Each request to create a Split payment may be accompanied (and in some cases is required) by information about the list of goods or services included in the payment. For this purpose, the products array is used, which allows passing a list of goods/services for a specific sub-merchant (sub_merchant_id) within a single Split payment.
When using the Monobank and PrivatBank Installment Payment services, passing the products array is mandatory.
The products array may be provided only for selected sub-merchants within a Split payment. If the products array is provided and is not empty, a business validation rule is applied: the total cost of the products must match the amount of the corresponding sub-payment (split[i].amount).
To include product or service information in a Split payment, the payment creation request must contain the products parameter describing the items and their quantitative and qualitative characteristics.
Within each split[], the following optional fields are available:
"split[]": {
"sub_merchant_id": string,
"amount": number,
"products": [
{
"name": "Aname",
"amount": 1,
"currency": "UAH",
"qty": 5,
"id": "1",
"unit": "kg",
}
]
}
For each product: lineAmount = (amount * qty)
Default values and limits:
qtydefaults to 1 if not providedamount- maximum 2 decimal placesqty- maximum 3 decimal places
Приклад повного split-запиту:
-X POST -d '{
"pos_id": "${POS_ID}",
"mode": "hosted",
"method": "purchase",
"amount": 100,
"currency": "UAH",
"description": "description_1",
"order_id": "123",
"order_3ds_bypass": "always",
"server_url": "https://callback.blackhole.com/callback",
"result_url": "https://example.com/result",
"split": [
{
"sub_merchant_id": "6c833321-9e48-4ad7-9708-fead9f60a1b4",
"amount": 70,
"products": [
{
"id": "1",
"name": "Aname",
"amount": 70,
"currency": "UAH",
"qty": 5,
}
]
},
{
"sub_merchant_id": "9a124f88-3b9e-4a3d-8c7e-4d1c2f8e91aa",
"amount": 30,
"products": [
{
"id": "1",
"name": "Вname",
"amount": 30,
"currency": "UAH",
"qty": 1,
}
]
}
]
}'