Flow: SBP (Faster Payments)
The request is identical to the bank card scenario — in both protocols. The payment method is chosen with query parameters on the payment address from the response (AuthorizationUrl in XML, authorization. in JSON) rather than a request field: no parameters opens the card form, ?useSbp=true gives SBP, and ?payType=Sber&deviceType=Desktop / ?payType=Sber&deviceType=Mobile give SberPay. One invoice can be opened any way until it is paid.
The mock does not tell SberPay and SBP apart — both boil down to a QR flow, only the screen selected by deviceType differs.
- CreateInvoice — same as for a card.
- Redirect the user to the payment address with
?useSbp=trueappended. - The customer pays — the flow depends on the device (below) → a callback with
BillingChannel=BankRtp.
The payment_method field in the request body is deprecated and goes away in 3.0.0. A value passed there does not change the response payload: the sandbox returns the same payment address, only with the parameters already appended. A value outside the sbp / sberpay_desktop / sberpay_mobile list is still rejected with 422 INVALID_PAYMENT_METHOD listing the allowed ones — so a typo does not look like “SBP is broken”.
Two payment flows
The SBP page detects the device by User-Agent and shows what actually works in production SBP.
| Device | What the customer sees |
|---|---|
| Desktop | A universal QR code. The customer scans it with a phone — the camera or a banking app — and confirms the payment there. The bank is not chosen on the site: that happens inside the app |
| Phone | A “Pay with SBP” button and the bank list. There is nothing to scan the QR with on the same device, so the customer picks a bank and is taken to its app by a deep link |
To see both flows from one machine, append ?view=qr or ?view=banks to the SBP page URL — the parameter overrides the device detection. The page language is decided separately, from the browser header — see “Flow: bank card”.
Differences from the card scenario
JSON API v3
{
"customer": {
"type": "undefined_bank_card",
"source": "my_source",
"country": "RU",
"merchant_customer_id": "user_123"
},
"order": {
"merchant_order_id": "ORDER-001",
"price": { "amount": "99.00", "currency": "RUB", "vat_included": true }
}
}
// The response is the same; SBP opens at authorization.url + "?useSbp=true"