Sberbank Online

Overview

Sberbank Online is a payment method that allows customers to make payments through Sberbank online banking. Purchases are performed by using Payment Page and Gate, refunds—by using Gate.

General information

Payment method type Online banking
Countries and regions RU
Payment currencies RUB
Currency conversion
Purchases +
Payouts
Stored credentials payments
Full refunds +
Partial refunds
Chargebacks
Notes
Onboarding and access fee Refer to your key account manager ECommPay

Interaction diagram

Payment processing through the Sberbank Online payment method requires merchant's web service, one of the interfaces and the payment platform of ECommPay, as well as Sberbank Online technical facilities.



Operations support

  Interfaces Amounts, RUB
Payment Page CMS Plug-ins Gate Dashboard (Old Dashboard) minimum maximum
Purchases + + 1.00
Full refunds +

Processing scenarios

In the Sberbank Online method, to perform a purchase operation, you need to redirect a customer to the Sberbank Online service or a customer needs to receive the SMS code from the bank, while a refund is performed with the notification of a customer via web service.

The sections that follow provide detailed information about what you need to perform payments and how you can analyse the information on payments and operations.

Purchase by using Payment Page

General information

In the Sberbank Online method, when processing a purchase by using Payment Page, you can choose between two payment schemes: where a customer is redirected to the Sberbank Online website or where a customer receives the SMS code from the bank to complete the payment. In both schemes, the merchant web service should send a request with all the required parameters and signature to the ECommPay URL and get the callback with the payment result from the payment platform. When opening Payment Page, you can have Payment Page opened with the Sberbank Online method selected. For more information about preselecting payment methods, see in Preselecting payment methods. The full sequences and particularities of the purchase processes are provided below.



Figure: Purchase with redirection sequence by using Payment Page

  1. A customer initiates a purchase on the merchant's web service.
  2. The web service sends the request for Payment Page opening to the specified ECommPay URL.
  3. The request for opening is redirected to the payment platform.
  4. The payment platform performs the initial request processing that involves validation of the required parameters and signature.
  5. Requested Payment Page is generated into the ECommPay payment platform as specified in the project settings and the request parameters.
  6. Payment Page is displayed to the customer.
  7. The customer selects the Sberbank Online method.
  8. The payment platform receives the purchase request for payment processing from Payment Page.
  9. The payment platform performs the internal purchase request processing and sends it to the Sberbank Online service.
  10. The purchase request is processed on the Sberbank Online service side.
  11. The Sberbank Online service generates the data for redirecting the customer to the bank website and sends it to the payment platform.
  12. The payment platform sends the customer redirection data to Payment Page.
  13. The customer is redirected to the bank website.
  14. The customer completes all the payment steps required.
  15. The payment is processed on the Sberbank Online side.
  16. The result is displayed to the customer on the bank website.
  17. The customer is redirected to Payment Page.
  18. The Sberbank Online service sends the result notification to the payment platform.
  19. The payment platform sends a callback with the payment result to the web service.
  20. The payment platform sends the result to Payment Page.
  21. A page with the payment result information is displayed to the customer on Payment Page.


Figure: Purchase by SMS code sequence by using Payment Page

  1. A customer initiates a purchase on the merchant's web service.
  2. The web service sends the request for Payment Page opening to the specified ECommPay URL.
  3. The request for opening is redirected to the payment platform.
  4. The payment platform performs the initial request processing that involves validation of the required parameters and signature.
  5. Requested Payment Page is generated into the ECommPay payment platform as specified in the project settings and the request parameters.
  6. Payment Page is displayed to the customer.
  7. The customer selects the Sberbank Online method.
  8. The form for entering phone number in Sberbank Online service is displayed to the customer on Payment Page.
  9. The customer enters the phone number.
  10. The payment platform receives the purchase request for payment processing from Payment Page.
  11. The payment platform performs the internal purchase request processing and sends it to the Sberbank Online service.
  12. The purchase request is processed on the Sberbank Online service side.
  13. The Sberbank Online service generates the code for payment and sends it to the customer in the SMS.
  14. The customer completes all the payment steps required using the received SMS code.
  15. The payment is processed on the Sberbank Online side.
  16. The Sberbank Online service sends the result notification to the payment platform.
  17. The payment platform sends a callback with the payment result to the web service.
  18. The payment platform sends the result to Payment Page.
  19. A page with the payment result information is displayed to the customer on Payment Page.

