SberPay
SberPay is a new version of payments via Sberbank. You can’t implement SberPay directly yet. Learn more about implementation
 
Особенности
 
Integration scenarios
Ready-made solutions:
Manual integration:
 
Implementation
To set up payment acceptance for new stores, you need to implement the SberBank Online payment method first.
If you already accept payments via SberBank, you’ll switch to SberPay automatically. You’ll receive an email from YooMoney with a full description of the transition process.
If you don’t receive any news about your store’s transition to SberPay by August 2021, contact your YooMoney manager to find out when you’re going to switch
After switching to SberPay:
  • The name of the SberBank Online payment method in payment forms and in the documents will change to SberPay.
  • The payment method code and the code in the register will remain the same:
    sberbank
    and
    SB
    .
  • In the payment history in your Merchant Profile, it’ll be displayed which method was used for accepting the payment: SberBank Online or SberPay.
  • The holding period will remain the same (6 hours) for payments in the
    waiting_for_capture
    status made using the SberBank Online payment method. Learn more about payment statuses
  • Partial refunds will be available only for payments made using the SberPay payment method. Only full refunds will be supported for old payments made using the SberBank Online payment method.
 
Payments with redirection to the YooMoney page
Step 1. Create a payment , send the
sberbank
type in the
payment_method_data
object, and in the
confirmation
object, send the
redirect
type and the URL of the page on your side where users will be redirected after the payment (in the
return_url
parameter).
Example of request
cURL
PHP
Python
curl https://api.yookassa.ru/v3/payments \
  -X POST \
  -u <Shop ID>:<Secret Key> \
  -H 'Idempotence-Key: <Idempotence Key>' \
  -H 'Content-Type: application/json' \
  -d '{
        "amount": {
          "value": "2.00",
          "currency": "RUB"
        },
        "payment_method_data": {
          "type": "sberbank"
        },
        "confirmation": {
          "type": "redirect",
          "return_url": "https://www.merchant-website.com/return_url"
        },
        "description": "Order No. 72"
      }'
Step 2. Redirect the user to the YooMoney’s payment confirmation page (you will receive the URL in the 
confirmation_url
parameter).
Example of a created payment object
JSON
{
   "id":"22e12f66-000f-5000-8000-18db351245c7",
   "status":"pending",
   "paid":false,
   "amount":{
      "value":"2.00",
      "currency":"RUB"
   },
   "confirmation":{
      "type":"redirect",
      "confirmation_url":"https://yoomoney.ru/api-pages/v2/payment-confirm/epl?orderId=23d93cac-000f-5000-8000-126628f15141"
   },
   "created_at":"2018-07-18T10:51:18.139Z",
   "description":"Order No. 72",
   "metadata":{
      "order_id":"72"
   },
   "recipient":{
      "account_id":"100001",
      "gateway_id":"1000001"
   },
   "refundable":false,
   "test":false
}
Step 3. Wait for the payment to be successfully completed: you will receive a notification from YooMoney, or you can send periodic requests for payment information .
Example of a successful payment
JSON
{
   "id":"22e12f66-000f-5000-8000-18db351245c7",
   "status":"succeeded",
   "paid":true,
   "amount":{
      "value":"2.00",
      "currency":"RUB"
   },
   "captured_at":"2021-04-12T13:59:33.681Z",
   "created_at":"2021-04-12T13:49:33.026Z",
   "income_amount":{
      "value":"2.00",
      "currency":"RUB"
   },
   "payment_method":{
      "type":"sberbank",
      "id":"22e12f66-000f-5000-8000-18db351245c7",
      "saved":false
   },
   "recipient":{
      "account_id":"100001",
      "gateway_id":"1000001"
   },
   "refundable":true,
   "refunded_amount":{
      "value":"0.00",
      "currency":"RUB"
   },
   "test":false
}
 
Payments with confirmation via push notifications or text messages
Step 1. Create a payment  with the 
sberbank
type as well as the user’s phone number, linked to the SberBank Online account, in the 
payment_method_data
object, and the 
external
type in the 
confirmation
object.
Example of request
cURL
PHP
Python
curl https://api.yookassa.ru/v3/payments \
  -X POST \
  -u <Shop ID>:<Secret Key> \
  -H 'Idempotence-Key: <Idempotence Key>' \
  -H 'Content-Type: application/json' \
  -d '{
        "amount": {
          "value": "2.00",
          "currency": "RUB"
        },
        "payment_method_data": {
          "type": "sberbank",
          "phone": "79000000000"
        },
        "confirmation": {
          "type": "external",
        },
        "description": "Order No. 72"
      }'
