Setting Up Payment Splitting (Split Payments) on 1C-Bitrix
A split payment is the automatic distribution of a payment amount among multiple recipients at the moment of the transaction. This is relevant for marketplaces: the buyer pays one total amount, and the platform automatically transfers shares to sellers while retaining a commission. In 1C-Bitrix, this is non-standard functionality — it is implemented through a payment aggregator that supports splits.
When Split Payments Are Needed
- Marketplace — an order contains goods from multiple sellers, each of whom must receive their share
- Partner model — a percentage of the payment goes to a referrer or agent
- Holding structure — multiple legal entities, one website
Without split payments, the alternative is manual transfers at the end of a period (weekly/monthly). This does not scale well and creates cash flow gaps.
YooKassa: Split via Marketplace API
YooKassa supports split payments via the transfers parameter when creating a payment:
$payment = $yookassaClient->createPayment([
'amount' => ['value' => '10000.00', 'currency' => 'RUB'],
'capture' => true,
'description' => 'Order with multiple sellers',
'transfers' => [
[
// Transfer to seller 1 (7,000 RUB)
'account_id' => 'seller_yookassa_account_id_1',
'amount' => ['value' => '7000.00', 'currency' => 'RUB'],
'platform_fee_amount' => ['value' => '700.00', 'currency' => 'RUB'], // platform commission
'description' => 'Order ' . $orderId . ': seller 1 goods',
'metadata' => ['seller_id' => $sellerId1],
],
[
// Transfer to seller 2 (2,000 RUB; remaining 1,000 RUB is the platform commission)
'account_id' => 'seller_yookassa_account_id_2',
'amount' => ['value' => '2000.00', 'currency' => 'RUB'],
'platform_fee_amount' => ['value' => '200.00', 'currency' => 'RUB'],
'description' => 'Order ' . $orderId . ': seller 2 goods',
'metadata' => ['seller_id' => $sellerId2],
],
],
'metadata' => ['order_id' => $orderId],
], uniqid('', true));
The sum of all transfers.amount values must not exceed the total payment amount. The difference remains in the platform account.
Share Calculation in 1C-Bitrix
class SplitPaymentCalculator
{
public function calculate(\Bitrix\Sale\Order $order): array
{
$transfers = [];
$platformFeeRate = 0.10; // 10% platform commission
foreach ($order->getBasket()->getOrderableItems() as $item) {
$sellerId = $item->getField('SELLER_ID');
$itemTotal = $item->getFinalPrice();
$sellerAmount = $itemTotal * (1 - $platformFeeRate);
$platformFee = $itemTotal * $platformFeeRate;
$transfers[$sellerId]['amount'] = ($transfers[$sellerId]['amount'] ?? 0) + $sellerAmount;
$transfers[$sellerId]['fee'] = ($transfers[$sellerId]['fee'] ?? 0) + $platformFee;
}
// Convert to YooKassa format
$result = [];
foreach ($transfers as $sellerId => $data) {
$seller = SellerTable::getById($sellerId)->fetch();
$result[] = [
'account_id' => $seller['YOOKASSA_ACCOUNT_ID'],
'amount' => ['value' => number_format($data['amount'], 2, '.', ''), 'currency' => 'RUB'],
'platform_fee_amount' => ['value' => number_format($data['fee'], 2, '.', ''), 'currency' => 'RUB'],
];
}
return $result;
}
}
Refund with Split Payment
Refunding a split payment requires specifying from which account the refund is made:
$refund = $yookassaClient->createRefund([
'payment_id' => $paymentId,
'amount' => ['value' => $refundAmount, 'currency' => 'RUB'],
'sources' => [
[
'account_id' => $sellerAccountId,
'amount' => ['value' => $refundAmount, 'currency' => 'RUB'],
'platform_fee_amount' => ['value' => $platformFeeToRefund, 'currency' => 'RUB'],
],
],
], uniqid('', true));
Timeline
| Task | Duration |
|---|---|
| Share calculation + YooKassa transfers integration | 2–3 days |
| Seller account table + linking | 1 day |
| Refund logic for split payments | 1 day |