The sections that follow discuss in more details the request format and the Payment Page parameters to use in the Sberbank Online payment method and provide the information on the format of callbacks with payment results. For the general information on how to use the API, see Payment Page API Description.

Request format

There are several things you need to consider when using the Sberbank Online method:

  1. You must provide values for the basic minimum of parameters. Listed below are the parameters that are mandatory for any payment method:
    • project_id—the project ID obtained from ECommPay
    • payment_id—payment ID unique within the project
    • payment_currency—payment currency in ISO-4217 alpha-3 format
    • payment_amount—payment amount in minor units
    • customer_id—ID of the customer within the project
  2. The currency of payment can only be RUB.
  3. Additionally you must use the customer_phoneparameter if the payment by SMS scheme is used.
  4. To preselect Sberbank Online as the payment method on Payment Page for customers, pass the code sberbank in the force_payment_method parameter in the request for opening.
  5. If required, you can also add any other additional parameters Payment Page supports. For information about all parameters available in the Sberbank Online method, see Payment Page invocation parameters.
  6. After you specify all the parameters you need, you must create the signature for the request. For instructions on how to sign a payment request, see Signature generation and verification.

Thus, a correct payment request in the Sberbank Online method must include project, customer and payment IDs, the currency and the amount of a payment, the phone number of a customer (if the payment by SMS scheme is used), as shown in the following example:

EPayWidget.run(
    { payment_id: 'X03936', 
      payment_amount: 10000, 
      payment_currency: 'RUB', 
      project_id: 35, 
      customer_id: 'customer1',
      customer_phone: '89123456789',
      signature: "kUi2x9dKHAVNU0FYldJrxh4yo+52Kt8KU+Y1Y4HASCQ9vySO\/RLCvhtT4DqtVUkDJrOcZzUCwX6R\/ekpZhkIQg=="
    }
)

For information about all parameters available in the Sberbank Online method, see Payment Page invocation parameters.

Callback format

The Sberbank Online method uses the standard format for callbacks to deliver purchase results. For more information, see Callbacks.

The following is the example of a callback with an information about successful 100,00 RUB purchase by using the SMS from the phone number 79638525896 made by the customer in the 386 project.

Figure: Example of a successful purchase callback

{
        "project_id": 386,
        "payment": {
            "id": "EP2eae-2f24",
            "type": "purchase",
            "status": "success",
            "date": "2019-03-04T11:06:45+0000",
            "method": "sberbank",
            "sum": {
                "amount": 10000,
                "currency": "RUB"
            },
            "description": ""
        },
        "account": {
            "number": "79638525896"
        },
        "operation": {
            "id": 2000000633,
            "type": "sale",
            "status": "success",
            "date": "2019-03-04T11:06:45+0000",
            "created_date": "2019-03-04T11:06:23+0000",
            "request_id": "10950e9d02995ad1",
            "sum_initial": {
                "amount": 10000,
                "currency": "RUB"
            },
            "sum_converted": {
                "amount": 10000,
                "currency": "RUB"
            },
            "provider": {
                "id": 1312,
                "payment_id": "8a9bef7b2468f6db507e8c1cc7b2c911",
                "date": "2018-10-26T07:25:18+0000",
                "auth_code": "",
                "endpoint_id": "sberbank"
            },
            "code": "0",
            "message": "Success"
        },
        "signature": "pnJ185wSvo4t+dW+apQ+o3LiIbSGcwUGRG8q4TIrEvqtTEvWUaxOFHA=="
    }

The following is the example of a callback for a purchase declined due to insufficient funds on customer account.

Figure: Example of a declined purchase callback

 {
        "project_id": 386,
        "payment": {
            "id": "EP1bb6-c379",
            "type": "purchase",
            "status": "decline",
            "date": "2019-03-04T11:07:22+0000",
            "method": "sberbank",
            "sum": {
                "amount": 10000,
                "currency": "RUB"
            },
            "description": ""
        },
        "account": {
            "number": "79638525896"
        },
        "operation": {
            "id": 632,
            "type": "sale",
            "status": "decline",
            "date": "2019-03-04T11:07:22+0000",
            "created_date": "2019-03-04T11:07:08+0000",
            "request_id": "e0865f7f",
            "sum_initial": {
                "amount": 10000,
                "currency": "RUB"
            },
            "sum_converted": {
                "amount": 10000,
                "currency": "RUB"
            },
            "provider": {
                "id": 1312,
                "payment_id": "94b4a6a43480d57ee45ab107",
                "date": "2018-10-26T07:25:18+0000",
                "auth_code": "",
                "endpoint_id": "sberbank"
            },
            "code": "20105",
            "message": "Insufficient funds on customer account"
        },
        "signature": "yMGGZSFFOatC0/gyFF2zlFgFfslBksxuYqVTjQ0T0DMIA9evlziWay30F+QBQ=="
    }

Related topics

The following topics might be useful when implementing payments through Payment Page:

Purchase by using Gate

General information

In the Sberbank Online methods, when processing a purchase by using Gate, you can choose between two payment schemes: where a customer is redirected to the Sberbank Online website or where a customer receives the SMS code from the bank to complete the payment. In both schemes, the merchant web service should send a request with all the required parameters and signature to the ECommPay URL and get the callback with the payment result from the payment platform. The full sequences and particularities of the purchase processes are provided below.



Figure: Purchase with redirection sequence by using Gate

  1. A customer initiates a purchase through Sberbank Online on the merchant's web service side.
  2. The web service sends the request for processing the purchase by using Gate to the specified ECommPay URL.
  3. The payment platform receives the request for processing the purchase from Gate.
  4. The payment platform performs the initial request processing that includes validation of the required parameters and signature.
  5. The payment platform sends the response with request receipt confirmation and correctness check result to the web service. For more information, see Response format.
  6. The payment platform performs the internal payment request processing and redirects the request to the bank service.
  7. The request is processed on the bank side.
  8. The bank service sends the data for redirecting the customer to the Sberbank Online service to the payment platform.
  9. The payment platform sends the callback with the redirection data in the redirect_data object to the web service.
  10. The customer is redirected from the web service to the Sberbank Online service.
  11. The customer completes all the payment steps required.
  12. The payment is processed on the bank side.
  13. The result is displayed to the customer on the Sberbank Online side.
  14. The Sberbank Online service sends the payment result notification to the payment platform.
  15. The ECommPay payment platform sends a callback to the web service.
  16. The customer receives the payment result on the web service.


Figure: Purchase by SMS sequence by using Gate

  1. A customer initiates a purchase through Sberbank Online on the merchant's web service side.
  2. The web service sends the request for processing the purchase by using Gate to the specified ECommPay URL.
  3. The payment platform receives the request for processing the purchase from Gate.
  4. The payment platform performs the initial request processing that includes validation of the required parameters and signature.
  5. The payment platform sends the response with request receipt confirmation and correctness check result to the web service. For more information, see Response format.
  6. The payment platform performs the internal payment request processing and redirects the request to the bank service.
  7. The request is processed on the bank side.
  8. The bank service generates the code for payment and sends it to the customer in the SMS.
  9. The customer completes all the payment steps required using the received SMS code.
  10. The payment is processed on the bank side.
  11. The bank service sends the payment result notification to the payment platform.
  12. The ECommPay payment platform sends a callback to the web service.
  13. The customer receives the payment result on the web service.

The sections that follow discuss in more details the request format and the Gate parameters to use in the Sberbank Online payment method and provide the information about formats of the data for redirecting customers and the information about the format of callbacks with payment results. The general information about working with API see in the API Description section.

Request format