Example of a created payment object
JSON
{
   "id":"22e12f66-000f-5000-8000-18db351245c7",
   "status":"pending",
   "paid":false,
   "amount":{
      "value":"2.00",
      "currency":"RUB"
   },
      "confirmation":{
      "type":"external"
   },
   "created_at":"2018-07-18T10:51:18.139Z",
   "description":"Order No. 72",
   "metadata":{
      "order_id":"72"
   },
   "payment_method_data":{
      "type":"sberbank",
      "phone":"79000000000"
   },
   "recipient":{
      "account_id":"100001",
      "gateway_id":"1000001"
   },
   "refundable":false,
   "test":false
}
Step 2. Inform the user that they need to confirm the payment.
Step 3. Wait for the payment to be successfully completed: you will receive a notification from YooMoney, or you can send periodic requests for payment information .
Example of a successful payment
JSON
{
   "id":"22e12f66-000f-5000-8000-18db351245c7",
   "status":"succeeded",
   "paid":true,
   "amount":{
      "value":"2.00",
      "currency":"RUB"
   },
   "captured_at":"2021-04-12T14:03:20.155Z",
   "created_at":"2021-04-12T14:02:39.550Z",
   "income_amount":{
      "value":"2.00",
      "currency":"RUB"
   },
   "payment_method":{
      "type":"sberbank",
      "id":"22e12f66-000f-5000-8000-18db351245c7",
      "saved":false
   },
   "recipient":{
      "account_id":"100001",
      "gateway_id":"1000001"
   },
   "refundable":true,
   "refunded_amount":{
      "value":"0.00",
      "currency":"RUB"
   },
   "test":false
}
 
Payments with confirmation via the Sberbank Online mobile app
Step 1. Create a payment , send the
sberbank
type in the
payment_method_data
object, the
mobile_application
type in the
confirmation
object, and the deep link to your app or the link to your store’s page (for payments via mobile web) in the
return_url
parameter.
Example of request
cURL
PHP
Python
curl https://api.yookassa.ru/v3/payments \
  -X POST \
  -u <Shop ID>:<Secret Key> \
  -H 'Idempotence-Key: <Idempotence Key>' \
  -H 'Content-Type: application/json' \
  -d '{
        "amount": {
          "value": "2.00",
          "currency": "RUB"
        },
        "payment_method_data": {
          "type": "sberbank"
        },
        "confirmation": {
          "type": "mobile_application",
          "return_url": "https://www.merchant-website.com/return_url"
        },
        "description": "Order No. 72"
      }'
Example of a created payment object
JSON
{
   "id":"22e12f66-000f-5000-8000-18db351245c7",
   "status":"pending",
   "paid":false,
   "amount":{
      "value":"2.00",
      "currency":"RUB"
   },
   "payment_method_data":{
      "type":"sberbank"
   },
   "confirmation":{
      "type":"mobile_application",
      "confirmation_url":"sberpay://invoicing/v2?bankInvoiceId=b297c4461ee34490b9a759ab2b3b3d17&redirect_uri=https://yoomoney.ru/g1kjlqr06u0c20f67753ff0af71e07a/?ulp=https%3A%2F%2Fshop.com%2Fsuccess.html"
   },
   "created_at":"2018-07-18T10:51:18.139Z",
   "description":"Order No. 72",
   "metadata":{
      "order_id":"72"
   },
   "recipient":{
      "account_id":"100001",
      "gateway_id":"1000001"
   },
   "refundable":false,
   "test":false
}
Step 2. Inform the user that they need to confirm the payment.
Step 3. Wait for the payment to be successfully completed: you will receive a notification from YooMoney, or you can send periodic requests for payment information .
Example of a successful payment
JSON
{
   "id":"22e12f66-000f-5000-8000-18db351245c7",
   "status":"succeeded",
   "paid":true,
   "amount":{
      "value":"2.00",
      "currency":"RUB"
   },
   "captured_at":"2021-04-13T09:27:09.960Z",
   "created_at":"2021-04-13T09:25:13.087Z",
   "description":"Заказ №72",
   "income_amount":{
      "value":"2.00",
      "currency":"RUB"
   },
   "payment_method":{
      "type":"sberbank",
      "id":"22e12f66-000f-5000-8000-18db351245c7",
      "saved":false
   },
   "recipient":{
      "account_id":"100001",
      "gateway_id":"1000001"
   },
   "refundable":true,
   "refunded_amount":{
      "value":"0.00",
      "currency":"RUB"
   },
   "test":false
}
 
See also
Embedded payment formsPayment processDeclined paymentsPayment by 54-FZSberBank Online