Integration guide · v1 Partner login

Integration guide

Everything your backend and app teams need to add Rixos Games to a voice chat or live-streaming app. Coins stay in your system: we call your wallet for every bet and win.

Base URL https://api.rixosbe.store/b2bAuth: HMAC-SHA256Format: JSON over HTTPS

Overview

There are two directions of traffic:

When you are onboarded you receive a tenant code (e.g. yourapp), a secret key and access to the partner console. The secret is shown once; keep it on your server only — never in the app.

How it works

1 · LaunchYour server calls POST /v1/launch with the player and game.
2 · OpenYour app opens the returned URL in a half-screen WebView inside the room.
3 · PlayOn every spin or round we call your bet, then win if the player wins.
4 · SettleBalances live only in your wallet. Monthly GGR is reported in the console.

Onboarding

  1. We create your tenant in sandbox and send your tenant code, secret key and console password.
  2. You implement the four wallet endpoints and set your wallet URL (and optional webhook URL, allowed IPs) in the partner console.
  3. You test end-to-end against sandbox. The console has a test tool that calls your balance and opens a launch link.
  4. We review the flow together; then we switch your tenant to live.

Signing requests

Every request in both directions carries three headers:

HeaderValue
X-TenantYour tenant code.
X-TsUnix time in seconds. Requests older or newer than 300 seconds are rejected.
X-SignatureLowercase hex of HMAC_SHA256(secret, X-Ts + "." + rawBody). For GET, rawBody is an empty string.
Sign the exact bytes you send. Serialize the JSON once, sign that string, and send the same string as the body.
// Node.js — calling Rixos
const crypto = require("crypto");
async function rixos(method, path, bodyObj) {
  const body = bodyObj ? JSON.stringify(bodyObj) : "";
  const ts = Math.floor(Date.now() / 1000).toString();
  const sig = crypto.createHmac("sha256", process.env.RIXOS_SECRET).update(ts + "." + body).digest("hex");
  const r = await fetch("https://api.rixosbe.store/b2b" + path, {
    method, body: body || undefined,
    headers: { "Content-Type": "application/json", "X-Tenant": process.env.RIXOS_TENANT, "X-Ts": ts, "X-Signature": sig },
  });
  return r.json();
}

Verifying our calls

Verify the signature on every wallet call before touching a balance. Use a constant-time comparison and check the timestamp window.

// Node.js / Express — keep the raw body for verification
app.use(express.json({ verify: (req, _res, buf) => { req.rawBody = buf.toString("utf8"); } }));

function fromRixos(req) {
  const ts = req.get("X-Ts"), got = req.get("X-Signature") || "";
  if (req.get("X-Tenant") !== process.env.RIXOS_TENANT) return false;
  if (Math.abs(Date.now() / 1000 - Number(ts)) > 300) return false;
  const want = crypto.createHmac("sha256", process.env.RIXOS_SECRET).update(ts + "." + req.rawBody).digest("hex");
  return want.length === got.length && crypto.timingSafeEqual(Buffer.from(want), Buffer.from(got));
}
// PHP
$raw = file_get_contents('php://input');
$ts  = $_SERVER['HTTP_X_TS'] ?? '';
$sig = hash_hmac('sha256', $ts . '.' . $raw, getenv('RIXOS_SECRET'));
$ok  = abs(time() - (int)$ts) <= 300 && hash_equals($sig, $_SERVER['HTTP_X_SIGNATURE'] ?? '');
if (!$ok) { http_response_code(401); exit; }

List games

GET /v1/games — returns the games currently enabled for your tenant.

{
  "status": true,
  "list": [
    { "key": "greedycat", "name": "Greedy Cat", "category": "wheel",
      "icon": "https://rixosbe.store/img/oyun/greedycat.jpg",
      "langs": ["tr-TR", "en-US", "ar-EG"] }
  ]
}

Categories: slot, wheel, table, crash, fish. Use icon in your in-room game menu.

Launch a game

POST /v1/launch — call from your server when a player taps a game.

