Skip to content
7unicorn7UNICORN GAMING
Blog

Live casino API integration guide: video, rounds, settlement

A live casino table is three things delivered together: a video stream of a dealer, a data feed describing each round, and a result feed you settle against. This guide walks through integrating all three in the order that gets a table live fastest, using Teen Patti, Andar Bahar and 7 Up Down as the examples, and lists the mistakes that cost operators money.

What you receive on sign-up

For each table you rent you get an API key, a sandbox table that runs the same rounds as production, an embed snippet for the video player and the JSON schema for the round and result feeds. Indian tables such as Teen Patti, Andar Bahar, Dragon Tiger and 7 Up Down are rented per table per month; the price shown on each table page, ₹15,000 per month, covers video, live data and results. International and AWC tables are supplied on a percentage basis with more than two hundred providers.

Step 1: embed the video

The video is a low-latency stream with a player you drop into your page or mobile app. Start here because it is the easiest part to see working and because everything else must stay in sync with it. Put the player in the layout you intend to ship, on the phone sizes your players use, and check it survives a network change. Do not try to build your own player on top of the raw stream; the supplied one handles reconnects and delay.

Step 2: read the round feed

Every table publishes a round object that moves through a small set of states: betting open, betting closed, dealing, result. The object carries a round id, the state, a countdown timer in seconds, the cards dealt so far and the odds for each bet spot. Your backend polls or subscribes to this feed and mirrors the state to the front end.

  • Round id: unique per round per table, used as the key for bets and settlement
  • Timer: seconds left in the betting window; bets after zero must be rejected server-side
  • Cards: dealt in order, so the UI can animate the deal alongside the video
  • Odds: per bet spot, including side bets, as they apply to this round

The most common integration mistake is accepting a bet based on the timer the browser saw. Latency between the feed, your server and the phone means a player can submit a bet a second after the window closed. Check the round state on the server at the moment the bet arrives, and reject anything for a round that is not in betting open.

Step 3: accept bets against your own wallet

Bets never go to the table; they go to your wallet. Store each bet with the round id, the bet spot, the stake and the odds shown at the time. The odds field matters because side-bet odds can differ round to round and the player is entitled to the price they were shown. Cap stakes per spot and per round according to your own risk rules; the API does not do that for you.

Step 4: settle from the result feed

When a round completes, the result object gives the winning spot or side, the final cards and, for card games, the hand rank. For Teen Patti that is trail, pure sequence, sequence, colour, pair or high card for both hands; for Andar Bahar it is the joker, the side it landed on and the number of cards dealt, which is what the side bets settle on. Your settlement worker reads the result once per round id, pays every winning bet at its stored odds and marks the round settled. Make the worker idempotent so a retry cannot pay twice.

Step 5: go live, then watch the numbers

Run the sandbox table through a full evening before switching to production. Then watch three numbers for the first week: the gap between the timer reaching zero and your last accepted bet, which should be negative; the number of rounds where settlement ran more than once; and the share of rounds where the video and the round state visibly disagreed on the player's screen. All three should be zero.

Choosing which tables to start with

Andar Bahar and T-20 Teen Patti are the usual first two tables on an Indian site because rounds are short, about forty seconds for Andar Bahar and twenty seconds per hand for T-20, so they generate settled bets quickly. Live Teen Patti (1 Day) suits higher-stake players who want a longer betting window. Rent is per table, and it gets cheaper beyond ten tables, so add tables as player demand shows up rather than all at once.

Key takeaways

  • A live casino API is video plus a round feed plus a result feed; integrate them in that order
  • Validate every bet against the round state on the server, never against the browser's timer
  • Settle from the result feed with an idempotent worker keyed on round id
  • Indian tables are ₹15,000 per table per month covering video, data and results; start with Andar Bahar and T-20 Teen Patti
See pricingWhatsApp