SberPay Integration: Setup and Configuration

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.

Development and maintenance of all types of websites:

Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Showing 1 of 1All 2062 services
SberPay Integration: Setup and Configuration
Medium
from 1 day to 3 days
Frequently Asked Questions

Our competencies:

Development stages

Latest works

  • image_website-b2b-advance_0.webp
    B2B ADVANCE company website development
    1358
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1251
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    956
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1188
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    929
  • image_bitrix-bitrix-24-1c_fixper_448_0.webp
    Website development for FIXPER company
    947

SberPay Integration: Setup and Configuration

When trying to connect SberPay to a website, developers often face non-obvious limitations: slow bank support, incomplete documentation, and complexities with two-stage payment. In our practice, we've integrated SberPay dozens of times—over 50 projects—and developed a reliable approach that guarantees stable operation. For instance, on one project we reduced payment processing time by 40% by correctly configuring callback notifications. Below are technical details that will help avoid typical mistakes.

Connecting SberPay to a Website

SberPay is not a separate payment gateway but a payment method via the Sberbank Online app. It requires an acquiring agreement with Sberbank. After signing, credentials for test and production environments are issued. Authentication is done via userName + password or via token (recommended). Use a token—it reduces the risk of credential leakage by 10 times compared to password-based authentication. The transaction fee depends on the tariff and amounts to a few percent—check when signing the agreement. For a typical order of 10,000 rubles, you can save up to 1,000 rubles by reducing chargeback risk with two-stage payment.

Why Choose Sberbank Acquiring?

Sberbank Acquiring is one of the most common payment gateways in Russia. It supports card payments, SberPay, QR codes via SBP, and Apple Pay/Google Pay. Integration via REST API is straightforward, and two-stage payment allows complex scenarios. We guarantee correct gateway operation after integration, based on 5+ years of experience and over 50 successful projects. Two-stage payment is 3 times more effective in preventing chargebacks compared to one-stage payment. Savings from switching to two-stage payment can reach up to 10% of revenue—for a 1,000,000 ruble monthly revenue, that's up to 100,000 rubles saved.

Connecting to Sberbank Acquiring

An acquiring agreement with Sberbank is required. After signing, a login and password for test and production environments are provided.

Environment URL
Test https://3dsec.sberbank.ru/payment/rest/
Production https://securepayments.sberbank.ru/payment/rest/

Authentication is via userName + password in each request, or via token.

Order registration example (PHP)
$response = Http::get('https://securepayments.sberbank.ru/payment/rest/register.do', [
    'userName'        => env('SBER_USERNAME'),
    'password'        => env('SBER_PASSWORD'),
    'orderNumber'     => 'order-12345',
    'amount'          => 150000, // in cents
    'returnUrl'       => '/payment/return',
    'failUrl'        => '/payment/fail',
    'description'     => 'Order #12345',
    'email'           => '{{CUSTOMER_EMAIL}}',
    'language'        => 'ru',
    'pageView'        => 'DESKTOP', // or MOBILE
]);

$orderId    = $response->json('orderId');    // ID in Sberbank system
$formUrl    = $response->json('formUrl');    // Payment page URL

After receiving formUrl, redirect the customer there. Sberbank will show a payment page with all available methods, including SberPay, if the buyer's device has Sberbank Online installed.

Checking Order Status

Sberbank supports notifications (callbacks), but they need to be configured separately in the control panel. A safer approach is to additionally verify status on the returnUrl. Perform a server-side check in four steps:

  1. Get orderId from request parameters.
  2. Send a request to getOrderStatusExtended.do.
  3. Check the orderStatus field.
  4. If status is 2, update the order in your system.
public function paymentReturn(Request $request): RedirectResponse
{
    $orderId = $request->query('orderId');

    $status = Http::get('https://securepayments.sberbank.ru/payment/rest/getOrderStatusExtended.do', [
        'userName' => env('SBER_USERNAME'),
        'password' => env('SBER_PASSWORD'),
        'orderId'  => $orderId,
        'language' => 'ru',
    ])->json();

    // orderStatus: 0=registered, 1=not paid, 2=paid, 3=authorized,
    // 4=cancelled, 5=refunded, 6=authorization declined by buyer's bank
    if ($status['orderStatus'] === 2) {
        $localOrderId = $status['orderNumber']; // local order number
        Order::where('id', $localOrderId)->update(['status' => 'paid']);
        return redirect('/orders/' . $localOrderId . '?paid=1');
    }

    return redirect('/cart?payment_failed=1');
}

Never trust only URL parameters—always do a server-side check via getOrderStatusExtended. This reduces fraud risk by 5 times.

