Configure SDK
This script integrates the Clinch 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.
Configuration Object (config
)
config
)The config
object passed to loadClinch
contains settings that control the behaviour of the iFrame.
operatorId
: This ID will be provided to you by THNDRgameId
: 'solitaire', 'blocks' or 'blackjack'clinchUrl
: This is the URL for the clinch iframe. This will be provided by THNDR for sandbox (embed-sandbox.clinch.gg) and production (embed.clinch.gg) environments.companyName
: This is your company name that will be shown by the users balance of their wallet on your platform.language
: Two-letter country code. If language is not supported, defaults to English.logging
: When set totrue
, this enables debug mode, allowing additional logging in the console for troubleshooting.
Callbacks
The SDK requires two key callback functions, each responsible for handling specific actions within the Clinch web app.
getToken
: Returns the authentication token for the user.getBalance
: Retrieves the user's balance from your system and return it to the Clinch web app for display.
Example Code Overview
The code integrates the Clinch SDK with the specified configuration and callbacks:
Last updated