Skip to Content

Balance & Currency

Keeping the balance and selected currency in sync runs in both directions. The iFrame tells you when it changed something; you tell the iFrame when you did.

When the iFrame changes the balance

The iFrame sends user.balance after any player action that changed the balance — a bet placed, a cashout.

Example:
import integration from "services/integration"; integration.on("user.balance", () => { // reload the balance shown on your platform });
Note

This event is only relevant for seamless wallet integrations. With a transfer wallet the balance lives on your side, so there is nothing to reload — use user.balance_transfer instead.

For transfer wallet integrations, user.balance_transfer is sent when the player clicks Deposit or Withdrawal inside the iFrame. Its payload carries the transaction type and amount, and you are expected to perform the transfer and report the result back:

integration.on("user.balance_transfer", ({ value }) => { // value = { type, amount } — perform the transfer, then report the result });

The full flow, including the response you must send, is on Transfer wallet frontend integration (requires sign-in).

Forcing a refresh from your side

When the balance changes outside the iFrame — a deposit, a manual adjustment, a bonus credited — the iFrame does not know. Send get-user-balance to make it refetch.

Example:
import integration from "services/integration"; const updateBalance = () => { integration.emit({}, "get-user-balance"); };

Handling the Deposit button

The iFrame emits deposit.click when the player clicks Deposit in the Betslip. Handle it to route into your own deposit flow, and send get-user-balance once the deposit completes.

Example:
import integration from "services/integration"; const on = integration.on; const unsubscriptions = []; unsubscriptions.push( on("deposit.click", () => { analyticsService.pushDataLayer({}); navigateByPath("/deposit"); }), );

Multi-currency balances

When the player has a multi-currency balance, the iFrame reports every balance and the selected currency with user.multiCurrencyBalance, so both sides stay in sync.

Message structure:
{ type: 'user.multiCurrencyBalance', data: { multiCurrencyBalance: { USD: { available: 999 }, EUR: { available: 999 } }, selectedCurrency: 'EUR' } }
  • multiCurrencyBalance — an object where each key is a currency code with its balance details.
  • selectedCurrency — the currency the player currently has selected.
Example:
import integration from "services/integration"; integration.on("user.multiCurrencyBalance", (message) => { const { multiCurrencyBalance, selectedCurrency } = message.data; // sync your currency switcher and balance display });

See Supported Currencies for the full list of currency codes.

Switching currency from your site

When the player picks a different currency on your side, tell the iFrame with currency-update.

Example:
import integration from "services/integration"; integration.helpers.updateCurrency("EUR");

Pair this with user.multiCurrencyBalance so a switch on either side is reflected on the other.