Setting up Internet acquiring 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

Setting Up Internet Acquiring on 1C-Bitrix

Internet acquiring is one of the first modules configured when launching an online store. In practice, "connecting an acquiring service" involves several distinct tasks: registering with the payment system, installing and configuring the handler in 1C-Bitrix, setting up callback notifications, testing, and handling fiscal law compliance where applicable. Each of these contains nuances that are not obvious during the setup phase.

Choosing a Payment System and Acquiring Service

The choice of acquiring service affects the technical implementation. Main options for the Russian market:

System Payment Methods Ready-Made Module
YooKassa Cards, SBP, YooMoney, SberPay Free, Marketplace
Tinkoff Cards, SBP, Tinkoff Pay Free, Marketplace
Sber Cards, SBP, SberPay Free, Marketplace
Alfa-Bank Cards, SBP Marketplace
Stripe Cards (international) Custom development

Installing and Configuring the Handler

The standard path for ready-made modules:

  1. Module installation — via Marketplace → Solution Catalog or by uploading an archive to /bitrix/updates/
  2. Creating a payment systemStore → Settings → Payment Systems → Add
  3. Parameter configuration — filling in the shopId/merchantId, secretKey/password, notification URL fields

The critically important parameter during configuration is the notification URL (callback URL). For the standard 1C-Bitrix handler, this is:

https://myshop.ru/bitrix/tools/sale_ps_result.php

This URL must:

  • Be accessible from the payment system's servers (not protected by basic auth)
  • Work without redirects
  • Return HTTP 200 on successful processing

Payment System Handler Structure

If a custom handler is required or a ready-made module is not suitable:

// /local/php_interface/include/sale_payment/my_gateway/handler.php
use Bitrix\Sale\PaySystem;

class MyGatewayHandler extends PaySystem\ServiceHandler
{
    // Initiates payment — redirects the buyer
    public function initiatePay(
        \Bitrix\Sale\Payment $payment,
        \Bitrix\Main\Request $request
    ): PaySystem\ServiceResult {
        $result = new PaySystem\ServiceResult();
        // Build the payment gateway URL and redirect
        $result->setPaymentUrl($this->buildPaymentUrl($payment));
        return $result;
    }

    // Processes an incoming notification from the gateway
    public function processRequest(
        \Bitrix\Sale\Payment $payment,
        \Bitrix\Main\Request $request
    ): PaySystem\ServiceResult {
        $result = new PaySystem\ServiceResult();

        if ($this->verifyRequest($request) && $this->isPaymentSucceeded($request)) {
            $payment->setPaid('Y');
            $result->setOperationType(PaySystem\ServiceResult::MONEY_COMING);
        }

        return $result;
    }

    // Verify the request signature
    private function verifyRequest(\Bitrix\Main\Request $request): bool
    {
        $sign = $request->get('sign');
        $expected = hash_hmac('sha256',
            $request->get('orderId') . $request->get('amount'),
            $this->getBusinessValue(null, 'SECRET_KEY')
        );
        return hash_equals($expected, $sign);
    }
}

Handler metadata (.description.php) and settings (.settings.php) follow the sale.paysystem.handler standard.

Testing

The mandatory minimum before going live:

  • Successful payment with a test card → order transitions to "Paid" status
  • Callback is received and processed correctly
  • Repeated payment of an already paid order does not duplicate the status
  • Buyer closed the browser after payment — status is still updated via callback

Timeline

Task Duration
Installing a ready-made module and configuration 0.5–1 day
Developing a custom handler 2–3 days
Testing and fiscal law compliance 1–3 days