Setting Up Online Cash Register on 1C-Bitrix
Under Federal Law 54-FZ, each payment in an online store must be accompanied by a fiscal receipt sent to the customer. A store without a cash register — a fine of 30,000 rubles for the first violation, up to 100% of settlement amounts for subsequent ones. Bitrix supports connecting an online cash register via the sale module with a number of cash register operators.
Supported Cash Register Operators
Bitrix has built-in handlers for:
-
АТОЛ Online — module
salereports, handlerAtolOnline - YooKassa (Yandex.Kassa) — integrated into the payment module
- Sberbank — via Sberbank payment module
- CloudPayments — third-party module
- Эвотор — via Marketplace
Third-party operators are connected via Marketplace or independent handler development.
ATOL Module Installation and Setup
In the admin panel: "Marketplace" → "Installed Solutions" → check for the salereports module. If not — install from the catalog.
After installation: "Store" → "Online Cash Registers" → "Add Cash Register".
ATOL connection parameters:
- Login and Password — credentials in the ATOL service
- INN — organization's tax ID
- Cash Register Group — group identifier in ATOL
-
URL —
https://online.atol.ru/possystem/v4/(production) orhttps://testonline.atol.ru/possystem/v4/(test)
Configuration in Database
Cash register settings are stored in tables b_sale_cashbox and b_sale_cashbox_handler:
-- View connected cash registers
SELECT ID, NAME, ACTIVE, KPP, INN FROM b_sale_cashbox WHERE ACTIVE = 'Y';
-- Receipt queue
SELECT ID, STATUS, TYPE, ORDER_ID, PAYMENT_ID, DATE_CREATE
FROM b_sale_cashbox_check
WHERE STATUS = 'N' -- awaiting sending
ORDER BY DATE_CREATE DESC
LIMIT 20;
Receipt statuses (STATUS): N — new, P — processing, Y — sent, F — error.
Automatic Receipt Sending
Receipts are generated automatically at certain events:
-
Income (type
sell) — when order is paid (PAID = Y) -
Income Return (type
sell_refund) — when paid order is cancelled - Full Settlement — when delivered (for two-stage payment)
Configure receipt generation triggers: "Store" → "Online Cash Registers" → edit cash register → "Receipt Settings" tab.
Programmatically create a receipt:
use Bitrix\Sale\Cashbox;
$order = \Bitrix\Sale\Order::load($orderId);
$payment = $order->getPaymentCollection()->getInnerPayment();
// Create income receipt
$check = Cashbox\CheckManager::createCheck(
Cashbox\Internals\Check\SellCheck::getType(),
$payment
);
if ($check) {
$result = Cashbox\CheckManager::send($check);
if (!$result->isSuccess()) {
// Log error
foreach ($result->getErrors() as $error) {
AddMessage2Log($error->getMessage(), 'sale');
}
}
}
Receipt Composition: Nomenclature and VAT Rates
Federal Law 54-FZ requires transmitting the order composition to the receipt — product names and quantities with VAT rate specified.
Configure VAT rates in the store catalog: "Store" → "VAT Rates" → add rates (20%, 10%, 0%, "Not taxed"). Then specify the corresponding rate in product properties.
Bitrix automatically transmits nomenclature to the receipt. If the composition is incorrect — check the b_catalog_vat table:
SELECT BV.RATE, BP.NAME
FROM b_catalog_product BP
JOIN b_catalog_vat BV ON BP.VAT_ID = BV.ID
WHERE BP.ID IN (SELECT PRODUCT_ID FROM b_sale_basket WHERE ORDER_ID = 12345);
Receipt Queue Sending Agent
Receipts are sent via the Bitrix\Sale\Cashbox\CheckManager::send agent. If the agent is not configured or not working — receipts accumulate in b_sale_cashbox_check with status N.
Check agent:
SELECT NAME, LAST_EXEC, NEXT_EXEC, ACTIVE
FROM b_agent
WHERE NAME LIKE '%Cashbox%';
If agent is not active — activate via admin panel or SQL:
UPDATE b_agent SET ACTIVE = 'Y' WHERE NAME LIKE '%CheckManager%';
Testing
Before switching to production mode — test on ATOL test environment. In cash register settings, specify the test URL. Create a test order, pay, verify that the receipt appears in the ATOL personal cabinet with correct composition. Special attention: VAT, product names (should be understandable, not "Product 001"), settlement method marker ("Full settlement" for immediate payment or "100% prepayment" for advance payment).

