Integration of Cash Register Machines, Payments, and Refunds through the CRS System with Bitrix24

This case study showcases how we successfully integrated Cash Register Machines (CRM), and managed payments and refunds through the Central Reservation System (CRS) with Bitrix24, enhancing the transaction management process and creating a more efficient workflow for managers.

Project Objective

To implement the capability of conducting payments and refunds through the Bitrix24 interface. Payments or refunds are to be made via the client's Central Reservation System (CRS), and upon successful transaction completion, a receipt should be issued from one of the 1000 cash register machines (CRMs), depending on the data specified in Bitrix24.

Technical Details

The CRM server was installed and configured to connect the cash register machines (CRMs) into a unified system, redirecting necessary requests to designated devices. All information regarding services, previously made payments, and sums are stored in the client's CRS. The control of sums is executed through the integration of Bitrix24 and the client's CRS via REST API. After sum control is completed, transaction data are directed to the CRM server for receipt printing.

Bitrix24 Interface

The project was executed on a box-license Bitrix24 through the development of a separate module. We added a new button in the deals interface to display a form for payments and refunds. Payments/refunds could be conducted either in cash, card, or a combination of both. The form allows the selection of one of the offices in different cities of Russia, as well as choosing a specific cash device linked to the office.

Directories and Testing

Since multiple teams were involved in the project development, several servers were deployed for development, a stand for testing, and of course, the end user server (live/production). We utilized the DevOps CI/CD approach for continuous software delivery and testing.
An office directory, CRM device directory linked to the office directory, and a Highload directory for logging all outgoing and incoming REST API requests were added. For accurate operation, directory installers were written that allow for the issuing of unified directory identifiers for development servers, stands, and production.

Exchange with the CRS System

As the client's Central Reservation System (CRS) stores all data on services and transactions, our primary task was to execute a request from Bitrix24 to CRS to verify sums. The payment/refund sum must not exceed the quota. If we get a positive response from the payment/refund form submission and all sum checks pass, we record the data in Bitrix24 and transmit them to the CRM server.
We wrote an SDK in PHP to facilitate and ensure correct operation with the CRS system's REST API.

Integration with the CRM Server

After passing all checks and recording the payment/refund transaction in the CRS system, we needed to print a receipt. Given the variety of payment/refund options—cash, card, mixed—the receipts could vary. In some cases, two receipts might be printed—one for a cash transaction, the other for a card transaction.
An SDK in PHP was written to ease the development and maintenance of integration with the CRM server.

Data Logging

All data transmitted from Bitrix24 to the CRS system, including incoming responses, are recorded in the Highload directory. This allows us to accurately track the exchange process, and in case of failure, analyze the cause and retry the request.
Just like the CRS system, all sent and received data to and from the CRM server are recorded, which helps capture errors and, if necessary, repeat requests.
The implemented project allows for direct control of payments and refunds from Bitrix24, exchanging data with the CRS system and CRM server. This significantly simplifies the managers' work and makes dealing with client transactions more transparent and convenient.