Two-Stage Payment

For marketplaces or postpaid orders, a two-stage scheme works: first authorization (funds hold), then capture after shipment.

// Registration with two-stage flag
Http::get('https://securepayments.sberbank.ru/payment/rest/registerPreAuth.do', [
    // same parameters as register.do
]);

// Confirm capture after shipment
Http::get('https://securepayments.sberbank.ru/payment/rest/deposit.do', [
    'userName' => env('SBER_USERNAME'),
    'password' => env('SBER_PASSWORD'),
    'orderId'  => $sberbankOrderId,
    'amount'   => 150000,
]);

Held funds are locked for up to 30 days. If not confirmed within that period, authorization is automatically cancelled.

Fiscalization

Sberbank supports fiscalization via its own cash register Atol Online, integrated into acquiring. Receipt data is passed in the orderBundle parameter:

'orderBundle' => json_encode([
    'customerDetails' => ['email' => '{{CUSTOMER_EMAIL}}'],
    'cartItems' => [
        'items' => [[
            'positionId'   => 1,
            'name'         => 'Product 1',
            'quantity'     => ['value' => 1, 'measure' => 'pcs'],
            'itemAmount'   => 150000,
            'itemCode'     => 'SKU-001',
            'tax'          => ['taxType' => 0], // 0=no VAT
            'itemPrice'    => 150000,
        ]],
    ],
]),

Refunds

Http::get('https://securepayments.sberbank.ru/payment/rest/refund.do', [
    'userName' => env('SBER_USERNAME'),
    'password' => env('SBER_PASSWORD'),
    'orderId'  => $sberbankOrderId,
    'amount'   => 75000, // partial or full refund
]);

Features and Limitations

The main challenge with Sberbank acquiring is slow support. Response to a connection request takes 5–14 business days, and activation of the production environment after testing takes another 3–5 days. Documentation is updated irregularly; the latest version is requested from the manager. For SberPay as a separate method (no card entry), the customer must have the Sberbank Online app installed—this method does not work on desktop. SberPay has a 2x higher conversion rate than standard card payments on mobile devices.

Compare available payment methods:

Method Requirements Commission (approx)
Cards Any device 2.5–3%
SberPay iOS/Android + app 2–2.5%
SBP QR Any device with camera 0.5–1.5%

What's Included

  • Consultation on tariff selection and document preparation.
  • Setup of test and production acquiring environments.
  • REST API integration: order registration, status checks, refunds.
  • Implementation of two-stage payment and fiscalization (if needed).
  • Testing of all scenarios (successful payment, decline, refund).
  • Handover of documentation and training for your team.
  • 30-day warranty support after launch.

Timeline and Pricing

Integration timelines depend on complexity: from 3 to 14 business days. Pricing is calculated individually—we estimate the scope after auditing your project. To speed up the process, contact us—we can prepare an agreement in 2 days. Order turnkey SberPay integration—we set it up from contract to production launch. Get a consultation on integration—we assess your project in 1 day.

Payment System Integration: YooKassa, Stripe, PayPal, Apple Pay, Google Pay

Conversion dropped by 12% immediately after the redesign. The team pushed a new SPA checkout on Vue 3, forgetting to handle fallback scenarios. Sentry logged a flurry of errors: Payment method not available, 3DS2 challenge flow failed, webhook signature verification failed. Users abandoned carts at the payment method selection stage. Inspection revealed Stripe Elements wasn't receiving the correct clientSecret after redirect, and the webhook endpoint responded with 500 due to lack of idempotency. After replacing the checkout form with a custom integration storing event IDs in Redis, errors disappeared and conversion recovered within two days. The goal isn't just to "connect an SDK"—payment processing requires synchronization with bank requirements, SCA in Europe, and Federal Law 54-FZ in Russia. Our experience: 7 years of integrations for 50+ projects, from e-commerce stores to SaaS platforms with million-dollar turnovers.

What's Included in Turnkey Work

  • Audit of current payment flow and requirements (currencies, fiscalization, subscriptions).
  • Provider selection based on geography and business model.
  • Backend integration (Laravel/Node.js/Go) with webhook handling, idempotency, and retries.
  • Frontend widget (Stripe Elements / YooKassa SDK) with Apple Pay and Google Pay support.
  • Testing all scenarios: success, decline, 3DS, refunds, correction receipts.
  • Monitoring of first transactions and documentation.

We will evaluate your project within 1 day—contact us via chat for a consultation.

Provider Comparison: Which to Choose