There are several things you must consider when using purchase requests in the Sberbank Online method:
  1. You perform purchase by sending the /v2/payment/online-banking/sberbank/sale request by using POST (HTTP) method. This request refers to the online banking requests group: /v2/payment/online-banking/{payment_method}/sale
  2. The following objects and parameters must be specified in the request:
    • Object general—general purchase information:
      • project_id—project identifier
      • payment_id—unique payout identifier
      • signature—signature created after you specify all the required parameters. For more information about signature generation, see Signature generation and verification
    • Object customer—customer information:
      • id—ID of the customer within the project
      • phone—phone number (for payments by SMS),
      • ip_address—customer IP address
    • Object payment—purchase information:
      • amount—purchase amount
      • currency—purchase currency in the ISO-4217 alpha-3 format
  3. The currency of a purchase can only be RUB.
  4. If required, you can also add any other additional parameters Gate supports.

Thus, a correct payment request in the Sberbank Online method must include project, customer and payment IDs, the currency and the amount of a payment, IP address of a customer and the phone number (if the payment by SMS scheme is used), as shown in the following example:

Figure: Purchase request example

{
    "general": {
        "project_id": 35,
        "payment_id": "Payment 12",
        "signature": "2tlMuYxLW9Yu6RETr8pdCfmi0UPE8euD+o4EVPjLyfbOQ+9ajAteg5lPk96Q=="
  },
    "customer": {
        "id": "customer1",
        "ip_address": "1.1.1.1",
        "phone": "891234567890"
  },
    "payment": {
        "amount": 10000,
        "currency": "RUB"
  }
}

Formats of the customer redirection data

To redirect a customer from the web service to the Sberbank Online site, you must receive a callback from the payment platform containing the URL for redirection in the redirect_data.url parameter and data to be sent in the request body in the redirect_data.body parameter, and use these parameters when opening the HTML page using the method specified in the redirect_data.method parameter.

The following is the callback fragment containing the redirection data.

"redirect_data": {
            "method": "GET",
            "body": {...},
            "url": "http://example.com/example/a/acs/29d7454b70adad712aa5b536d449c7f7"
        }

Callback format

The standard format for callbacks is used to deliver purchase results from Sberbank Online. For more information, see Callbacks.

The following is the example of a callback with an information about successful 100,00 RUB purchase by using the SMS from the phone number 79638525896 made by the customer fav_customer in the 35 project.

Figure: Example of a succeed purchase callback

{
        "project_id": 386,
        "payment": {
            "id": "EP2eae-2f24",
            "type": "purchase",
            "status": "success",
            "date": "2019-03-04T11:06:45+0000",
            "method": "sberbank",
            "sum": {
                "amount": 10000,
                "currency": "RUB"
            },
            "description": ""
        },
        "account": {
            "number": "79638525896"
        },
        "operation": {
            "id": 2000000633,
            "type": "sale",
            "status": "success",
            "date": "2019-03-04T11:06:45+0000",
            "created_date": "2019-03-04T11:06:23+0000",
            "request_id": "10950e9d02995ad1",
            "sum_initial": {
                "amount": 10000,
                "currency": "RUB"
            },
            "sum_converted": {
                "amount": 10000,
                "currency": "RUB"
            },
            "provider": {
                "id": 1312,
                "payment_id": "8a9bef7b2468f6db507e8c1cc7b2c911",
                "date": "2018-10-26T07:25:18+0000",
                "auth_code": "",
                "endpoint_id": "sberbank"
            },
            "code": "0",
            "message": "Success"
        },
        "signature": "pnJ185wSvo4t+dW+apQ+o3LiIbSGcwUGRG8q4TIrEvqtTEvWUaxOFHA=="
    }

The following is the example of a callback for a purchase declined due to insufficient funds on customer account.

