Events
#
auth:generic_login:error
The event fires when the user fails to login (any login method).
Example
Playtech.on('auth:generic_login:error', (error) => { ... });
#
auth:generic_login:success
Event fires when user successfully login on the portal (any login method).
Example
Playtech.on('auth:generic_login:success', () => { ... });
#
cookie-message-closed
Event fires when Cookies Regulatory Message is being closed.
Example
Playtech.on('cookie-message-closed', () => { ... });
#
cookie-settings-updated
Event fires when Cookies Settings component values is changed.
Parameters:
Name |
Type |
Description |
details |
Object
|
Properties
Name |
Type |
Description |
name |
string
|
Name of the cookie type. |
value |
string
|
Value. |
|
Example
Playtech.on('cookie-settings-updated', ({ name, value }) => { ... });
#
DEPOSIT_COMPLETED
The event fires when the deposit has been successfully completed.
Parameters:
Name |
Type |
Description |
details |
Array.<Object>
|
{ amount: 1, code: '40564463', method: 'Retail Deposit', status: 'waiting' }
Properties
Name |
Type |
Description |
amount |
number
|
|
code |
string
|
|
method |
string
|
|
status |
string
|
|
|
Example
Playtech.on('DEPOSIT_COMPLETED', ([{ amount, code, method, status }]) => { ... });
#
DEPOSIT_FAIL
The event is fired when the deposit was not completed successfully.
Parameters:
Name |
Type |
Description |
details |
Array.<Object>
|
Properties
Name |
Type |
Description |
correlationId |
string
|
|
error |
Object
|
|
errorCode |
number
|
|
errorDescription |
string
|
|
errorMessage |
string
|
|
|
Example
Playtech.on('DEPOSIT_FAIL', ([{ correlationId, error, errorCode, errorDescription, errorMessage }]) => { ... });
Event fires dynamic custom form submitted.
Parameters:
Name |
Type |
Description |
details |
Object
|
Properties
Name |
Type |
Description |
formValues |
Object
|
contains form field values (fieldName: fieldValue) |
formIMSValues |
Object
|
contains form field values (fieldIMSName: fieldValue) |
formName |
string
|
contains form name that was picked in component settings |
resolve |
function
|
{function} function that should be called in case of success. Accepts text or a translation key to be shown as notification message |
reject |
function
|
{function} function that should be called in case of error. Accepts text or a translation key to be shown as form error |
|
Example
Playtech.on('dynamic-custom-form-submit', ({ formValues, formIMSValues, formName, resolve, reject }) => {
const { userName } = formValues;
if (formName !== 'my-custom-form') {
return;
}
if (userName === 'HanSolo'){
console.log(userName)
resolve('Login is successful!')
} else {
reject('This form could be submitted only by Han Solo')
}
});
#
FORGOT_PASSWORD_FAIL
Event fires when Forgot Password request is failed.
Example
Playtech.on('FORGOT_PASSWORD_FAIL', () => { ... });
#
FORGOT_PASSWORD_SUCCESS
Event fires when Forgot Password request is successful.
Example
Playtech.on('FORGOT_PASSWORD_SUCCESS', () => { ... });
#
FORGOT_USERNAME_FAIL
Event fires when Forgot Username request is failed.
Example
Playtech.on('FORGOT_USERNAME_FAIL', () => { ... });
#
FORGOT_USERNAME_SUCCESS
Event fires when Forgot Username request is successful.
Example
Playtech.on('FORGOT_USERNAME_SUCCESS', () => { ... });
#
GAME_FAVORITES_HANDLER
The event is fired when a game is added/removed from the favorites.
Parameters:
Name |
Type |
Description |
details |
Array.<Object>
|
Properties
Name |
Type |
Description |
gameCode |
string
|
|
method |
string
|
|
gameFeed |
number
|
|
container |
number
|
|
|
Example
Playtech.on('GAME_FAVORITES_HANDLER', ([{ gameFeed, method, gameCode, container }]) => { ... });
#
GAME_LAUNCH
Parameters:
Name |
Type |
Attributes |
Description |
details |
Array.<Object>
|
|
|
details[0].gameCode |
string
|
|
|
details[0].container |
string
|
|
|
details[0].gameName |
string
|
|
|
details[0].launchType |
string
|
|
Values: 'Real' | 'Demo' |
details[0].gameFeed |
string
|
<optional>
|
|
details[0].gameName |
string
|
<optional>
|
|
Example
Playtech.on('GAME_LAUNCH', ({ gameCode, container, gameName, launchType }) => { ... });
#
ip-change
Event fires when IMS sends push notification that player's IP has changed.
Subscription type 'ip-change' must be configured to receive this notifications.
More specifically 'ip-change' event means push (code 31133) with actionIpChangedInfo in pushMessage.data.action.
Example
Playtech.on('ip-change', () => { ... });
#
LANGUAGE_CHANGED
Event fires when user change language.
Parameters:
Name |
Type |
Description |
details |
Array.<string>
|
details[0] is language. |
Example
Playtech.on('LANGUAGE_CHANGED', (lang) => { ... });
#
leaderboard-message
Event used for Leaderboard integration
Subscription type 'leaderboard-message' must be configured to receive this notifications.
Example
Playtech.on('leaderboard-message', () => { ... });
#
LOGGED_IN
Event fires when user successfully login with credentials on the portal. Event does not trigger after portal reload.
Example
Playtech.on('LOGGED_IN', () => { ... });
#
LOGGED_IN_FAIL
The event fires when the user fails to login with credentials on the portal.
Parameters:
Name |
Type |
Description |
error |
Array.<string>
|
Login error. |
Example
Playtech.on('LOGGED_IN_FAIL', ([error]) => { ... });
#
LOGGED_OUT
The event fires when the user logout on the portal.
Example
Playtech.on('LOGGED_OUT', () => { ... });
#
navigate
Event fires when player navigates to another page.
Parameters:
Name |
Type |
Description |
details |
Object
|
Properties
Name |
Type |
Description |
pathname |
string
|
Path of a page. |
cleanPathname |
string
|
Path of a page without language code. |
prevPathname |
string
|
Path of a previous page. |
cleanPrevPathname |
string
|
Path of a previous page without language code. |
|
Example
Playtech.on('navigate', ({ pathname, cleanPathname, prevPathname, cleanPrevPathname }) => { ... });
#
player-tag-change
Event fires when IMS sends push notification that player's tag has changed or was removed.
Subscription for tag changes must be configured in CMS to receive this notifications.
Parameters:
Name |
Type |
Description |
details |
Object
|
Properties
Name |
Type |
Description |
tag |
string
|
Name of the tag changed. |
value |
string
|
New value of the tag; not available for simple tags. |
removed |
boolean
|
If tag was removed from player. |
|
Example
Playtech.on('player-tag-change', ({ tag, value, removed }) => { ... });
Event fires when IMS sends reality check popup is closed.
Parameters:
Name |
Type |
Description |
status |
string
|
Whether popup was accepted or declined. |
Example
Playtech.on('reality-check-popup-closed', (status) => { ... });
Event fires when IMS sends reality check popup is shown.
Example
Playtech.on('reality-check-popup-shown', () => { ... });
#
REGISTRATION_COMPLETED
Event fires on successful registration.
Parameters:
Name |
Type |
Description |
details |
Array.<Object>
|
Properties
Name |
Type |
Description |
username |
string
|
|
userId |
string
|
|
playerCode |
number
|
|
|
Example
Playtech.on('REGISTRATION_COMPLETED', ([{ username, userId, playerCode }]) => { ... });
#
REGISTRATION_FAIL
The event fires when an error occurs during registration.
Parameters:
Name |
Type |
Description |
details |
Array.<Object>
|
Properties
Name |
Type |
Description |
content |
string
|
|
|
Example
Playtech.on('REGISTRATION_FAIL', ([{ content }]) => { ... });
#
REGISTRATION_STEP_CHANGED
The event fires when the registration step changes.
Parameters:
Name |
Type |
Description |
details |
Array.<(string|number)>
|
Properties
Name |
Type |
Description |
nextStep |
string
|
number
|
|
currentStep |
string
|
number
|
|
|
Example
Playtech.on('REGISTRATION_STEP_CHANGED', ([nextStep, currentStep]) => { ... });
#
REGISTRATION_SUBMITTED
The event is fired when registration form is submitted.
Example
Playtech.on('REGISTRATION_SUBMITTED', () => { ... });
#
RESPONSIVE_GAME_PORTLET_CATEGORY_EXPAND
The event is fired when games category is expanded.
Parameters:
Name |
Type |
Description |
details |
Array.<Object>
|
Properties
Name |
Type |
Description |
container |
string
|
|
gameFeed |
string
|
|
categoryName |
string
|
|
|
Example
Playtech.on('RESPONSIVE_GAME_PORTLET_CATEGORY_EXPAND', ([{ container, gameFeed, categoryName }]) => { ... });
The event is fired when active slide was changed.
Parameters:
Name |
Type |
Description |
details |
Array.<Object>
|
Properties
Name |
Type |
Description |
container |
string
|
|
gameFeed |
string
|
|
categoryName |
string
|
|
elementClicked |
string
|
|
|
Example
Playtech.on('RESPONSIVE_GAME_PORTLET_CATEGORY_SCROLL', ([{ container, gameFeed, categoryName, elementClicked }]) => { ... });
#
RESPONSIVE_GAME_PORTLET_CATEGORY_SWITCH
The event is fired when game portlet category was switched.
Parameters:
Name |
Type |
Description |
details |
Array.<Object>
|
Properties
Name |
Type |
Description |
container |
string
|
|
gameFeed |
string
|
|
categoryName |
string
|
|
|
Example
Playtech.on('RESPONSIVE_GAME_PORTLET_CATEGORY_SWITCH', ([{ container, gameFeed, categoryName }]) => { ... });
#
RESPONSIVE_GAME_PORTLET_DISPLAY
The event is fired when games portlet is mounted.
Parameters:
Name |
Type |
Description |
details |
Array.<Object>
|
Properties
Name |
Type |
Description |
container |
string
|
|
gameFeed |
string
|
|
|
Example
Playtech.on('RESPONSIVE_GAME_PORTLET_DISPLAY', ([{ container, gameFeed }]) => { ... });
#
RESPONSIVE_GAME_PORTLET_PERSONALIZED_GRID_2
The event is fired when personalized game grid category is configured.
Parameters:
Name |
Type |
Description |
details |
Array.<Object>
|
Properties
Name |
Type |
Description |
container |
string
|
|
gameFeed |
string
|
|
personalizedCategoryName |
string
|
|
personalizedGridFallback |
number
|
|
pagePath |
string
|
|
|
Example
Playtech.on('RESPONSIVE_GAME_PORTLET_PERSONALIZED_GRID_2', ([{ container, gameFeed, personalizedCategoryName, personalizedGridFallback, pagePath }]) => { ... });
#
RESPONSIVE_GAME_PORTLET_SEARCH
The event is fired when search field input is changed.
Parameters:
Name |
Type |
Description |
details |
Array.<Object>
|
Properties
Name |
Type |
Description |
gameFeed |
string
|
|
searchstring |
string
|
|
container |
number
|
|
|
Example
Playtech.on('RESPONSIVE_GAME_PORTLET_SEARCH', ([{ gameFeed, searchString, container }]) => { ... });
#
SAFECHARGE_ALTERNATIVE_VERIFICATION
The event is fired after alternative verification action is received with payload as an argument.
Parameters:
Name |
Type |
Description |
details |
Object
|
|
Example
Playtech.on('SAFECHARGE_ALTERNATIVE_VERIFICATION', (data) => { ... });
#
SAFECHARGE_ANALYTICS
The event is fired after action "analytics" is received with payload as an argument.
Parameters:
Name |
Type |
Description |
details |
Object
|
|
Example
Playtech.on('SAFECHARGE_ANALYTICS', (data) => { ... });
The event is fired after contact support action is received with payload as an argument.
Parameters:
Name |
Type |
Description |
details |
Object
|
|
Example
Playtech.on('SAFECHARGE_CONTACT_SUPPORT', (data) => { ... });
#
SAFECHARGE_PM_REGISTRATION_FAIL
The event is fired after payment method registration failed action is received with payload as an argument.
Parameters:
Name |
Type |
Description |
details |
Object
|
|
Example
Playtech.on('SAFECHARGE_PM_REGISTRATION_FAIL', (data) => { ... });
#
SAFECHARGE_PM_REGISTRATION_SUCCESS
The event is fired after payment method successful registration action is received with payload as an argument.
Parameters:
Name |
Type |
Description |
details |
Object
|
|
Example
Playtech.on('SAFECHARGE_PM_REGISTRATION_SUCCESS', (data) => { ... });
#
SAFECHARGE_WITHDRAWAL_FAIL
The event is fired after withdraw failed action is received with payload as an argument.
Parameters:
Name |
Type |
Description |
details |
Object
|
|
Example
Playtech.on('SAFECHARGE_WITHDRAWAL_FAIL', (data) => { ... });
#
SAFECHARGE_WITHDRAWAL_SUCCESS
The event is fired after successful withdraw action is received with payload as an argument.
Parameters:
Name |
Type |
Description |
details |
Object
|
|
Example
Playtech.on('SAFECHARGE_WITHDRAWAL_SUCCESS', (data) => { ... });
#
self-exclusion-success
The event is fired when the request Self Exclusion is successful.
Example
Playtech.on('self-exclusion-success', () => { ... });
#
sharedPagesEvents
Examples
Playtech.on('player-changes-tab', (details) => { ... });
Playtech.on('player-clicks-join-mp', (details) => { ... });
Playtech.on('player-clicks-join-lb', (details) => { ... });
Playtech.on('player-clicks-close', (details) => { ... });
Playtech.on('player-changes-game', (details) => { ... });
Playtech.on('player-clicks-leave-mp', (details) => { ... });
Playtech.on('player-clicks-leave-lb', (details) => { ... });
Playtech.on('player-scrolls-down', (details) => { ... });
Playtech.on('promotion-opened', (details) => { ... });
Playtech.on('section-expanded', (details) => { ... });
Playtech.on('section-collapsed', (details) => { ... });
Playtech.on('section-expanded', (details) => { ... });
Playtech.on('player-clicks-backbutton', (details) => { ... });
#
sportsbook-analytics
Event fires when user balance is updated.
Parameters:
Name |
Type |
Description |
details |
Object
|
Properties
Name |
Type |
Description |
eventName |
string
|
Name of the event. |
userName |
string
|
Current player's userName. |
currency |
string
|
Player's currency. |
raw |
Object
|
string
|
{Object|string} Other metadata. |
|
Example
Playtech.on('sportsbook-analytics', (data) => { ... });
Event fires when two-factor authentication popup was closed.
Parameters:
Name |
Type |
Description |
details |
Array.<string>
|
details[0] is component |
Example
Playtech.on('TWO_FA_POPUP_CLOSED', ([Component]) => { ... });
Event fires when two-factor authentication popup was opened.
Parameters:
Name |
Type |
Description |
details |
Array.<string>
|
details[0] is component. |
Example
Playtech.on('TWO_FA_POPUP_OPENED', ([Component]) => { ... });
#
WEB_CONTENT_RENDERED
The event is fired when the web content was rendered.
Parameters:
Name |
Type |
Description |
details |
Array.<Object>
|
Properties
Name |
Type |
Description |
wc |
string
|
|
|
Example
Playtech.on('WEB_CONTENT_RENDERED', ([wc]) => { ... });
#
WITHDRAWAL_COMPLETED
The event fires when the withdrawal has been successfully completed.
Parameters:
Name |
Type |
Description |
details |
Array.<Object>
|
Properties
Name |
Type |
Description |
amount |
string
|
|
method |
string
|
|
status |
string
|
|
transactionCode |
string
|
|
|
Example
Playtech.on('WITHDRAWAL_COMPLETED', ([{ amount, method, status, transactionCode }]) => { ... });
#
WITHDRAWAL_FAIL
The event is fired when the withdraw was not completed successfully.
Parameters:
Name |
Type |
Description |
details |
Array.<Object>
|
Properties
Name |
Type |
Description |
correlationId |
string
|
|
error |
Object
|
|
errorCode |
number
|
|
errorDescription |
string
|
|
errorMessage |
string
|
|
|
Example
Playtech.on('WITHDRAWAL_FAIL', ([{ correlationId, error, errorCode, errorDescription, errorMessage }]) => { ... });
Event fires when some component fires 'backButton:show'.
Example
Playtech.on('header:backButton:toggle', () => { ... });
#
user:balanceUpdated
Event fires when user balance is updated.
Example
Playtech.on('user:balanceUpdated', () => { ... });
#
user:lowBalanceCheck
Event fires when User toggles balance visibility.
Parameters:
Name |
Type |
Description |
details |
Array.<Object>
|
Properties
Name |
Type |
Description |
lowBalanceHighlight |
boolean
|
|
showLowBalancePopup |
boolean
|
|
|
Example
Playtech.on('user:lowBalanceCheck', ([{ lowBalanceHighlight, showLowBalancePopup }]) => { ... });
#
user:toggleBalance
Event fires when User toggles balance visibility.
Parameters:
Name |
Type |
Description |
details |
Array.<boolean>
|
details[0] is isShown |
Example
Playtech.on('user:toggleBalance', ([isShown]) => { ... });