Skip to main content

Cancel Bet Notification Interface Format

1. Cancel Bet Notification Interface Format

Interface Path

  • POST
  • /aigame/v1/wallet/refund

Request Parameters

ParameterNameTypeRequiredDescription
agent_idMerchant IDstringRequiredMerchant ID
user_idMerchant User IDstringRequiredMerchant User ID
game_idGame IDstringRequiredGame ID, 101: Baccarat
bet_txn_idBet Order IDstringRequiredBet Order ID
bet_amountBet AmountstringRequiredBet Amount
win_amountPayout AmountstringRequiredPayout Amount
statusOrder StatusintRequired0- Bet Placed, 1- Settled
bet_timeBet TimeintRequiredBet Time (in milliseconds)
refund_timeCancel Bet TimeintRequiredCancel Bet Time (in milliseconds)
currencyCurrencystringRequiredCurrency
timestampCurrent TimestampintRequiredTimestamp when calling the interface (in milliseconds, valid for ten minutes)
signSignaturestringRequiredSignature algorithm details in the interface description

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/refund' \
--header 'Content-Type: application/json' \
--data '{
"agent_id": "agent001",
"user_id": "testUid03",
"game_id": "101",
"bet_txn_id": "67453d0c23c36d2571d40817",
"bet_amount": "100",
"win_amount": "195",
"status": 1,
"bet_time": 1732589121000,
"refund_time": 1732589849000,
"currency": "VND2",
"timestamp": 1732589849000,
"sign": "c57d23cfae027bf326720308201b733b"
}'

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
800107: Order ID does not exist
800108: Canceling bet failed