Integrating 1C-Bitrix with the Samsung Pay payment system

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

Integrating 1C-Bitrix with Samsung Pay

Samsung Pay is Samsung's payment system for mobile devices and smartwatches. It has one key technical feature that distinguishes it from Apple Pay and Google Pay: in addition to NFC, it supports MST (Magnetic Secure Transmission) — emulation of a card's magnetic stripe. This extends compatibility with POS terminals. For online stores built on 1C-Bitrix, Samsung Pay is implemented through the Samsung Pay Web API or through acquiring partners that support this payment method.

Integration Architecture

Samsung Pay for web payments works via the Samsung Checkout API. Two approaches:

  1. Through an acquiring service — if your acquiring service (Tinkoff, YooKassa, Sber, Stripe) supports Samsung Pay as a payment method, simply activate it in the merchant portal. The technical integration on the store side is minimal.

  2. Direct integration via the Samsung Pay Web API — for custom scenarios. Requires a partner account with Samsung.

Integration via Tinkoff (most common in Russia)

Tinkoff supports Samsung Pay through its SDK. The Samsung Pay button is displayed alongside Google Pay/Apple Pay:

// Initialization via Tinkoff Acquiring SDK
const tinkoff = new TinkoffPayForm({
    terminalKey: 'TERMINAL_KEY',
    paymentMethods: {
        tinkoffPay: false,
        sbp: false,
        googlePay: true,
        applePay: true,
        samsungPay: true,  // enable Samsung Pay
    },
});

// Check Samsung Pay availability for the current device
tinkoff.isSamsungPayAvailable().then(available => {
    if (available) {
        document.querySelector('.samsung-pay-btn').style.display = 'block';
    }
});

Direct Samsung Pay Web API Integration

For direct integration without an aggregator:

// Loading the Samsung Pay JS SDK
// <script src="https://img.mpay.samsung.com/gsmpi/sdk/samsungpay_web_sdk.js"></script>

const samsungPayClient = new SamsungPay.PaymentsClient({
    environment: 'PRODUCTION',  // 'TEST' for development
});

const paymentRequest = {
    version: '2',
    serviceId: 'YOUR_SERVICE_ID',  // issued by Samsung upon registration
    orderNumber: orderId.toString(),
    protocol: {
        type: 'PROTOCOL_3DS',
        version: '2.0',
    },
    merchant: {
        name: 'My Store',
        url: 'https://myshop.ru',
        countryCode: 'RU',
    },
    amount: {
        option: 'FORMAT_TOTAL_ESTIMATED_AMOUNT',
        currency: 'RUB',
        total: orderTotal.toFixed(2),
    },
    allowedBrands: ['visa', 'mastercard', 'mir'],
    merchant_gateway_parameter: {
        // Your acquiring service parameters
        gateway: 'example_gateway',
        gatewayMerchantId: 'MERCHANT_ID',
    },
};

samsungPayClient.loadPaymentSheet(SamsungPay.PaymentMethod.CARD, paymentRequest)
    .then(paymentResult => {
        return fetch('/bitrix/tools/spay_charge.php', {
            method: 'POST',
            headers: {'Content-Type': 'application/json'},
            body: JSON.stringify({
                token: paymentResult.paymentCredential.paymentData,
                orderId,
            }),
        });
    })
    .then(res => res.json())
    .then(data => {
        if (data.success) window.location.href = data.redirect;
    });

Server-Side Processing

// /bitrix/tools/spay_charge.php
$input   = json_decode(file_get_contents('php://input'), true);
$token   = $input['token'];
$orderId = (int)$input['orderId'];

// Samsung Pay passes the same token format as Google Pay (in most acquiring services)
// Process through the existing acquiring service
$result = processPaymentToken($token, $orderId, 'samsung_pay');

header('Content-Type: application/json');
echo json_encode(['success' => $result]);

Specifics and Limitations

  • Samsung Pay Web works only on Samsung devices with the Samsung Pay app installed
  • On iOS — it does not work at all (use Apple Pay instead)
  • The share of the audience capable of paying via Samsung Pay in a browser is significantly smaller than for Google Pay
  • If the acquiring service supports Samsung Pay — implementation through the aggregator takes less time than direct integration

Timeline

Approach Duration
Via acquiring service (Tinkoff, YooKassa) 0.5–1 day
Direct Samsung Pay Web API integration 3–5 days
Testing on a real Samsung device 1 day