The possibility of using this functionality by the seller must be agreed with the Bank.
In the settings of the payment script (in the page header), you must enable checking for the presence of a payment fee:
getFeeEnabled: true
The payment script executes a request to the payment gateway to determine whether a fee is required. In case of a positive response, the fee amount is displayed on the payment page.
To do this, the following block must be present in the page body:
<div id="feeBlock" class="row" style="display: none;">
<div class="price">
<span class="size24">
<div id="feeAmount" style="float: left; margin-right: 8px;">0.00</div>
<img src="images/ruble.gif" id="fee-ruble-sign" class="ruble-img" style="display: none; float: right;"/>
</span>
</div>
<div class="name"><span>Payment fee</span></div>
</div>
Go to the payment page. If working with fees is supported for the seller, the payment page will display:
Flag I have read and accept the terms of the offer agreement. To get acquainted with the offer agreement, click the corresponding link. The user will be redirected to the page specified in the merchant's settings.
To make a payment, enter your card details, check the box I have read and accept the terms of the offer agreement and click Pay.
The fee amount will be passed in the additional parameter payment_fee payment_fee
of the payment request. It will be displayed in the console in the payment currency: