Widget display methods

After creating and configuring the widget, you can use a few methods to control the widget's display.

Please make sure you use the latest version of SDK (6.x.x).

You can use the following widget class methods:

openMount the widget in the DOM and make it visible.
closeClose the widget modal.
updateThemeSwitch the widget's theme without reloading it.
addEventListenersAdd event listeners. You can find more info on the event listeners in the listeners object page.
removeEventListenersRemove event listeners.

The open() method will initialize the widget as an iFrame.


You can switch the widget's theme without reloading it; please note this method should be called only after the widget is fully loaded:

  theme: 'dark', // Use 'undefined' for the default light theme. 
  colors: {
    // Can be in any suitable format (string, HEX, rgb etc.)
    color_buttons: 'red',

You can listen to widget events:

  position: data => console.log('step:', data.step),

Here are the options to remove event listeners:


wertWidget.removeEventListeners([ 'rate-update', 'payment-status' ]);


Documentation related to this page