Integration of Bitrix24 with Kontur.Accounting

Our company is engaged in the development, support and maintenance of Bitrix and Bitrix24 solutions of any complexity. From simple one-page sites to complex online stores, CRM systems with 1C and telephony integration. The experience of developers is confirmed by certificates from the vendor.
Our competencies:
Development stages

Bitrix24 Integration with Kontur.Buhgalteriya

A manager closes a deal in CRM, and the accountant learns about it from a messenger. Then manually creates an invoice in Kontur.Buhgalteriya, checks counterparty details against CRM, monitors payment in bank statements and returns to Bitrix24 to mark money received. This is three to five switches between systems per deal. With a flow of 50+ deals per week — guaranteed losses: forgotten invoices, duplicated counterparties, incorrect details.

Bitrix24 integration with Kontur.Buhgalteriya eliminates manual data transfer between CRM and accounting system.

What's Transferred Between Systems

Data Bitrix24 → Kontur Kontur → Bitrix24
Counterparties INN, KPP, name, address, account Updated details from EGRUL
Invoices Create from CRM deal Invoice status (issued, paid, overdue)
Payments Actual money receipt to account
Acts and bills Create from CRM Document signature status
Nomenclature Goods/services from CRM catalog

Integration Architecture

Kontur.Buhgalteriya provides REST API for working with counterparties, invoices, and documents. Bitrix24 — REST API and webhook mechanism. The link is built via intermediate service (middleware) that:

  1. Listens to Bitrix24 events — deal transition to "Issue Invoice" stage generates webhook.
  2. Requests data — from deal card and linked contact/company gets details, amount, goods list.
  3. Creates or finds counterparty in Kontur — by INN. If new — creates card.
  4. Forms invoice — with positions, amounts, VAT.
  5. Returns invoice number — writes to custom deal field in B24.

Reverse flow: middleware periodically (or via Kontur webhook) checks payment statuses and updates deal stages in CRM.

Counterparty Synchronization

Counterparties are the biggest friction point. In CRM, manager can create company with minimal data (name + phone), but accounting needs complete details: INN, KPP, legal address, bank data.

We solve with two mechanisms:

  • Auto-fill by INN. In Bitrix24 company card, manager enters INN — script calls Kontur.Focus service (or DaData) and pulls all details. Data immediately valid for accounting.
  • Reverse synchronization. If accountant adds counterparty in Kontur (e.g., supplier), middleware creates corresponding company in CRM with filled details.

Matching records — by INN. Duplicates tracked at each sync: if B24 has two companies with same INN — integration logs conflict and doesn't create duplicate in Kontur.

Automatic Invoice Issuance

Typical integration scenario:

  1. Deal transitions to "Invoice" stage (or manager clicks "Issue Invoice" in card).
  2. Middleware gets: goods positions, quantity, price, VAT rate, buyer details.
  3. Invoice created in Kontur.Buhgalteriya.
  4. PDF invoice generated and attached to deal in Bitrix24.
  5. Manager sends invoice to client directly from CRM — via email or messenger.

If deal lacks mandatory data (e.g., counterparty account not specified), integration blocks invoice creation and notifies manager — what needs to be filled.

Payment Tracking

After invoicing, accounting awaits payment. Kontur.Buhgalteriya receives bank statements and matches incoming payments to invoices. When payment found:

  1. Middleware gets "invoice paid" event with amount and date.
  2. In Bitrix24, deal automatically transitions to "Payment Received" stage.
  3. In deal timeline: "Payment 150 000₽ received 12.03.2026".
  4. If partial payment — deal stays on current stage, "Paid" field shows actual amount.

For overdue invoices — auto notification to manager via Bitrix24 with days overdue.

Closing Documents

After payment, acts or bills needed. Integration allows:

  • Initiate act creation from deal card.
  • Pass data to Kontur for document formation.
  • Receive signed document back in CRM (as file in timeline).

If company uses EDI via Kontur.Diadok — chain closes: document signed electronically and sent to counterparty paperless.

Error Handling and Logging

Middleware logs each operation: request, response, result. On API error (timeout, invalid data, rate limit) — three retries with increasing delay. If fails — admin notification in Bitrix24 chat.

Typical errors:

  • Invalid INN — counterparty in CRM created with error. Integration checks INN checksum before sending.
  • Nomenclature mismatch — good in CRM not found in Kontur's dictionary. Solution: nomenclature mapping at initial setup.
  • Duplicate payment — same statement processed twice. Solution: deduplication by payment order number and date.

Security

Data transferred via HTTPS. API tokens stored in environment variables on middleware server, not in code. Middleware access limited by IP whitelist of Bitrix24 and Kontur servers. Logs with personal data rotate — kept max 90 days.

Customize integration for specific business process: from minimal "invoice → payment" link to full document circulation with EDI.