First of all you need to generate parameters json with server-side language:

PHP example:
// creating parameters and signatures
$token = '';
$secret = '';

$params = [
    'partner_token' => $token,
    'target_element' => 'widget-container',
    'timestamp' =>  (int) (microtime(true) * 1000),
    'from_amount' => '3000',
    'from_currency' => 'USD',
    'lang' => 'EN',

$data = [];
foreach ($params as $key => $value) {
    $data[] = "$key:$value";
$data = join(";", $data);

$hash = hash_hmac('sha512', $data, $secret);
$params['signature'] = $hash;

Second step is initialise the widget:

<!-- add js script -->
<script src="<>"></script>

<!-- add container: id of container may be various but you must set it into parameters -->
<div id="widget-container"></div>

<!-- initialise the widget -->
<script type="text/javascript">
        <?php echo json_encode($params);  ?>

This is supported interface languages and variations of the parameter value :


If you need to get information about the state of the widget at the moment, then js events are provided for this, for which you can set various actions. For example, if a person has successfully completed a purchase automatically and needs to be redirected to the next page.

JS event is specified in the list of general parameters, for example:

params.onOperationSuccess = function (data) {
    console.log('%conOperationSuccess','color: red');
    console.log('%conOperationSuccess-data','color: yellow', data);

And the initialization of the widget occurs with the command:, 'POST');

A list of js events with a description is given below:

1) onLoaded(size_t size); - Finish loading widget content

2) onError(error_t error); - An error in the work of the widget, which does not allow the process to continue

3) onResize(size_t size); - Resizing the document inside the iframe widget

4) onExit(); - Close the widget, contains no data

5) onStarted(); - The widget started from the starting point (called at each reset to the beginning)

6) onOperationCreated(string operation_id); - Registration of transactions in processing

7) onPaymentSent(); - Sending payment data - the user clicked on Pay, does not contain data 

8) onOperationSuccess(operation_data_t operation_data); - Successful operation

9) onOperationFail(operation_data_t operation_data); - Unsuccessful operation

10) onOperationPending(operation_data_t operation_data); - Operation in progress