Setting up a payment deferral for B2B 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
    1173
  • 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
    745
  • 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

Configuring Payment Deferral for B2B in 1C-Bitrix

Payment deferral is a contract condition: the client receives goods but pays after 14, 30, or 45 days. On the website, this means the "Pay" button should not be available immediately — or completely absent for clients with deferral. Instead — an invoice with a payment due date.

How to Store Deferral Terms

Deferral terms are stored in 1C in the context of contracts with counterparties. In Bitrix, we duplicate them in Highload block b2b_payment_terms:

  • UF_COMPANY_ID — company ID
  • UF_PAYMENT_DELAY_DAYS — number of deferral days (0 = no deferral)
  • UF_PAYMENT_TYPE — type: prepay (prepayment), deferred (deferral), mixed (partial prepayment)
  • UF_PREPAY_PERCENT — prepayment percentage for mixed
  • UF_ACTIVE_FROM, UF_ACTIVE_TO — period of validity

Synchronization from 1C when contract terms change — via agent or webhook.

Order Checkout Logic

When an order is created, the OnSaleOrderSaved handler reads the company's payment terms:

  • prepay — standard logic, payment via card or invoice available
  • deferred — invoice is automatically created with payment date = order date + UF_PAYMENT_DELAY_DAYS, online payment button hidden
  • mixed — invoice is issued for prepayment (X% of amount), remainder — on date with deferral

Payment date is recorded in the order's custom field UF_PAYMENT_DUE_DATE. In the client's cabinet in the orders section, this date is displayed explicitly.

Payment Deadline Notifications

An agent running daily checks orders with "Awaiting Payment" status, where UF_PAYMENT_DUE_DATE is approaching:

  • 3 days before — email reminder to client via CEvent::Send() with template B2B_PAYMENT_REMINDER
  • On payment day — repeat email + manager task in Bitrix24 (if integration is set up)
  • Next day after deadline — logging to overdue record, flag in b2b_credit_status

Integration with Delivery and Payment Methods

For clients with deferral, when placing an order in the list of payment methods (b_sale_pay_system), we filter via OnSalePaySystemHandlerList handler — remove "Card Payment" and "Yandex.Kassa," keep only "Issue Invoice."

Timelines

Basic deferral setup for client group: 3-5 days. Full implementation with notifications, 1C synchronization, and mixed payment logic: 1-2 weeks.