Casino API
Blackjack, Three Card Poker and Hold'em Odds are live tables that run on your own wallet. Aniplus shuffles, deals and settles every hand on its server; your server only opens the game for a player and answers four wallet calls. One integration covers all three games — pick one with game at launch. Rules are fixed; you choose the commission, currencies, limits and channels when you integrate. Demos: Blackjack → · Three Card Poker → · Hold'em Odds →
Overview
| Step | Who calls | What |
|---|---|---|
| 1 | You → Aniplus | POST /bj/v1/launch — get a one-time game URL for a player |
| 2 | Player browser | Opens the URL (new window or iframe). The table is shared only by your players in the same currency and channel. |
| 3 | Aniplus → You | balance · bet · win · rollback on your wallet URL |
| 4 | You → Aniplus | GET /bj/v1/round/{roundId} and GET /bj/v1/report for support and reconciliation |
Base URL: https://aniplus.com. All bodies are JSON (UTF-8). All amounts are integers in the currency's smallest unit (USD · GBP · EUR cents, JPY yen, KRW won) — never decimals.
Signing
Every request in both directions carries two headers. Requests older than 5 minutes or with a wrong signature are rejected with 401.
X-Time: 1761234567890 (milliseconds since epoch) X-Sign: hex( HMAC-SHA256( secret, X-Time + "." + body ) ) body = "" for GET
// Node.js
const time = Date.now(), body = JSON.stringify(payload);
const sign = crypto.createHmac("sha256", SECRET).update(time + "." + body).digest("hex");
fetch(url, { method: "POST", headers: { "content-type": "application/json", "x-time": time, "x-sign": sign }, body });
The secret is issued by Aniplus once (32 characters) and can be rotated; the old secret stops working immediately. Compare signatures in constant time on your side.
Launch
POST /bj/v1/launch
{ "operatorId": "OP123", "game": "blackjack", "userId": "u_98765", "nickname": "lucky***",
"currency": "USD", "channel": 1, "lang": "en",
"limits": { "min": 300, "max": 200000, "maxWin": 500000 } }
200 { "ok": true, "game": "blackjack", "limits": { "min": 300, "max": 200000, "maxWin": 500000 }, "url": "https://aniplus.com/bj/play/?t=9afa0c…&ch=1&lang=en" }
userId≤ 64 characters, stable per player.nicknameis shown at the table (16 characters) — mask it; do not send real names or login IDs.limits(optional): this player's own minimum bet, maximum bet and max win per round, in the smallest unit — for example by VIP level. They can only narrow your operator limits (wider values are cut to yours; the reply shows what applies). Any field may be left out. The table shows them, refuses a bet overmaxas it is placed (OVER_MAX), drops one underminwhen betting closes (BAD_STAKE), and cuts the payout tomaxWin("capped": trueonwin). They last for the session and its reconnects; send them again on the next launch. Invalid values → 400BAD_LIMITS. If Aniplus turns on limits required for your account, a launch without them → 400LIMITS_REQUIRED.game:blackjack(default when left out),tcp(Three Card Poker — the URL then opens/bj/play/tcp/) orhod(Hold'em Odds —/bj/play/hod/).channel: 1 CLASSIC · 2 SPEED · 3 ROYAL (only the channels enabled for you).- The URL works once and expires in 5 minutes. After connecting, the game reconnects by itself for 30 minutes.
- Your server IP must be on your allow-list.
Wallet callbacks (you implement)
Aniplus calls POST {walletUrl}/balance, /bet, /win, /rollback with the same signature headers. Answer within 5 seconds.
| Call | When | Reply |
|---|---|---|
balance | Player joins | { "ok": true, "balance": 95000 } |
bet | Betting closes (all of the player's bets in one call); later in the hand for double, split, insurance, follow-double, follow-split | { "ok": true, "balance": … } or { "ok": false, "code": "INSUFFICIENT" } |
win | Once per player per round, after settlement — also with amount: 0 to close a lost round | { "ok": true, "balance": … } |
rollback | A bet timed out or failed with an error — or the round was cut short by a server restart (that round is void and the stake goes back; no win follows) | { "ok": true } — also when you never saw that bet |
POST {walletUrl}/bet
{ "operatorId": "OP123", "txId": "BJ-OP123-USD-1-20261023-000184-u_98765-1",
"roundId": "OP123-USD-1-20261023-000184", "game": "blackjack", "userId": "u_98765", "currency": "USD",
"amount": 5000, "kind": "bet",
"detail": [ { "seat": 3, "type": "main", "amount": 3000 }, { "seat": 1, "type": "behind", "amount": 2000 } ] }
POST {walletUrl}/win
{ "operatorId": "OP123", "txId": "BJ-OP123-USD-1-20261023-000184-u_98765-W",
"roundId": "OP123-USD-1-20261023-000184", "game": "blackjack", "userId": "u_98765", "currency": "USD",
"amount": 9800, "commission": 200, "commissionBp": 400, "capped": false,
"detail": [ { "seat": 3, "hand": 0, "result": "WIN", "stake": 3000, "type": "main" },
{ "seat": 1, "hand": 0, "result": "WIN", "stake": 2000, "type": "behind" } ] }
POST {walletUrl}/rollback
{ "operatorId": "OP123", "txId": "RB-BJ-…-1", "refTxId": "BJ-…-1", "roundId": "…" }
- Idempotent: the same
txIdmust return the first result again and must not move money twice. Aniplus retries with the sametxId. - Timeout: if
betdoes not answer in 5 s the action is cancelled at the table and arollbackfollows. If that bet arrives later, reject it. - Win is never dropped:
winandrollbackare retried with back-off until you answerok— also across an Aniplus server restart (pending calls are kept on disk and resent with the sametxId). - Order: calls for one player arrive one after another. When betting closes, the
betcalls for different players at the same table are sent at the same time. amountinwin= stake returned + winnings after commission;resultisBJ,WIN,PUSHorLOSE.capped: truemeans the round hit your max-win limit.- Every
betandwincarries"game":"blackjack","tcp"or"hod"(blackjack calls carried none before 2026-11-07).rollbackhas nogame— tell the game from therefTxIdprefix. - Three Card Poker calls carry
"game": "tcp"and transaction IDs starting withTC-, so they never collide with blackjack (BJ-). See Three Card Poker for itskindvalues anddetail. - Hold'em Odds calls carry
"game": "hod"and transaction IDs starting withHO-. See Hold'em Odds for itsdetail.
Round lookup & daily report
GET /bj/v1/round/OP123-USD-1-20261023-000184 (signed, body "")
→ { "ok": true, "round": { roundId, table, shoe, at, dealer, dealerBJ, hands[], results[], events[] } }
GET /bj/v1/report?date=2026-10-23¤cy=USD (signed, body "", header X-Operator: OP123, date in UTC)
→ { "ok": true, "rounds": 1840, "players": 211, "staked": 98340000, "returned": 95870000,
"ggr": 2470000, "commission": 1204000, "capped": 0,
"games": { "blackjack": { "rounds": 1210, … }, "tcp": { "rounds": 630, … }, "hod": { "rounds": 0, … } } }
Round IDs are operator-currency-channel-YYYYMMDD-sequence (the date is UTC; the sequence is unique within the day but not consecutive, so treat round IDs and txIds as opaque strings); Three Card Poker uses T1·T2·T3 in the channel place (OP123-USD-T1-20261024-000052) and Hold'em Odds always H1 (it has one table per currency). The top-level report totals cover all games; games splits them.
Each blackjack shoe's card order is hashed (SHA-256) before the first card is dealt and published with its salt after the shoe ends. Three Card Poker and Hold'em Odds shuffle a fresh deck every round and do the same per round, so any round can be verified afterwards.
Currencies & amounts
| Currency | Smallest unit | Chips | Default min – max |
|---|
- Bets must be a multiple of the smallest chip — blackjack 3:2 then always pays a whole number.
- You set min bet, max bet and max win per round for each currency. One table never mixes currencies.
Commission & RTP
Rules are fixed. The only RTP setting is a commission on winnings (0–5%) that you choose — like the banker commission in baccarat. Losses and pushes are not charged. The commission is shown to players on the table and in every payout.
| Commission | RTP (basic strategy) | A $100 win pays |
|---|---|---|
| 0% | 99.60% | $200 |
| 1% | 99.07% | $199 |
| 2% | 98.54% | $198 |
| 3% | 98.02% | $197 |
| 4% | 97.49% | $196 |
| 5% | 96.96% | $195 |
Blackjack: measured over 10 million simulated hands of perfect basic strategy. Real players make mistakes, so observed RTP is usually 1.5–2 points lower.
| Three Card Poker | 0% | 1% | 2% | 3% | 4% | 5% |
|---|---|---|---|---|---|---|
| Ante & Play (per ante) | 96.63% | 95.89% | 95.15% | 94.40% | 93.66% | 92.92% |
| Ante & Play (per total wager) | 97.99% | 97.54% | 97.10% | 96.66% | 96.22% | 95.77% |
| Pair Plus | 97.68% | 96.96% | 96.24% | 95.52% | 94.80% | 94.08% |
| 6 Card Bonus | 91.44% | 90.60% | 89.76% | 88.91% | 88.07% | 87.23% |
Three Card Poker: exact values from every possible deal (all 22,100 player hands against every dealer hand, and all 20,358,520 six-card combinations), with the standard queen-6-4 strategy.
Hold'em Odds: every price is set from the hand's exact chance of winning at that moment (all remaining boards are counted) as floor(0.95 ÷ chance × 100) ÷ 100, so every bet returns at most 95% before commission, whichever hand or street it is placed on. Commission comes out of the winnings part only, so it lowers short prices less than long ones.
Table behaviour
- 7 seats. A player may take up to 3 open seats, or bet behind any other seat (the seated player decides; backers choose whether to follow doubles and splits).
- Empty seats can be filled by AI players. The operator sets how many sit at a table (a range, or none at all), the names they use and whether their name tags carry an AI label. They see only their own cards and the dealer's up card, play perfect basic strategy on hands with bets behind, and step away as real players join (the last open seat always stays free). AI money is not real and never touches your wallet.
- Timers — CLASSIC: bet 12 s, decide 15 s · SPEED: bet 7 s, decide 8 s · ROYAL: bet 12 s, decide 20 s. A player who does not act stands.
- If a player disconnects mid-hand the hand stands and settles normally; the
wincall is still made. - Updates: before an Aniplus server update, tables stop taking bets for new rounds for up to 3 minutes (players see UPDATING) while rounds already in play finish. Players reconnect by themselves after the update. A round that is cut short anyway is void: each of its bets gets a
rollbackand nowinfollows. - Landscape and portrait (the table turns 90°). Connection: WebSocket, with an automatic HTTP fallback.
Three Card Poker
Same launch, signing, wallet and limits as blackjack. One deck is shuffled for every round. No bet behind — one owner per seat, up to 3 seats per player.
| Bet | How it pays |
|---|---|
| Ante (required) | After seeing three cards the player plays (bets the same again) or folds (loses the ante). Dealer needs queen high: if not, ante pays 1:1 and play is returned; otherwise the better hand wins and ante and play both pay 1:1; ties push. |
| Ante bonus | On played hands, whatever the dealer has: straight 1:1 · three of a kind 4:1 · straight flush 5:1. |
| Pair Plus | Player's three cards only, settled even on a fold: pair 1 · flush 4 · straight 6 · three of a kind 30 · straight flush 40 (to 1). |
| 6 Card Bonus | Best five of the player's and dealer's six cards, settled even on a fold: three of a kind 7 · straight 10 · flush 15 · full house 20 · four of a kind 100 · straight flush 200 · royal flush 1000 (to 1). |
- Hand order: straight flush › three of a kind › straight › flush › pair › high card. A-2-3 is the lowest straight, Q-K-A the highest. Suits never break ties.
- Wallet
betcalls:kind: "bet"when betting closes (ante, Pair Plus and 6 Card Bonus together;detaillists{ seat, type: "ante" | "pair" | "six", amount }), thenkind: "play"for each hand the player plays. Ifplayis refused, that hand folds. windetail per seat:{ seat, played, hand, bet, lines: { ante, play, bonus, pair, six } }, each line{ stake, mult, back, why }(mult−1 lost · 0 push · n to 1).- Timers — CLASSIC: bet 12 s, decide 15 s · SPEED: bet 7 s, decide 8 s · ROYAL: bet 12 s, decide 20 s. Everyone decides at the same time; a player who does not decide folds.
- Each player sees only their own cards until the dealer turns over; folded hands stay hidden from other players.
Hold'em Odds
Same launch, signing, wallet and limits as blackjack. Six Texas Hold'em hands of two cards are dealt face up from a fresh deck and players bet on the hand that will win. There are no seats and no AI players; any number of players bet on the same six hands, and nobody sees anyone else's bets.
| Step | What happens |
|---|---|
| Deal | Six hands, one card at a time, face up. |
| Pre-flop · flop · turn | A betting window opens after the deal, after the flop and after the turn — 15 s, 10 s and 8 s. Each hand shows its price; a player may bet on any number of hands in any window. |
| River & showdown | No hand folds. The best five of each hand's two cards and the five board cards wins; a round takes about 60 seconds. |
- One table: Hold'em Odds has no channels — every player in the same currency shares one table, however many there are. The
channelsent at launch is ignored for this game. - Price fixed at the bet: a bet keeps the price shown when it was placed, even if the price moves later in the same round.
- A hand priced under 1.05 is closed for betting and shows its chance of winning (e.g.
97.2% CLOSED); it can still win. A hand that can no longer win isOUT. Prices go up to 100. - Dead heat: if k hands tie, a bet on one of them pays stake ÷ k × price.
- Bets that could take the player past your max win for the round are refused at the table before they are sent to your wallet.
- Wallet
betcalls:kind: "bet"once each time a betting window closes (up to three per round, numbered-1,-2,-3at the end of the txId in the order they are sent);detaillists{ street: "pre" | "flop" | "turn", hand: 1–6, amount, odds }. If a call is refused, those bets do not stand. win(once per player per round, also withamount: 0):detaillists every bet as{ street, hand, amount, odds, won, back }.- Hand order: straight flush › four of a kind › full house › flush › straight › three of a kind › two pair › pair › high card. A-2-3-4-5 is the lowest straight.
- Landscape and portrait (table on top, odds board below on phones). Connection: WebSocket, with an automatic HTTP fallback.
Error codes
| Code | Meaning |
|---|---|
BAD_SIGN · STALE | Signature wrong · request older than 5 minutes |
UNKNOWN_OPERATOR | Operator not found or disabled |
IP_NOT_ALLOWED | Caller IP is not on your allow-list |
BAD_LAUNCH | Game, currency or channel not enabled for you, or bad userId |
BAD_LIMITS · LIMITS_REQUIRED | Launch limits invalid (min above max, not a chip multiple, not a positive integer) · limits missing while your account requires them |
INSUFFICIENT (your reply) | Not enough balance — the bet is refused at the table |
OVER_MAX · BAD_STAKE (your reply) | Over / under this player's bet limit — the bet is refused at the table with a matching message. Prefer launch limits so the table refuses it before it reaches you |
NOT_FOUND | Round not found |
