Buffalo Game Seamless Integration – API Documentation

Our seamless integration differs slightly from normal seamless. Follow these rules for correct behavior.

Key Integration Rules

  1. Game Launch: First, request a game URL from our API, then open it for the player.
  2. Server → Server Logs: We send a log every spin/round. You must reply { "status": "ok" } immediately, or the round is terminated.
  3. Balance Lock: Lock the player’s balance while playing. On round end we send exitInfos so you can unlock those users.

Game Environment

PurposeMethodEndpoint
Game Launch URLPOST (JSON)https://api4.qianxu168.com/game/url
Game Report Detail by TransactionIDPOST (JSON)https://api4.qianxu168.com/inspect.php

Game Launch

Request a launchable game URL, then open it in your player’s browser/iframe.

Request Body

FieldTypeRequiredDescriptionExample
idstringYesYour player’s username/ID"bf10799901"
gamestringYesGame key/name"AfricanBuffalo"
domainstringYesYour tenant/brand identifier"buffalo688"
balancenumberYesStarting balance snapshot (integer)5007
{
  "id": "bf10799901",
  "game": "AfricanBuffalo",
  "domain": "buffalo688",
  "balance": 5007
}

Response Body

FieldTypeDescriptionExample
statusstring"ok" on success"ok"
playersarrayList of players with their balances[{"playerId":"bf123455","balance":1000.35}]
{
  "status": "ok",
  "players": [
    {
      "playerId": "bf123455",
      "balance": 1000.35
    }
  ]
}
Open the game URL for the player after a successful response. The players array can include multiple players if needed.

Game Report Detail (by TransactionID)

Fetch round details for a specific transactionId (useful for BO/CS).

Request Body

FieldTypeRequiredDescriptionExample
domainstringYesYour tenant/brand"buffalo688"
transactionIdstring | numberYesTransaction/Round identifier"1757263203983752334"
{
  "domain": "buffalo688",
  "transactionId": "1757263203983752334"
}

Response shape depends on provider detail format. Use it for round diagnostics/verification.

Round-End Webhook (Sent to Your Server)

On each round end we POST a log to your webhook. You must ACK with { "status": "ok" }.

Payload Schema

FieldTypeRequiredDescription
detailobjectNoReserved for extra metadata
domainstringYesYour tenant/brand
exitInfosarray<object>YesPlayers to unlock after the round (each item: { id: string })
gamestringYesGame name/code
matchNonumberYesProvider match number
reportIdnumberYesUnique report identifier
transactionsarray<object>YesBalance deltas and round entries (see below)

transactions[] Item

FieldTypeRequiredDescriptionExample
amountnumberYesDelta to apply to user balance (can be + or -)-80
balancenumberNoProvider-side running balance2075
betnumberNoBet amount for this action80
commissionnumberNoCommission, if any0
idstringYesPlayer identifier (usually username)"buffalo1183768"
playerTypestringNoReserved""
statusstringYeswin | lose | refund | cancel"lose"
transactionIdstring | numberYesUnique transaction / round ID — store it1760357702072700000

Sample Payload

{
  "detail": {},
  "domain": "buffalo688",
  "exitInfos": [
    {"id": "buffalo1183"},
    {"id": "buffalo11822"}
  ],
  "game": "AfricanBuffalo",
  "matchNo": 34424110,
  "reportId": 1760357702072694000,
  "transactions": [
    {
      "amount": -80,
      "balance": 2075,
      "bet": 80,
      "commission": 0,
      "id": "buffalo1183768",
      "playerType": "",
      "status": "lose",
      "transactionId": 1760357702072700000
    }
  ]
}

Processing Rules (Your Side)

  1. For each transactions[] item: new_balance = old_balance + amount.
  2. Persist transactionId as your round ID for BO checks.
  3. Unlock all users listed in exitInfos.
  4. ACK with:
    
    {
      "status": "ok",
      "players": [
        {
          "playerId": "bf123455",
          "balance": 1000.35
        }
      ]
    }
          
    If you don’t ACK, we terminate the round.

Balance Locking Behavior

RTP Configuration

You can configure Return to Player (RTP) per agent. Without per-agent RTP, a global RTP applies.