Configure SDK
Last updated
Last updated
This script integrates the THNDR SDK into your web app, enabling secure communication between your parent window and the embedded iframe.
All interactions with your users balances are made via server to server APIs
Below is a brief overview of the callbacks and configuration.
Pass in the following query params into the Iframe url to configure the app.
operatorId
: This ID will be provided to you by THNDR
gameId
: 'solitaire', 'blocks' or 'blackjack'
language
: Two-letter country code. If language is not supported, defaults to English.
The SDK requires two key callback functions, each responsible for handling specific actions within the THNDR Iframe.
getToken
: Returns the authentication token for the user.
getBalance
: Retrieves the user's balance from your system and return it to the THNDR Iframe for display.
handleError
: Will return client safe errors returned from the
analyticsEvent
: Returns events that occur in the iframe, should it be required to capture these for your own analytics
closeIframe
: The host application should close the webview hosting the iframe. This means the user indicated they want to close the game.
The code integrates the THNDR SDK with the specified configuration and callbacks: