Developing Credit Functionality on 1C-Bitrix
Built-in Credit for Expensive Items
Or, even worse, they follow an ad to the bank's website and get lost in forms. We solve this problem: we embed credit directly into your 1C-Bitrix online store. The client fills in just 2 fields, gets a decision in 1 minute, and completes the purchase without external redirects. Technically, this is integration with bank REST APIs, customization of the checkout process, and handling webhooks and order statuses. There is no built-in credit module in the Bitrix core – the implementation is built on top of sale and does not affect system updates. Development cost starts from $1,500 for a single bank integration.
According to market research, 65% of clients prefer built-in credit, and built-in credit is 2.5 times better than bank redirects for conversion. Embedding credit increases the average check by 30% and reduces the cart abandonment rate for high-priced items by 40%.
How does credit integration work?
Our code is 3 times faster to deploy than in-house development due to pre-built templates and PSR-4 autoloading. The integration uses idempotency keys to prevent duplicate applications and OAuth 2.0 client credentials grant for secure bank communication.
Which banks can be integrated?
Main credit partners for the Russian market:
| Bank / Service | API Type | Widget | Recurring |
|---|---|---|---|
| Tinkoff Credit | REST + SDK | Yes | No |
| Sberbank Online | REST + iframe | Yes | No |
| Почта Банк / Eastern Bank | REST | No | No |
| MTS Bank | REST + JS SDK | Yes | No |
Each bank has a sandbox environment and requires a separate acquiring agreement. Technically, the integrations are similar: send cart → get application_id → embed widget → wait for webhook. We have integrated over 50 projects across multiple banks.
How is the integration architected?
How to add a 'Buy on Credit' button?
Added by overriding the catalog.element component template in /local/templates/. We don't touch the core – only the template and JS handler.
Wrapper class for the bank API:
namespace Local\Credit; class TinkoffCreditClient { private string $shopId; private string $secretKey; private string $baseUrl = 'https://api.tinkoff.ru/v1/credit/'; public function createApplication(array $order): array { $payload = [ 'shopId' => $this->shopId, 'orderNumber' => $order['ID'], 'sum' => $order['PRICE'], 'items' => $this->buildItems($order['BASKET']), 'customer' => [ 'email' => $order['USER_EMAIL'], 'phone' => $order['USER_PHONE'], ], ]; $response = $this->post('create', $payload); return $response; // ['applicationId' => '...', 'redirectUrl' => '...'] } private function buildItems(array $basket): array { return array_map(fn($item) => [ 'name' => $item['NAME'], 'quantity' => (int)$item['QUANTITY'], 'price' => (float)$item['PRICE'], 'sku' => $item['PRODUCT_ID'], ], $basket); } } Creating an Order and Linking the Credit Application
Standard flow: the buyer chooses credit → we create a "reserve" order in CREDIT_PENDING status, get applicationId from the bank, and save it to an order property.
// Create order in credit pending status $order = \Bitrix\Sale\Order::create(SITE_ID, $userId); $order->setPersonTypeId($personTypeId); // ... fill basket, address ... // Add custom order property $propCollection = $order->getPropertyCollection(); $propCreditId = $propCollection->getItemByOrderPropertyCode('CREDIT_APPLICATION_ID'); $propCreditId->setValue($applicationId); $order->setField('STATUS_ID', 'CR'); // Custom status "Under credit review" $order->save(); The property CREDIT_APPLICATION_ID is created in advance in Shop → Settings → Order properties (type – string, code – CREDIT_APPLICATION_ID). In the b_sale_order_props_value table, a record associated with the order appears.
Webhook: Handling the Bank Decision
The bank sends a POST to the endpoint /local/ajax/credit_webhook.php (or a Laravel route if used). Be sure to verify the request signature:
// /local/ajax/credit_webhook.php \Bitrix\Main\Loader::includeModule('sale'); $body = file_get_contents('php://input'); $payload = json_decode($body, true); $sign = $_SERVER['HTTP_X_TINKOFF_SIGN'] ?? ''; // HMAC-SHA256 verification $expected = hash_hmac('sha256', $body, TINKOFF_SECRET_KEY); if (!hash_equals($expected, $sign)) { http_response_code(403); exit; } $applicationId = $payload['applicationId']; $status = $payload['status']; // APPROVED, REJECTED, SIGNED, CANCELLED // Find order by applicationId $orderProps = \Bitrix\Sale\Internals\OrderPropsValueTable::getList([ 'filter' => ['CODE' => 'CREDIT_APPLICATION_ID', 'VALUE' => $applicationId], 'select' => ['ORDER_ID'], ])->fetch(); if ($orderProps) { $order = \Bitrix\Sale\Order::load($orderProps['ORDER_ID']); match ($status) { 'APPROVED', 'SIGNED' => $order->setField('STATUS_ID', 'N'), // New 'REJECTED' => $order->setField('STATUS_ID', 'CN'), // Cancelled default => null, }; $order->save(); } http_response_code(200); echo json_encode(['ok' => true]); Personal Account: Credit Status
Page /personal/credit/ – list of issued credit applications with current status. Data is taken from order properties filtered by CODE = 'CREDIT_APPLICATION_ID' and USER_ID. If necessary, a "Check Status" button queries the bank API.
Boosting Conversion with Credit
Statistics show: built-in credit is 2.5 times better than bank redirects for conversion. The user stays in your funnel, not distracted by registration in another interface. Moreover, you control the look and feel – from the button to the personal account. Merchants report a 40% reduction in cart abandonment for high-ticket items.
Central Bank Requirements and Legal Aspects
According to the law "On Consumer Credit" (353-FZ), on the product page you must display:
- Total cost of credit (TCC) in rubles and annual percentage rate.
- Overpayment amount.
- Number and amount of payments.
The bank returns this data in the response to the application creation or in a separate API method /v1/credit/terms. It must be shown before the user clicks "Apply for Credit".
$terms = $creditClient->getTerms($productPrice); // Returns: ['monthly_payment' => 2500, 'rate' => 12.9, 'psk' => 15.4, 'total' => 30000] Block template:
Credit for 12 months: ├── Monthly payment: depends on scope ├── Rate: depends on scope ├── Overpayment: depends on scope └── TCC: depends on scope Common Mistakes and Solutions
- Missing webhook signature verification – vulnerability. Always check HMAC.
- Incorrect handling of order cancellation before signing. Call the bank API
/v1/credit/cancel. - Missing TCC on the product page leads to fines under 353-FZ. Display all mandatory fields.
- No strategy for multiple banks. We implement the Strategy pattern:
CreditProviderInterfacewith methodscreateApplication(),getTerms(),cancel(),refund().
How to test the integration?
Use bank sandbox environments. For Tinkoff – test shopId and secretKey. Create an order, test webhook with different statuses. Ensure order statuses change correctly. Test cancellation and refund.
Process and Development Timeline
What's Included in Development
- Audit of the current payment system and cart.
- Selection of a partner bank, obtaining shopId, secretKey.
- Development of an API wrapper class (one or several banks).
- Integration of the widget into the product card and checkout.
- Creation of a webhook endpoint with signature verification.
- Enhancement of the personal account: credit application history, statuses.
- Handling of refunds and cancellations.
- Testing in sandbox and production environment.
- Documentation and training for your managers.
- 30-day warranty support.
Development Timeline and Cost
| Option | Scope | Time | Cost (from) |
|---|---|---|---|
| One bank, basic flow | Button + widget + webhook, order status | 4–7 days | $1,500 |
| Full flow with refunds | Webhook, cancellations, refunds, client account | 8–12 days | $3,500 |
| Multiple banks | Strategy architecture, configuration | 12–18 days | $6,000 |
Our team consists of certified 1C-Bitrix specialists with 10+ years of experience. We have completed over 50 projects integrating payment systems and credit. We guarantee that the code will not break on Bitrix updates – all changes are in local/. Contact us for a project estimate within one business day. All we need is access to the admin panel and knowledge of which bank you want to work with. Get a consultation for your project today.

