Iframe API
Game events
Every message the game posts to your page, its fields, which of our games send it, and when.
| Event | Dice | Limbo | Mines | Plinko | Crash | Chicken | Keno | Tower | HiLo | Sent by |
|---|---|---|---|---|---|---|---|---|---|---|
ifc.init | yes | yes | yes | yes | yes | yes | yes | yes | yes | all games |
ifc.close | yes | yes | yes | yes | yes | yes | yes | yes | yes | all games |
ifc.back.to.home | yes | yes | yes | yes | yes | yes | yes | yes | yes | all games |
ifc.sound | yes | yes | yes | yes | yes | yes | yes | yes | yes | all games |
ifc.music | — | — | — | — | yes | — | — | — | — | Crash |
ifc.animation | yes | yes | yes | yes | yes | yes | yes | yes | yes | all games |
ifc.update.stake | yes | yes | yes | yes | yes | yes | yes | yes | yes | all games |
ifc.make.bet | yes | yes | yes | yes | yes | yes | yes | yes | yes | all games |
ifc.make.bet.complete | yes | yes | yes | yes | yes | yes | yes | yes | yes | all games |
ifc.start.round | yes | yes | yes | yes | yes | yes | yes | yes | yes | all games |
ifc.update.balance | yes | yes | yes | yes | yes | yes | yes | yes | yes | all games |
ifc.win.info | yes | yes | yes | yes | yes | yes | yes | yes | yes | all games |
ifc.end.round | yes | yes | yes | yes | yes | yes | yes | yes | yes | all games |
ifc.cashout | — | — | yes | — | yes | yes | — | yes | yes | Mines, Crash, Chicken, Tower, HiLo |
ifc.cashout.complete | — | — | yes | — | yes | yes | — | yes | yes | Mines, Crash, Chicken, Tower, HiLo |
ifc.cancel.bet | — | — | — | — | yes | — | — | — | — | Crash |
ifc.cancel.bet.complete | — | — | — | — | yes | — | — | — | — | Crash |
ifc.start.bet.timer | — | — | — | — | yes | — | — | — | — | Crash |
ifc.autoplay | yes | yes | yes | yes | yes | yes | yes | yes | yes | all games |
Order in a round#
An instant round (Dice, Limbo, Plinko, Keno) sends, after our answer: ifc.make.bet (before the request) → ifc.make.bet.complete → ifc.start.round → ifc.update.balance → ifc.win.info (if it won) → ifc.end.round. If a placed round has no balance figure we may show and the info call fails, it sends ifc.make.bet.complete with code 200 → ifc.start.round → ifc.win.info (if it won) → ifc.end.round, with no ifc.update.balance between them; the game reads the balance once more after that, and ifc.update.balance follows once a read succeeds. A refused bet sends ifc.make.bet → ifc.make.bet.complete with the code. A round whose result the game shows later than our answer (Plinko's falling droplet, Keno's draw) sends its events when it settles, not when the animation ends. A round of Mines, Chicken, Tower or HiLo sends the same events at its bet, up to ifc.update.balance, and nothing for a pick, a step, a guess or a skip that leaves it in play. A cash-out sends ifc.cashout → ifc.cashout.complete → ifc.update.balance → ifc.win.info → ifc.end.round. The pick, step or guess that ends the round with a win (Mines' last safe tile, Chicken's last step, Tower's top floor, HiLo's right guess that reaches the round's cap or turns its 52nd card) sends ifc.update.balance → ifc.win.info → ifc.end.round, with no ifc.cashout. A lost round sends ifc.end.round, after an ifc.update.balance only when its answer brings a newer balance figure (a zero-amount deposit, or a round resumed from an earlier launch). A deal of HiLo (a card dealt on top before a bet: when the game opens without one or a bet finds none, and at each Skip before a bet) sends nothing and moves no money; it is not a round (no wallet call, no round id). An operator sees nothing of a deal, so the nonces of a player's rounds have gaps. The back office's page of a HiLo round names the deal it started on, by its id; a deal is in no round list, report or round details.
A round still in play when the game closes resumes at the next launch without a new ifc.start.round; one the server settles by expiry sends no message.
Events#
ifc.init#
Sent by: all games. Once, right after the game is ready.
| Field | Type | Presence | Meaning |
|---|---|---|---|
isReInit | false | required | Always false: our games start once per page load, and a reload is a new launch. |
balance | number | required | The balance, in major units. |
sound | boolean | required | Sound is on. |
music | boolean | optional | Crash only: its flight sound is on. |
animation | boolean | required | Animations are not reduced. |
additionalOperatorData | any JSON | required | What your auth answer gave in data.additionalOperatorData, unchanged, or null. |
currency | string | required | The session currency. |
precision | integer (0–8) | required | The currency's decimals: the most fraction digits an amount can have. 8 in every crypto currency; 2 in a fiat currency, 0 in JPY and KRW. In release 1.0.0 it was 6 in USDT, USDC, TRX and XRP (see the Changelog). |
{
"type": "ifc.init",
"data": {
"isReInit": false,
"balance": 49.99,
"sound": true,
"animation": true,
"additionalOperatorData": { "tier": 2 },
"currency": "USD",
"precision": 2
}
}
ifc.close#
Sent by: all games. Once, at the first of: the player leaves by "Back to lobby" or by Stop in the reality-check window; the session ends (closed by you or by us, or a fatal error); the page is unloaded. The one sent at unload is best effort and arrives with event.source null: see ifc.close when the game page unloads.
| Field | Type | Presence | Meaning |
|---|---|---|---|
additionalOperatorData | any JSON | required | As in ifc.init. |
{
"type": "ifc.close",
"data": {
"additionalOperatorData": { "tier": 2 }
}
}
ifc.back.to.home#
Sent by: all games. The player chose "Back to lobby" in the game's menu. In a frame the game does not navigate: your page decides.
| Field | Type | Presence | Meaning |
|---|---|---|---|
returnUrl | string | required | The return_url of the launch, or "". |
{
"type": "ifc.back.to.home",
"data": { "returnUrl": "https://casino.example/lobby" }
}
ifc.sound#
Sent by: all games. The sound switch changed, by the player or by your command.
| Field | Type | Presence | Meaning |
|---|---|---|---|
value | boolean | required | Sound on. |
{
"type": "ifc.sound",
"data": { "value": false }
}
ifc.music#
Sent by: Crash. Crash's Music switch (its flight sound) changed. The other games have no music and never send it.
| Field | Type | Presence | Meaning |
|---|---|---|---|
value | boolean | required | Music on. |
{
"type": "ifc.music",
"data": { "value": false }
}
ifc.animation#
Sent by: all games. The Animations switch changed.
| Field | Type | Presence | Meaning |
|---|---|---|---|
value | boolean | required | Animations on. |
{
"type": "ifc.animation",
"data": { "value": true }
}
ifc.update.stake#
Sent by: all games. After ifc.init, once per panel; then whenever a panel's stake becomes another valid amount (typed, halved, doubled, a preset, a free bet chosen).
| Field | Type | Presence | Meaning |
|---|---|---|---|
id | 1 | 2 | required | The bet panel: 1; in Crash 1 for bet A and 2 for bet B. |
amount | number | required | The stake, in major units. |
{
"type": "ifc.update.stake",
"data": { "id": 1, "amount": 5.32 }
}
ifc.make.bet#
Sent by: all games. A bet request is sent to us. Crash: a bet queued for the next round sends it when the request really goes out.
| Field | Type | Presence | Meaning |
|---|---|---|---|
id | 1 | 2 | required | The bet panel: 1; in Crash 1 for bet A and 2 for bet B. |
amount | number | required | The stake, in major units. |
{
"type": "ifc.make.bet",
"data": { "id": 1, "amount": 5.32 }
}
ifc.make.bet.complete#
Sent by: all games. The bet request got its final answer. A pending answer (your wallet is slow) is not final: the event follows when the bet resolves, with code 409 (BET_NOT_PLACED) when the withdraw got no answer and you answered 408 twice to its rollback.
| Field | Type | Presence | Meaning |
|---|---|---|---|
id | 1 | 2 | required | The bet panel: 1; in Crash 1 for bet A and 2 for bet B. |
code | integer | required | 200: accepted. Otherwise see the codes. |
errorMessage | string | optional | "<CODE>: <message>", only when code is not 200. |
additionalOperatorData | null | required | Always null. |
{
"type": "ifc.make.bet.complete",
"data": {
"id": 1,
"code": 402,
"errorMessage": "NOT_ENOUGH_MONEY: not enough money",
"additionalOperatorData": null
}
}
ifc.start.round#
Sent by: all games. Dice, Limbo, Mines, Plinko, Chicken, Keno, Tower, HiLo: the bet was accepted; bets holds that one bet. Crash: the shared round starts flying, every round; also once right after ifc.init if a round is flying then; bets holds the player's accepted bets in it, [] if none.
| Field | Type | Presence | Meaning |
|---|---|---|---|
bets | array of object | required | The bets in the round: {id, amount}, amounts in major units. |
{
"type": "ifc.start.round",
"data": {
"bets": [
{ "id": 1, "amount": 5.32 }
]
}
}
ifc.update.balance#
Sent by: all games. A new balance is shown. Not sent for a balance your page set with ifc.set.balance.
| Field | Type | Presence | Meaning |
|---|---|---|---|
amount | number | required | The balance, in major units. |
{
"type": "ifc.update.balance",
"data": { "amount": 55.2 }
}
ifc.win.info#
Sent by: all games. A round ended with a payout above 0 (Mines: at cash-out or when the board is cleared; Chicken: at cash-out or when the last step is reached; Tower: at cash-out or when the top floor is cleared; HiLo: at cash-out, or when a right guess reaches the round's cap or turns its 52nd card; Crash: when the cash-out is confirmed).
| Field | Type | Presence | Meaning |
|---|---|---|---|
id | 1 | 2 | required | The bet panel: 1; in Crash 1 for bet A and 2 for bet B. |
amount | number | required | The amount credited, in major units. |
{
"type": "ifc.win.info",
"data": { "id": 1, "amount": 10.53 }
}
ifc.end.round#
Sent by: all games. Dice, Limbo, Plinko, Keno: the round settled. Mines: the round ended (cash-out, mine, cleared board). Chicken: the round ended (cash-out, fox, last step reached). Tower: the round ended (cash-out, trap, top floor cleared). HiLo: the round ended (cash-out, wrong guess, a right guess at the cap or on the 52nd card). Crash: the shared round ended (crash, or void). A round that flew is always sent as started first; a round that is void before it flies has no ifc.start.round.
data is {}.
{
"type": "ifc.end.round",
"data": {}
}
ifc.cashout#
Sent by: Mines, Crash, Chicken, Tower, HiLo. The player pressed Cash out (in Crash, on a bet), or autobet cashed out the round it plays (Mines, Chicken, Tower, HiLo). Dice, Limbo, Plinko and Keno have nothing to cash out.
| Field | Type | Presence | Meaning |
|---|---|---|---|
id | 1 | 2 | required | The bet panel: 1; in Crash 1 for bet A and 2 for bet B. |
{
"type": "ifc.cashout",
"data": { "id": 2 }
}
ifc.cashout.complete#
Sent by: Mines, Crash, Chicken, Tower, HiLo. The cash-out got its answer. Crash also sends it, with code 200 and no ifc.cashout before it, when an automatic cash-out was executed.
| Field | Type | Presence | Meaning |
|---|---|---|---|
id | 1 | 2 | required | The bet panel: 1; in Crash 1 for bet A and 2 for bet B. |
code | integer | required | 200: cashed out. Otherwise see the codes. |
errorMessage | string | optional | "<CODE>: <message>", only when code is not 200. |
additionalOperatorData | null | required | Always null. |
{
"type": "ifc.cashout.complete",
"data": {
"id": 2,
"code": 200,
"additionalOperatorData": null
}
}
ifc.cancel.bet#
Sent by: Crash. The player cancels a bet queued for the next round that was not sent yet. A bet that reached us is final: it cannot be cancelled, also while betting is open, and you never see this event for it.
| Field | Type | Presence | Meaning |
|---|---|---|---|
id | 1 | 2 | required | The bet panel: 1; in Crash 1 for bet A and 2 for bet B. |
{
"type": "ifc.cancel.bet",
"data": { "id": 1 }
}
ifc.cancel.bet.complete#
Sent by: Crash. Right after ifc.cancel.bet (the queue is in the game; no request is made).
| Field | Type | Presence | Meaning |
|---|---|---|---|
id | 1 | 2 | required | The bet panel: 1; in Crash 1 for bet A and 2 for bet B. |
code | 200 | required | Always 200. |
additionalOperatorData | null | required | Always null. |
{
"type": "ifc.cancel.bet.complete",
"data": {
"id": 1,
"code": 200,
"additionalOperatorData": null
}
}
ifc.start.bet.timer#
Sent by: Crash. A betting window opens; also once after ifc.init if a window is open. The single-player games have no betting window.
| Field | Type | Presence | Meaning |
|---|---|---|---|
duration | integer (≥ 0) | required | Milliseconds until betting closes. |
{
"type": "ifc.start.bet.timer",
"data": { "duration": 7000 }
}
ifc.autoplay#
Sent by: all games. Autoplay starts or stops (Crash: a panel's auto-bet).
| Field | Type | Presence | Meaning |
|---|---|---|---|
id | 1 | 2 | required | The bet panel: 1; in Crash 1 for bet A and 2 for bet B. |
value | boolean | required | Autoplay running. |
{
"type": "ifc.autoplay",
"data": { "id": 1, "value": false }
}
ifc.switch.game#
Never sent. None of our games has a control that switches to another game; choosing a game is your lobby's job. When the player leaves, you receive ifc.back.to.home.
Codes of the complete events#
| code | Meaning |
|---|---|
| 200 | Accepted. |
| 402 | NOT_ENOUGH_MONEY |
| 401 | INVALID_SESSION |
| 409 | BETTING_CLOSED |
| 409 | ROUND_CRASHED |
| 409 | BET_NOT_PLACED |
| 422 | BET_ABOVE_MAX |
| 429 | RATE_LIMITED |
| 503 | WALLET_UNAVAILABLE |
| 412 | REALITY_CHECK: your 412 to the withdraw (the reality-check window opens) |
| 500 | The request got no answer. |