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:
-
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.
-
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 |







