SberPay Payment Method Integration in Mobile Application
SberPay is a payment method from Sberbank that allows users to confirm payment via Sberbank Online app or Sber ID. In mobile applications, integration is implemented via Sberbank Acquiring (SBOL REST API) or via aggregators (YooKassa, CloudPayments) that support SberPay as payment method.
Two Integration Paths
Via aggregator. If you already have YooKassa, CloudPayments, or Robokassa — SberPay can be added as additional paymentMethodType without separate integration. YooKassa, for example, supports sberbank as payment method type, and SDK itself opens deeplink in Sberbank Online.
Via Sberbank Acquiring directly. Requires separate merchant registration in Sberbank, connection to test environment 3dsec.sberbank.ru and direct REST API work.
Direct Integration via Sberbank REST API
For SberPay in mobile application, deeplink-return flow is used. Server registers order and gets orderId and formUrl:
POST https://securepayments.sberbank.ru/payment/rest/register.do
?userName=merchant_login
&password=merchant_password
&orderNumber=ORDER-1234
&amount=150000
&returnUrl=yourapp://payment/result/success
&failUrl=yourapp://payment/result/fail
&clientId=user_123
&paymentSystem=SBERPAY
Response:
{
"orderId": "uuid-order-id",
"formUrl": "https://securepayments.sberbank.ru/sberpay?orderId=..."
}
Deeplink to Sberbank Online
formUrl contains link that opens Sberbank Online app for confirmation. On client:
// Android
val sberPayUri = Uri.parse(formUrl)
val intent = Intent(Intent.ACTION_VIEW, sberPayUri)
// Check if Sberbank Online installed
if (intent.resolveActivity(packageManager) != null) {
startActivity(intent)
} else {
// Fallback: open formUrl in browser
openInBrowser(formUrl)
}
// iOS
if let url = URL(string: formUrl), UIApplication.shared.canOpenURL(url) {
UIApplication.shared.open(url)
} else {
// Fallback: SFSafariViewController
presentSafari(url: formUrl)
}
Handling Return via Deeplink
After confirmation in Sberbank Online system redirects to returnUrl you specified when registering order. On iOS need Universal Link or URL Scheme, on Android — Intent Filter:
<!-- AndroidManifest.xml -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="yourapp" android:host="payment" android:pathPrefix="/result" />
</intent-filter>
After return check order status on server:
GET https://securepayments.sberbank.ru/payment/rest/getOrderStatusExtended.do
?orderId=uuid-order-id&userName=...&password=...
Key point: do not trust only deeplink return. User could close app before redirect. Payment status must always be checked via server request getOrderStatusExtended.
Integration via YooKassa (Simplified Variant)
// Android, YooKassa SDK
val paymentParameters = PaymentParameters(
amount = Amount(BigDecimal.valueOf(1500), Currency.getInstance("RUB")),
title = "Order",
subtitle = "",
clientApplicationKey = "live_key",
shopId = "shop_id",
paymentMethodTypes = setOf(PaymentMethodType.SBERBANK) // only SberPay
)
YooKassa SDK itself forms deeplink and handles return — you only need to accept token and create payment on server.
Work Scope
- Integration scheme selection: direct or via aggregator
- Server order registration and formUrl retrieval
- Deeplink-opening Sberbank Online and fallback implementation
- Return handling via URL Scheme / Universal Link
- Server payment status checking
Timeline
2–3 days. Cost calculated individually.







