Development of a bonus system on 1C-Bitrix

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
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1175
  • image_bitrix-bitrix-24-1c_fixper_448_0.png
    Website development for FIXPER company
    811
  • image_bitrix-bitrix-24-1c_development_of_an_online_appointment_booking_widget_for_a_medical_center_594_0.webp
    Development based on Bitrix, Bitrix24, 1C for the company Development of an Online Appointment Booking Widget for a Medical Center
    564
  • image_bitrix-bitrix-24-1c_mirsanbel_458_0.webp
    Development based on 1C Enterprise for MIRSANBEL
    747
  • image_crm_dolbimby_434_0.webp
    Website development on CRM Bitrix24 for DOLBIMBY
    655
  • image_crm_technotorgcomplex_453_0.webp
    Development based on Bitrix24 for the company TECHNOTORGKOMPLEKS
    976

Developing Bonus System in 1C-Bitrix

There's no ready-made bonus system in standard Bitrix. The loyalty program module (loyalty) exists but is limited. For full bonus accumulation and spending system, development is needed: either standard module enhancement, custom module, or integration with specialized service.

What standard loyalty module can do

The loyalty module in Bitrix supports:

  • Bonus earning for orders (% of amount)
  • Loyalty program levels with different earning percentages
  • Bonus spending on order placement (partial payment with points)

Tables: b_loyalty_account (customer account), b_loyalty_account_operation (operation history), b_loyalty_level (program levels).

Standard module limitations: no bonus expiration date, no earning for actions except orders, no flexible earning category management.

Custom bonus system architecture

Custom implementation is built on several components:

Balance and operation storage:

  • Table custom_bonus_account — current user balance
  • Table custom_bonus_transaction — history: earning, spending, expiration, operation type, date, order

Bonus earning: Handler for OnSaleOrderPaid event (main module) — awards bonuses after payment confirmation:

AddEventHandler('sale', 'OnSaleOrderPaid', function($order) {
    $userId   = $order->getUserId();
    $sumOrder = $order->getPrice();
    $bonusRate = getBonusRateForUser($userId); // earning %
    $bonusAmount = round($sumOrder * $bonusRate / 100);
    addBonusTransaction($userId, $bonusAmount, 'EARN', $order->getId());
});

Bonus spending: Additional payment method (b_sale_pay_system) with handler decreasing balance and recording SPEND type transaction.

Bonus expiration: Agent running daily, checking transactions with EXPIRE_DATE field and canceling expired bonuses via EXPIRE type transaction.

Loyalty program levels

Level Accumulated amount Earning percentage
Standard 0–10,000 rubles 3%
Silver 10,000–50,000 rubles 5%
Gold from 50,000 rubles 7%

Level is recalculated on each completed order — agent or event handler checks total user purchases for period and updates their level in b_user via UF_BONUS_LEVEL field.

Personal account: bonus history

Component in personal account shows:

  • Current balance
  • Transaction history with operation types
  • Expiration date of nearest bonuses

Data is read from custom_bonus_transaction filtered by USER_ID.

Integration with external loyalty platforms

Alternative to own development — integration with ready-made platforms: Mindbox, Passteam, UDS Game. Bitrix sends events (purchase, registration) via webhooks or REST API to platform, it manages balance and returns bonus information for display in personal account. Plus — ready analytics. Minus — third-party service dependency and monthly payment.

Estimated timeframes

Scope Timeframe
Basic system: earning + spending + personal account 2–3 weeks
With levels, expiration date, analytics 4–6 weeks
Integration with external loyalty platform 1–2 weeks