Integration of 1C-Bitrix with Split Services (Yandex Split, Dolyame)
Split-payment is not credit. Customer doesn't borrow from a bank, doesn't pass 15-minute scoring and doesn't sign a credit contract. Purchase sum is divided into 2–4 equal payments, first immediately, others — automatic card debit in 2, 4, 6 weeks. For a store this means: money for goods arrives fully immediately (or in 1–2 days), customer pays the installment via service. Integration of Yandex Split and Dolyame with 1C-Bitrix differs by API but identical in architecture.
Yandex Split: Technical Integration
Yandex Split works through Yandex Pay SDK. Connection consists of two parts: frontend widget and backend handler.
Frontend. On checkout page or product card connect SDK:
<script src="https://pay.yandex.ru/sdk/v1/pay.js"
onload="onYaPayLoad()"
async></script>
Button initialization:
function onYaPayLoad() {
const YaPay = window.YaPay;
YaPay.Button.create({
merchantId: 'YOUR_MERCHANT_ID',
currencyCode: YaPay.CurrencyCode.Rub,
cart: {
items: [{
productId: 'SKU123',
total: {amount: '25000.00'}
}]
},
paymentType: 'SPLIT' // This enables split
})
.mount(document.getElementById('ya-split-button'));
}
Parameter paymentType: 'SPLIT' is key. Without it the button works as regular Yandex Pay (full payment).
Backend. After customer confirms split-payment in Yandex interface, Yandex sends webhook to your callbackUrl. Handler must:
- Verify JWT-token from request header
- Create order in 1C-Bitrix (
\Bitrix\Sale\Order::create) - Confirm receipt via Yandex API (
POST /api/merchant/v1/orders/{orderId}/capture) - Update payment status
Payment System Handler for Yandex Split
In 1C-Bitrix create handler in /local/php_interface/include/sale_payment/yandex_split/.
Class inherits \Bitrix\Sale\PaySystem\ServiceHandler and implements:
public function initiatePay(
\Bitrix\Sale\Payment $payment,
\Bitrix\Main\Request $request = null
) {
// Render template with JS Yandex Split button
// Pass cart data to JS
$this->setExtraParams([
'MERCHANT_ID' => $this->getBusinessValue($payment, 'MERCHANT_ID'),
'CART_ITEMS' => $this->getCartItems($payment),
'AMOUNT' => $payment->getSum(),
]);
return $this->showTemplate($payment, 'template');
}
Template template/template.php renders Yandex Pay button with SPLIT parameter.
Dolyame (Dolyame): Integration
"Dolyame" — service from T-Bank (formerly Tinkoff). API differs from Yandex Split, but principle is same.
Endpoint: https://partner.dolyame.ru/v1/orders
Order creation:
$response = $this->apiRequest('POST', '/v1/orders', [
'id' => $payment->getField('ORDER_ID'),
'amount' => $payment->getSum(),
'prepaid_amount' => 0,
'items' => $this->formatItems($payment),
'client_info' => [
'first_name' => $order->getPropertyValueByCode('NAME'),
'last_name' => $order->getPropertyValueByCode('LAST_NAME'),
'phone' => $order->getPropertyValueByCode('PHONE'),
'email' => $order->getPropertyValueByCode('EMAIL'),
],
'notification_url' => $this->getCallbackUrl($payment),
'success_url' => $this->getSuccessUrl($payment),
'fail_url' => $this->getFailUrl($payment),
]);
Dolyame API returns link — URL for redirecting customer to confirmation page.
Authorization: HTTP Basic Auth with login and password received when registering as partner. Additionally — request signature with X509 certificate (issued at connection).
Status Model of Split Services
Split services simpler than credit — fewer intermediate statuses:
| Status | Yandex Split | Dolyame | Action in Bitrix |
|---|---|---|---|
| Created | PENDING |
new |
Waiting |
| Confirmed | CONFIRMED |
approved |
$payment->setPaid('Y') |
| Rejected | REJECTED |
rejected |
Cancel payment |
| Canceled | CANCELED |
canceled |
Cancel payment |
| Refund | REFUNDED |
refunded |
Refund in Bitrix |
Key difference from credit: decision made in seconds (no traditional scoring), money store receives immediately — not after signing credit agreement.
Refunds and Partial Cancellation
Both services support partial refunds. Yandex Split: POST /api/merchant/v1/orders/{orderId}/refund with refund amount. Dolyame: POST /v1/orders/{orderId}/refund.
On partial refund, service recalculates payment schedule for customer. Store returns only refund amount (from already transferred money).
Processing in 1C-Bitrix via refund method of payment system handler:
public function refund(\Bitrix\Sale\Payment $payment, $refundAmount)
{
$orderId = $payment->getField('ORDER_ID');
$response = $this->apiRequest('POST', "/v1/orders/{$orderId}/refund", [
'amount' => $refundAmount,
'items' => $this->getRefundItems($payment, $refundAmount)
]);
return $response['status'] === 'success';
}
Minimum and Maximum Amounts
| Service | Minimum | Maximum | Number of Payments |
|---|---|---|---|
| Yandex Split | 1,000 rub | 150,000 rub | 2–4 |
| Dolyame | 500 rub | 30,000 rub | 4 |
Amounts are current at writing — check documentation, limits change. In payment system handler implement sum check: if sum out of range — don't show split-payment button.
Connecting Both Services Simultaneously
You can and should connect both. On checkout page two buttons appear: "Pay with Yandex Split" and "Pay with Dolyame". Customer chooses the service whose card they use. In 1C-Bitrix these are two separate payment systems in sale module, each with its own handler. Binding to delivery services and amount limits configured with standard tools: Store → Payment Systems → Restrictions.







