Bet Notification API Format
1. Bet Notification API Format
API Path
- POST
- /aigame/v1/wallet/bet
Request Parameters
Parameter | Name | Type | Required | Description |
---|---|---|---|---|
agent_id | Merchant ID | string | Required | Merchant ID |
user_id | Merchant User ID | string | Required | Merchant User ID |
game_id | Game ID | string | Required | Game ID, 101: Baccarat |
bet_txn_id | Bet Transaction ID | string | Required | Bet Transaction ID |
bet_amount | Bet Amount | string | Required | Bet Amount |
bet_time | Bet Time | int | Required | Bet Time (in milliseconds) |
currency | Currency | string | Required | Currency |
timestamp | Current Timestamp | int | Required | The timestamp when calling the API (in milliseconds, valid for ten minutes) |
sign | Signature | string | Required | See API documentation for signature algorithm |
Response Parameters
Parameter | Name | Type | Description |
---|---|---|---|
code | Response Code | int | Error Code |
message | Response Message | string | Error Message |
data | Response Data | dict | Response Data Details |
--balance | Player Balance | string | Player Balance |
--currency | Currency | string | Currency |
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