FieldTypeNotes
playerIdstringrequiredYour user ID. 1–64 chars: A–Z a–z 0–9 _ . -
gameKeystringrequiredA key from /v1/games.
roomIdstringrecommendedThe voice room / live stream ID. Players in the same room share wheel and crash rounds.
nicknamestringoptionalShown in game (max 40).
avatarstringoptionalHTTPS image URL.
langstringoptionalen, ar or tr. Default en.
countrystringoptionalISO-3166 alpha-2. Used if you restrict a game by country.
// Response
{ "status": true, "url": "https://api.rixosbe.store/games/greedycat/index.html?op=…&token=…", "halfUrl": "…", "expiresAt": 1764266400 }
The URL contains a player token valid for 2 hours. Request a new one each time the player opens a game; do not cache or share it.

Wallet endpoints (you implement)

We send POST {walletUrl}/{action} with a signed JSON body. Reply within 5 seconds with HTTP 200 and the player's new balance.

ActionWhenYour effect
balanceGame opens / refreshesNone — return the balance.
betPlayer places a stakeDebit amount. If not enough coins, reply 402.
winRound wonCredit amount.
refundA bet could not be confirmedCredit back the bet in refTxId — only if you debited it.

balance

// Request body
{ "playerId": "u_10293", "ts": 1764259200 }
// Reply 200
{ "balance": 20000 }

bet

{ "playerId": "u_10293", "txId": "yourapp-8f2c1a9e", "roundId": "gc_77341",
  "amount": 500, "gameKey": "greedycat", "roomId": "r_5521", "ts": 1764259200 }
// Reply 200                       // Reply 402
{ "balance": 19500 }               { "error": "insufficient_balance" }

win

{ "playerId": "u_10293", "txId": "yourapp-1b77d0c2", "roundId": "gc_77341",
  "amount": 1250, "gameKey": "greedycat", "roomId": "r_5521", "ts": 1764259204 }
// Reply 200
{ "balance": 20750 }

A win is never rejected for balance reasons. If your server is down we retry the same txId until you confirm.

refund

{ "playerId": "u_10293", "txId": "yourapp-8f2c1a9e-r", "refTxId": "yourapp-8f2c1a9e",
  "amount": 500, "gameKey": "greedycat", "roundId": "gc_77341", "roomId": "r_5521", "ts": 1764259500 }

We send a refund when a bet timed out or failed with a 5xx, so we cannot know whether you debited it. If you did debit refTxId, credit it back. If you never saw that bet, do nothing — but still reply 200 with the balance. Refunds are retried after 1 min, 5 min, 30 min and 2 h, for up to 24 h.

Idempotency

Every txId must be applied at most once. Store it with a unique index. If the same txId arrives again, do not move coins again — return 200 with the current balance.
-- example
CREATE UNIQUE INDEX rixos_tx ON wallet_moves (tx_id);

Win webhook (optional)

If you set a webhook URL, we send POST {webhookUrl}/gameWin after a win, signed the same way. Use it to announce big wins in the room. We do not wait for or retry this call.

{ "playerId": "u_10293", "nickname": "Layla", "amount": 1250, "gameKey": "greedycat", "roomId": "r_5521", "ts": 1764259204 }

In-app WebView

Errors

Our API replies with { "status": false, "message": "…" } and these HTTP codes:

CodeMeaning
401Unknown tenant, timestamp outside 300 s, or bad signature.
403Calling IP is not in your allow-list, or the tenant is disabled.
404Game not enabled for you (or not allowed in country).
400Invalid field, e.g. playerId.

What we expect from your wallet:

You replyWe do
200 {balance}Move confirmed.
402 on betPlayer sees “not enough coins”. Nothing to refund.
other 4xx on betBet rejected. Nothing to refund.
timeout / 5xx on betRound cancelled for the player; a refund is queued.
timeout / 5xx on win or refundWe retry the same txId until you confirm.

Sandbox

In sandbox you can use real or test player IDs at no cost. Games, rounds and reports behave exactly like live. Use the console’s test tool to check your balance endpoint and open a launch link on your phone. Nothing in sandbox is billed.

Go-live checklist

Billing

GGR = total bets − total wins, counted in coins per calendar month and converted at your contracted rate. The fixed monthly fee is invoiced in advance; the GGR share is invoiced at month end from the statement in your console.