Skip to main content

Bet Notification API Format

1. Bet Notification API Format

API Path

  • POST
  • /aigame/v1/wallet/bet

Request Parameters

ParameterNameTypeRequiredDescription
agent_idMerchant IDstringRequiredMerchant ID
user_idMerchant User IDstringRequiredMerchant User ID
game_idGame IDstringRequiredGame ID, 101: Baccarat
bet_txn_idBet Transaction IDstringRequiredBet Transaction ID
bet_amountBet AmountstringRequiredBet Amount
bet_timeBet TimeintRequiredBet Time (in milliseconds)
currencyCurrencystringRequiredCurrency
timestampCurrent TimestampintRequiredThe timestamp when calling the API (in milliseconds, valid for ten minutes)
signSignaturestringRequiredSee API documentation for signature algorithm

Response Parameters

ParameterNameTypeDescription
codeResponse CodeintError Code
messageResponse MessagestringError Message
dataResponse DatadictResponse Data Details
--balancePlayer BalancestringPlayer Balance
--currencyCurrencystringCurrency

Request Example

curl --location 'https://merchant-address/aigame/v1/wallet/bet' \
--header 'Content-Type: application/json' \
--data '{
"agent_id": "agent001",
"user_id": "testUid03",
"game_id": "101",
"bet_txn_id": "67453d0c23c36d2571d40817",
"bet_amount": "100",
"bet_time": 1732589121000,
"currency": "VND2",
"timestamp": 1732589849000,
"sign": "d051f64a766f56822bdb12adb4193fbb"
}'

Response Example

{
"code": 200,
"message": "success",
"data": {
"balance": "1282.66",
"currency": "VND2"
}
}

Error Codes

200 Success
800100: Service exception
408000: Parameter error
600100: Signature error
800101: Member does not exist
800102: Currency does not exist
800105: Insufficient member balance
800106: Betting failed