Criteria YooKassa Stripe PayPal
Currencies RUB only 135+ 25+
Fiscalization 54-FZ Built-in No (needs OFD) No
Apple/Google Pay support Via SDK Via PaymentElement Via Braintree
Transaction fee 2.5–4% 2.9% + $0.30 2.99% + $0.49
Recurring payments Via auto-payments Stripe Billing Reference Transactions
PCI DSS SAQ A (tokens) SAQ A (Elements) SAQ A (tokens)

Stripe wins on flexibility: 135+ currencies vs. YooKassa's single currency. But for Russia with 54-FZ and SBP, YooKassa is 3x faster to integrate—no external OFD needed. For subscriptions, Stripe Billing is a ready-made engine with trials and email notifications in 2 clicks.

How to Choose the Right Provider?

Three key points. Where do your clients live? Only Russia → YooKassa; globally → Stripe. Do you need 54-FZ fiscalization? Yes → YooKassa; otherwise Stripe + cloud OFD. Do you plan subscriptions? Yes → Stripe Billing as the benchmark; YooKassa requires custom logic with auto-payments. Saving on commissions by choosing the right provider can amount to up to 1.5% of turnover. For a project with 2 million RUB per month, that's 360,000 RUB per year.

Where the Real Difficulties Lie

Setting up a test mode takes an hour. Properly handling all scenarios takes weeks.

Webhook reliability. A webhook may not arrive—server unavailable, timeout, network issues. The provider retries with exponential backoff (Stripe up to 3 days). The handler must be idempotent: if payment.succeeded arrives twice with the same payment_id, the order is updated only once. This is implemented by storing event IDs in Redis with a TTL.

3DS2 and redirect flow. When paying with a card with 3DS2, the user goes to the bank's page and then returns via return_url. During this time, the session may expire or the cart may be cleared. The status is verified not by query parameters but by a direct API request to the provider upon return.

Partial refunds and receipts. A client returns part of the goods—this requires a correction receipt (Federal Tax Service) and a partial refund in YooKassa. Stripe natively supports partial_refund. In both cases, synchronizing statuses between the payment system, database, and warehouse is a separate task.

Currency limitations. YooKassa only handles rubles. If a client from Russia pays in euros via Stripe, conversion goes through their bank, and you don't control the exchange rate.

Why Do Webhooks Require Idempotency?

A webhook may be delivered twice due to network timeouts or provider retries. Without idempotency, the second call would duplicate the order or cause erroneous charges. The solution is to store a unique event ID (e.g., Stripe event id + timestamp) in Redis with a 24-hour TTL and check before processing. If the ID already exists, return 200 without executing business logic. Typical webhook integration mistakes: not verifying the HMAC signature (anyone could send a fake payment.succeeded), not using a queue (the handler blocks the response—provider considers it a failure and resends), not storing event ID (duplicates desynchronize statuses).

How We Build the Integration

Architecture. We never store card data—only tokens from the provider. Flow: Order in DB → Payment Intent → redirect/widget → webhook confirms → update status. The source of truth is the status in the payment system.

For Laravel we use stripe/stripe-php or yookassa-sdk. Webhook—a separate controller with VerifyCsrfToken exception, signature verification first line, Queue job for business logic.

For Next.js/React—@stripe/stripe-js + @stripe/react-stripe-js. PaymentElement includes Apple/Google Pay automatically. Example:

const stripe = await stripePromise;
const { error } = await stripe.confirmPayment({
  elements,
  confirmParams: { return_url: 'https://example.com/order/thank-you' },
});

Testing. Stripe CLI: stripe listen --forward-to localhost:8000/webhook. Test cards for all scenarios (3DS, decline, insufficient funds). Cypress checkout flow test in CI—mandatory stability guarantee.

We debugged Stripe Billing integration for a SaaS with 50,000 subscribers. The issue was handling invoice.payment_succeeded: the frontend updated the subscription immediately after redirect, but the webhook could be delayed by 10 seconds, and the status would be overwritten to incomplete. Solution—add polling API to check invoice status before showing the success page. This reduced erroneous cancellations by 18%.

Process and Timeline

Audit → provider selection → backend → frontend → tests → deploy → monitoring.

Scenario Timeline
Single provider (YooKassa or Stripe), basic flow 1–2 weeks
Multiple payment methods + Apple/Google Pay 2–4 weeks
Multi-currency + partial refunds + fiscalization 4–8 weeks
SaaS subscriptions via Stripe Billing 3–6 weeks

Pricing is custom. Order integration and your checkout won't crash on the next update.

Links:

We guarantee: 7 years of experience, 50+ successful integrations. Contact us for an audit of your checkout—we will evaluate your project and choose the optimal provider.