SberPay Payment via Redirect

The payment service AntiDDOS Router supports payments via SberPay from the payment page.

Until this method of payment is supported by other acquiring banks, payments using SberPay are always processed through Sberbank. The bank for SberPay must be set in the partner's settings in the Payment Service. To set it, contact support. To find out the current settings, use the /settings/getRouterParams.do request.

Integration Scheme

Enable SberPay on the payment page

Specify "SBRF_SBOL" value in the "allowedPaymentWays" parameter of the registration request to make the SberPay payment method available on the Payment service's payment page. Below is an example of such a request.

1. The Client initiates the purchase of a product or service on the Merchant's website.

2. The Merchant sends an order registration request to the payment service AntiDDOS Router: register.do for one-step payment or registerPreAuth.do for two-step payment. For more information about these types of payments, see the section Two-step payments.

To ensure the payment page displays the SberPay payment button, the "SBRF_SBOL" payment method must be included in the allowedPaymentWays parameter when registering the order.

Example request:

curl -X POST 'https://api.uat.all2pay.net/v1/register.do'
-H 'Content-Type: application/json' \
--data-raw '{
    "orderNumber": "order_123508",
    "amount": 10000,
    "currency": "643",
    "language": "ru",
    "returnUrl": "https://mybestmerchantreturnurl.com/success",
    "failUrl": "https://mybestmerchantreturnurl.com/fail",
    "userName": "test_user",
    "password": "test_user_password",
    "allowedPaymentWays": [
        "SBRF_SBOL",
        "CARD_BINDING",
        "CARD"
    ],
    "phone": "+79991234567"
}'

3. The payment service AntiDDOS Router checks the Merchant’s data and registers the order.

Redirect to the payment page

4. The payment service AntiDDOS Router provides the Merchant with a link to the payment page.

Example response:

{
    "errorCode": "0",
    "formUrl": "https://router.rbsuat.com/wl/payment.html?mdOrder=f9584546-2613-4a0d-896f-0194d243865f&language=ru",
    "orderId": "f9584546-2613-4a0d-896f-0194d243865f",
    "orderNumber": "order_123508"
}

5. The Merchant redirects the Client to the payment page.

6. The Client selects the SberPay payment method.

7. If the Client's phone number (parameter phone) was not provided during the order registration, the payment page requests the Client to enter their phone number.

SberPay payment

8. The payment page sends an operation registration request to the Sberbank Online mobile app (SBOL).

9. The payment service AntiDDOS Router sends order registration requests to the Bank in SBOL.

10. Necessary operations are performed to create the order in SBOL. The SBOL app receives an order notification.

11. The Bank returns the result of the order registration in SBOL.

12. The payment service AntiDDOS Router returns the result of the operation registration to the payment page.

13. The payment page displays a screen with instructions and a wait state for the SBOL payment.

14. The Client completes the payment through SBOL.

15. SBOL sends payment data to the Bank.

16. Periodically, the payment page requests the payment status from the payment service while the Client makes a payment through SBOL on their device.

17. The payment service AntiDDOS Router forwards the request to the target Bank.

18. The payment service AntiDDOS Router receives the payment status from the target Bank.

19. The payment service AntiDDOS Router returns the payment status to the payment page. If an error occurs, it is displayed on the payment page.

20. When the payment status includes a final page URL, the payment page redirects the Client to this URL. Depending on the payment result, this is either the failUrl or the returnUrl.

Final status of the order

21. The Client (final page) sends a request to the payment service AntiDDOS Router to get the final order status getOrderStatusExtended.do.

22-24. The payment service AntiDDOS Router requests the order status from the Bank and returns the order status to the final page.

Categories:
router API V1
Categories
Search results