Figure: Example of a declined purchase callback

 {
        "project_id": 386,
        "payment": {
            "id": "EP1bb6-c379",
            "type": "purchase",
            "status": "decline",
            "date": "2019-03-04T11:07:22+0000",
            "method": "sberbank",
            "sum": {
                "amount": 10000,
                "currency": "RUB"
            },
            "description": ""
        },
        "account": {
            "number": "79638525896"
        },
        "operation": {
            "id": 632,
            "type": "sale",
            "status": "decline",
            "date": "2019-03-04T11:07:22+0000",
            "created_date": "2019-03-04T11:07:08+0000",
            "request_id": "e0865f7f",
            "sum_initial": {
                "amount": 10000,
                "currency": "RUB"
            },
            "sum_converted": {
                "amount": 10000,
                "currency": "RUB"
            },
            "provider": {
                "id": 1312,
                "payment_id": "94b4a6a43480d57ee45ab107",
                "date": "2018-10-26T07:25:18+0000",
                "auth_code": "",
                "endpoint_id": "sberbank"
            },
            "code": "20105",
            "message": "Insufficient funds on customer account"
        },
        "signature": "yMGGZSFFOatC0/gyFF2zlFgFfslBksxuYqVTjQ0T0DMIA9evlziWay30F+QBQ=="
    }

Related topics

The following topics might be useful when implementing payments through Gate:

Refunds by using Gate

General information

Sberbank Online supports full refunds processing. To perform a refund through the Sberbank Online method, merchant's web service sends a request with all the required parameters and signature to ECommPay URL, and receives a callback with the payment result. The full sequence of the refund process is provided below.



Figure: Refund sequence by using Gate

  1. A customer orders a refund on the merchant's web service side.
  2. Merchant's web service sends the request for the refund processing by using Gate to the appropriate ECommPay URL.
  3. Gate redirects the request to the ECommPay payment platform.
  4. The payment platform performs all the necessary checks and processes the request.
  5. The reply with the request processing results is sent to the merchant's web service. For more information, see Response format.
  6. The payment platform redirects the refund request to the Sberbank Online service.
  7. The payment is processed on the Sberbank Online side.
  8. Sberbank Online sends the result notification to the payment platform.
  9. The payment platform sends a callback with the payment result to the web service.
  10. The customer receives the refund result from the web service.

The sections that follow discuss in more details the request format and the Gate parameters to use in the Sberbank Online payment method and provide the information on the format of callbacks with refund results.

Request format

There are several things you must consider when using refund requests in the Sberbank Online method:
  1. You perform refunds by sending the /v2/payment/online-banking/sberbank/refund request by using POST (HTTP) method. This request refers to the online banking requests group: /v2/payment/online-banking/{payment_method}/refund
  2. The following objects and parameters must be specified in any request:
    • Object general—general refund information:
      • project_id—project identifier
      • payment_id—unique refund identifier
      • signature—signature created after you specify all the required parameters. For more information about signature generation, see Signature generation and verification
    • Object customer—customer information:
      • ip_address—customer IP address
    • Object payment—refund information:
      • description—comment to the refund.
  3. If required, you can also add any other additional parameters Gate supports.

Thus, a correct refund request in the Sberbank Online method must include project and payment IDs, customer IP address, currency and amount of the refund, as shown in the following example:

Figure: Example of a refund request

{
   "general": {    
    "project_id": 239,    
    "payment_id": "refund_02",   
    "signature": "of8k9xerKSK4XL1QFaDH3p9Mh0CIcjmOwSwKJ7KLTZYO56lCv+f1M0Sf/7eg=="
  },  
   "customer": {    
     "ip_address": "1.2.3.4" 
  },  
   "payment": {    
     "amount": 10000,    
     "currency": "RUB",
     "description": "refund_02"
 }
}

Callback format

The Sberbank Online method uses the standard format for callbacks to deliver refund results. For more information, see Callbacks.

The following is the example of a callback with an information about successful 100,00 RUB refund for the customer account account1 in the 386 project.

Figure: Example of a successful refund callback

{
        "project_id": 386,
        "payment": {
            "id": "EP1bb6-c379",
            "type": "purchase",
            "status": "refunded",
            "date": "2019-03-04T11:16:29+0000",
            "method": "sberbank",
            "sum": {
                "amount": 10000,
                "currency": "RUB"
            },
            "description": ""
        },
        "account": {
            "number": "79638525896"
        },
        "operation": {
            "id": 633,
            "type": "refund",
            "status": "success",
            "date": "2019-03-04T11:16:29+0000",
            "created_date": "2019-03-04T11:16:25+0000",
            "request_id": "88c5433b45f91",
            "sum_initial": {
                "amount": 10000,
                "currency": "RUB"
            },
            "sum_converted": {
                "amount": 10000,
                "currency": "RUB"
            },
            "provider": {
                "id": 1312,
                "payment_id": "94b4a6a434857ee45ab107",
                "date": "2019-03-04T11:16:28+0000",
                "auth_code": ""
            },
            "code": "0",
            "message": "Success"
        },
        "signature": "NPKaC8A2wQehyGWVYTVTQ14HE4JBB+H2FVHbS1YTT9VOHG1VFJ5zqg=="
    }

