Инструменты страницы
Passing bonus point amount in order registration request
Main process:
- describes the main payment method (payment using a bank card and «Sberbank Spasibo»/«SberMiles» bonuses),
- does not take into account negative scenarios (error handling).
Step | Description |
---|---|
1 | The client forms an order cart on the store's website. |
2 | After the order has been confirmed by the customer, the store registers the order in RBS. For registration, such parameters as the withdrawal amount, the withdrawal currency, the order number in the store system, the customer's return URL, as well as a parameter named sbrf_spasibo:amount_bonus/sbrf_sbermiles:amount_bonus are used, the value of which contains the amount of points to be debited (passed in additional order parameters). |
3 | Upon registration request, the payment gateway returns a unique order identifier in the payment system and the URL to which the user must be redirected to receive the payment form. |
4 | The store system sends a redirect to the client's browser to the URL obtained in step 3. |
5 | The customer's browser opens the URL. |
6 | The client's browser receives a payment form as a page at the specified URL. |
7 | The user fills out the received form and sends the data to the server of the payment gateway. |
8 | The payment gateway sends a request to the bonus service to deduct bonus points. |
9 | The bonus service deducts bonus points in an amount equal to the value of the parameter sbrf_spasibo:amount_bonus/sbrf_sbermiles:amount_bonus . If it was not possible to debit the bonuses, the order is transferred to the DECLINE status. |
10 | The bonus service returns the results of the bonus points debiting to the payment gateway. |
11 | The payment gateway makes payment (debiting) by bank card. In case of payment from the card, money will be debited in an amount equal to the value of the amount parameter. The minimum amount of payment by bank card is 100 rubles. If it was not possible to debit funds from the card, the operation of writing off bonuses is automatically canceled. |
12 | After the payment is made, the payment gateway sends the return URL to the client's browser (specified earlier when registering the order with the store). |
13 | Customer's browser requests from the Store the payment result page. |
14 | (optional) The store system requests the Payment Gateway for the order payment status (using the internal number in the payment system). |
15 | (optional) the payment gateway returns the payment status. |
16 | The store system sends a page with the payment results to the client's browser. |
If, after the 20 minutes allotted for payment have elapsed, the client does not return from the payment gateway to the store's payment results page (to the client's return URL), then the payment is considered unsuccessful.
If the purchase is paid with a card participating in the «Sberbank-Spasibo»/ «SberMiles» program, the payment gateway transfers the purchase amount to the «Sberbank-Spasibo»/«SberMiles» system for the subsequent accrual of bonuses.