Section 07
Wallet flows
Full call sequence for Seamless and Transfer.
Wallet flows#
This section describes the full call sequence for each wallet type. Remember that the wallet type is defined per supplier and that each game states it in its gameModel field (see Technical concepts).
Seamless flow#
The balance stays on your platform and AIC queries and moves it in real time.
- Your platform calls
enterGameand opens the returned URL for the player. - AIC calls your
check-balanceto show the balance in the game. - On every round, AIC calls your
add-betwith the bet and, if there is a win, youradd-win. - Cancellations or refunds arrive as
add-win, or asadd-betif the reversal takes balance from the player. - When the player leaves the game, your platform should call
logout-gameto close the session with the supplier. There is no pending balance to return.
Transfer flow#
The player's full balance is transferred to the game when it opens and returns when it closes.
- Your platform calls
enterGame. - AIC calls your
check-balanceand then youradd-betfor the player's full balance, which moves to the game. If a previous Transfer session of the player left a balance with the supplier, AIC may return it first throughadd-win. - The player plays; bets and wins are handled inside the game, with no calls to your API.
- When the player closes the game on your platform, your platform calls
logout-game(see Aggregator endpoints). - AIC retrieves the balance from the game and credits it to your platform with
add-win. - AIC sends you
update-totals-gameswith the session totals.
Important
In Transfer, the session only closes when your platform calls logout-game. If you don't, the player's balance stays in the game. Call logout-game only once per game session and before the player opens another game.
Rules for your integration#
- Unique, stable
playerName. Use a unique identifier per player that does not change between sessions and don't use the-or_characters. Adding a prefix specific to your platform is recommended. - Unique
tokenper session. Generate a new session token on everyenterGame; AIC sends it back astoken_roomon every wallet call. - Use
movementIdto detect duplicates.idTransactionmay repeat across operations of the same round;movementIdis unique per movement and only repeats when AIC resends the same movement. If you receive amovementIdyou already applied, don't apply it again and respond with the player's current balance. - Respond quickly. Wallet calls happen during gameplay; a slow or failed response makes the operation fail towards the supplier.