AIC Aggregator

Search the documentation

Search sections, endpoints, parameters...

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.

  1. Your platform calls enterGame and opens the returned URL for the player.
  2. AIC calls your check-balance to show the balance in the game.
  3. On every round, AIC calls your add-bet with the bet and, if there is a win, your add-win.
  4. Cancellations or refunds arrive as add-win, or as add-bet if the reversal takes balance from the player.
  5. When the player leaves the game, your platform should call logout-game to 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.

  1. Your platform calls enterGame.
  2. AIC calls your check-balance and then your add-bet for 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 through add-win.
  3. The player plays; bets and wins are handled inside the game, with no calls to your API.
  4. When the player closes the game on your platform, your platform calls logout-game (see Aggregator endpoints).
  5. AIC retrieves the balance from the game and credits it to your platform with add-win.
  6. AIC sends you update-totals-games with 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 token per session. Generate a new session token on every enterGame; AIC sends it back as token_room on every wallet call.
  • Use movementId to detect duplicates. idTransaction may repeat across operations of the same round; movementId is unique per movement and only repeats when AIC resends the same movement. If you receive a movementId you 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.