Skip to main content
The betwin callback is sent when a player’s bet and its outcome complete in a single atomic operation. Your implementation must deduct betAmount from the player’s balance and add winAmount in one transaction — both operations succeed or neither does. This endpoint is used in game types where the bet and outcome are determined simultaneously, avoiding the need for a separate withdraw followed by a deposit.
  • URL: Your configured Callback URL
  • Method: POST
  • Headers: X-Request-Signature, Content-Type, Accept

Request parameters

command
string
required
Always "betwin" for this callback type.
transactionId
long
required
Unique reference of the transaction created in iGamingAce. Use this to enforce idempotency.
playerId
string
required
Unique identifier of the player from your system.
roundId
long
required
Unique reference of the game round.
providerId
number
required
Unique identifier of the game provider in iGamingAce.
gameCode
int
required
Unique game id of the game in iGamingAce.
betAmount
number
required
Player currency code per ISO-4217 (e.g., EUR, USD).
winAmount
number
required
Bet amount to deduct from the player’s balance.
bonusId
long
required
0: no bonus, else the bonus id related
timestamp
number
required
Unix timestamp of the request.

Response fields

Your server must respond with HTTP 200 and a JSON body containing the following fields:
balance
number
required
The player’s updated balance after the bet is deducted.
statusCode
string
required
Result of the operation. Must be "OK" on success. See the status codes table below for all possible values.

Status codes

Status codeDescription
OKRequest successful
ERR_NOT_AUTHENTICATEDThe player is not authenticated
ERR_NOT_ENOUGH_MONEYThe player’s account has insufficient funds
ERR_INTEGRITY_CHECK_FAILEDMessage integrity check failed
ERR_UNKNOWNInternal server error
Your response must be returned within 3 seconds. If the request times out or returns an error, iGamingAce will not retry — a cancel callback will be sent instead to revert the game round. An unsuccessful bet also cancels the current round, preventing the player from proceeding further.

Examples

{
  "command": "bet",
  "transactionId": "SP215202",
  "playerId": "player_88888",
  "roundId": "65215842315484512",
  "providerId": 1,
  "gameCode": 655,
  "betAmount": 10,
  "winAmount": 0,
  "bonusId": 0,
  "timestamp": 1586335186372
}