The following is the example of a callback for a refund declined due to the refund amount is more than init amount.

Figure: Example of a declined refund callback

{
        "project_id": 386,
        "payment": {
            "id": "EP1bb6-c379",
            "type": "purchase",
            "status": "success",
            "date": "2019-03-04T11:16:29+0000",
            "method": "sberbank",
            "sum": {
                "amount": 50000,
                "currency": "RUB"
            },
            "description": ""
        },
        "account": {
            "number": "79638525896"
        },
        "operation": {
            "id": 633,
            "type": "refund",
            "status": "decline",
            "date": "2019-03-04T11:16:29+0000",
            "created_date": "2019-03-04T11:16:25+0000",
            "request_id": "88c5433b45f91",
            "sum_initial": {
                "amount": 100000,
                "currency": "RUB"
            },
            "sum_converted": {
                "amount": 100000,
                "currency": "RUB"
            },
            "provider": {
                "id": 1312,
                "payment_id": "94b4a6a434857ee45ab107",
                "date": "2019-03-04T11:16:28+0000",
                "auth_code": ""
            },
            "code": "3283",
            "message": "Refund amount more than init amount"
        },
        "signature": "NPKaC8A2wQehyGWVYTVTQ14HE4JBB+H2FVHbS1YTT9VOHG1VFJ5zqg=="
    }

Related topics

The following topics might be useful when implementing payments through Gate:

Testing

General information

For the Sberbank Online method the testing of purchases and refunds by using Gate..

Testing can be performed within a test project, to enable and disable the testing availability, contact ECommPay technical support via support@ecommpay.com.

When performing a test payment, take into account that you must specify the identifier of the test project in the requests, the currency can be only RUB, the interface of the payment forms emulator of Sberbank Online may differ from the one used in the production environment.

Test payments statuses

When testing purchases, the final payment status is determined by the amount specified in the request:

  • decline status with 40000 or 40400 amount
  • success status with any other amount

When testing refunds, the final payment status is determined by the amount specified in the request:

  • decline status with 50000 or 50500 amount
  • success status with any other amount

Purchases by using Gate

To perform a test purchase by using Gate, do the following:

  1. Send a correct test request for purchase to the payment platform.
  2. Accept a callback with redirection data.
  3. Go to the received URL and click the Success or Decline button (depending on the amount specified in the request).
  4. Accept a callback with information about the payment result.

The full information about purchase process by using Sberbank Online through Gate is provided in the section Purchase by using Gate.

Refunds by using Gate

To perform a test refund by using Gate, send a correct test request for refund of previously performed test purchase to the payment platform and accept a callback with information about the payment result.

The test refund performing is possible only within a day after the initial purchase. The full information about the refund process by using Sberbank Online through Gate is provided in the section Refunds by using Gate.

Analysis of payments results

As with other payment methods ECommPay offers, when using the Sberbank Online method, you have several options to analyse the information about payments and operations performed by using the method—alone or in conjunction with other methods.

You can load and analyse all the necessary information in Dashboard (Old Dashboard), for instance you can use the analytic panels on the Analytics tab to this end.

Also, you can export the information for further analysis by using third party analytical tools. The following options are available:

  • Dashboard (Old Dashboard) allows you to download reports in CSV and XLS formats—by using the tools on the Payments tab. You can perform export as a one-time download to your local computer or have payment data regularly exported and delivered to email addresses you specify.
  • Data API allows you to have payment information exported in JSON format and delivered to a URL you specify. The payment information is exported by using the /operations/get queries.

If you have any further questions regarding payment data analysis, contact ECommPay technical support.