Sandbox for testing

To test the connection to the payment gateway of the SberPay method, follow the instructions below.

Basic scenarios

All integration is divided into three main scenarios:

The main idea is to send special requests with a set of parameters necessary for the banking system. This can happen both during order registration (APP2APP, BACK2APP) and after (WEB2APP, mWEB2APP). After the banking system is notified of the order, payment is made on the client's side through the SBOL mobile app. In the gateway, the fact of payment is carried out through the request /notifyPaymentStatus.do.

1. WEB2APP (mWEB2APP) scenario

The main difference between WEB2APP and mWEB2APP is the device from which the client made the payment on the payment page.

2. App2App scenario

The banking system is notified of the order at the stage of registration in the gateway through the merchant's application. Detailed description of using the externalParams parameter.

Example of a registration request:

GET ../rest/register.do?returnUrl=https://sberbank.ru&amount=120&jsonParams=%7B%22app2app%22:%22true%22,%22app.osType%22:%22android%22,%22app.deepLink%22:%22https://sberbank.ru%22%7D&userName={user-api}&password={password}

3. Back2App scenario

The banking system is notified of the order at the stage of registration in the gateway through the merchant's services.

GET ../rest/register.do?returnUrl=https://sberbank.ru&amount=120&jsonParams=%7B%22back2app%22%3A%22true%22%7D&userName=781000012764-20162559-api&password=sberbankIFT

Notifying the gateway about a change in the status of the SBOL order via a request ''notifyPaymentStatus.do''

Examples:

mdOrder – unique order number in the RBS system bankInvoiceId – order number in the bank system (displayed in order attributes on the detailed information page, sbolBankInvoiceId parameter)

Rejection of order:
POST Content-Type:application/json https://3dsec.sberbank.ru/dummysbolpayment/sbol/notifyPaymentStatus.do
Body: {
    "bankInvoiceId": "{{bankInvoiceId}}",
    "orderNumber": "{{mdOrder}}",
    "stateCode": "DECLINED"
}

Payment for a one-phase order:
POST Content-Type:application/json https://3dsec.sberbank.ru/dummysbolpayment/sbol/notifyPaymentStatus.do
Body: {
    "bankInvoiceId": "{{bankInvoiceId}}",
    "orderNumber": "{{mdOrder}}",
    "stateCode": "DEPOSITED"
}

Payment for a two-phase order:
POST Content-Type:application/json https://3dsec.sberbank.ru/dummysbolpayment/sbol/notifyPaymentStatus.do
Body: {
    "bankInvoiceId": "{{bankInvoiceId}}",
    "orderNumber": "{{mdOrder}}",
    "stateCode": "APPROVED"
}

Reversal:
POST Content-Type:application/json https://3dsec.sberbank.ru/dummysbolpayment/sbol/notifyPaymentStatus.do
Body: {
    "bankInvoiceId": "{{bankInvoiceId}}",
    "orderNumber": "{{mdOrder}}",
    "stateCode": "REVERSED",
    "merchantId": "123",
    "cancelInfo": {
        "cancelCreationDate": "2021-04-03T12:14:12"
    }
}

Refund without cart:
POST Content-Type:application/json https://3dsec.sberbank.ru/dummysbolpayment/sbol/notifyPaymentStatus.do
Body: {
    "bankInvoiceId": "{{bankInvoiceId}}",
    "orderNumber": "{{mdOrder}}",
    "stateCode": "REFUNDED",
    "cancelInfo": {
        "cancelCreationDate": "2021-04-03T12:14:12",
        "cancelAmount": {
            "value": 100,
            "currency": "RUB"
        }
    }
}

Refund with shopping cart:
POST Content-Type:application/json https://3dsec.sberbank.ru/dummysbolpayment/sbol/notifyPaymentStatus.do
Body: {
    "bankInvoiceId": "{{bankInvoiceId}}",
    "orderNumber": "{{mdOrder}}",
    "stateCode": "REFUNDED",
    "cancelInfo": {
        "cancelCreationDate": "2020-07-03T12:14:12",
        "cancelAmount": {
            "value": 9000,
            "currency": "RUB"
        }
    },
    "itemList": {
        "items": [
            {
                "itemPositionId": "3",
                "name": "3",
                "amount": 9000,
                "price": 3000,
                "currency": "RUB",
                "count": 3,
                "quantityMeasure": "unit"
            }
        ]
    }
}

Payment with the subsequent creation of a binding:
POST Content-Type:application/json https://3dsec.sberbank.ru/dummysbolpayment/sbol/notifyPaymentStatus.do
Body: {
  "bankBindingId": "05e63b91-2038-41da-b7f2-93566ec7bae5",
  "bankInvoiceId": "thdjrhjxBGdGKbMrhA4DIKRoo3DOnQ4q",
  "orderNumber": "b4aed2dc-6f89-78a4-b031-97e400f2b4d1",
  "stateCode": "DEPOSITED",
  "transactionInfo": {
    "authCode": "0316967",
    "bin": "4507",
    "expDate": "202502",
    "maskedNumber": "163",
    "operationDateTime": "2020-11-30T20:05:43",
    "rrn": "711520107063"
  }
}

Changing the order status of SBOL through the basic API gateway

Completion of a two-phase order, as well as refunds and reversals for SBOL orders, can be carried out using the basic API gateway and personal account.

Note

https://3dsec.sberbank.ru/dummysbolpayment/sbol/notifyPaymentStatus.do