This API is called when the Place Bet API is successful. Naga Games will send the playerToken, gameCode, betId, winnings (amount), currency, and transactionId to the Operator to update the player's balance and finish the round.
Request
API URL : {OperatorAPIDomain}/{OperatorEndpoint}
HTTP Method : POST
Body Parameters
- data (JSON)
Must contain all fields below.
Name | Description | Data type | Status |
---|---|---|---|
betId | Unique ID of the bet | String (length: 36) | Required |
currency | Currency of the player | String | Required |
gameCode | Code of the game | String (length: 255) | Required |
playerToken | Unique token of the player | String (length: 255) | Required |
groupCode | Auto-generated code of the group in Naga Games’s database | String (length: 4) | Required |
transactionId | Unique ID of the payout transaction | String (length: 36) | Required |
amount | Amount of the win | Decimal (20,2) | Required |
parentBetId | Unique ID of the parent bet If the bet type is NORMAL and did not generate any free spins during the spin, it will result in ParentBetId = NULL. When a player wins the free spins. parentBetId will be equal to the betId. When a bet includes free spins, the ParentBetId will not be NULL and will not be equal to the betId. | String (length: 36) | Optional |
brandCode | Auto-generated code of the brand in Naga Games’s database | String (length: 4) | Required |
betType | Type of the Bet | String | Optional |
isLastFreeSpins | This indicates to the operator that this bet is the last free spin in the entire free spin round. | Boolean | Optional |
- dataHash (String)
All request data coming from Naga Games would be hashed using SHA-256 as a data checksum and signed with the Private Key, which was generated for each operator using the RSA signing algorithm.
Header Parameters
- x-signature (String)
Must be generated from signing process with correct order of data fields & privateKey.
About Signing & Verifying dataHash & Signature
Please check at How to signing & verify dataHash and signature for Seamless mode?
About Data & Signagure in Request Operator will receive
An operator must process the data in the same order ( data order and the number of data fields passed ) as specified by Naga Games to get the result from the API. Please make sure that the signature generated is valid before requesting, as different data will generate different signature and will result in error ( happens if any order or any data is missing or invalid during the signature generation process ).
Refer ➡️ Data Order before Stringify & Hashing.
Bet Type
Type | Description |
---|---|
NORMAL | Bet from base game |
PREPAID | Bet from marketing tool |
WIN_FREESPIN | Bet from free game |
BUY_FREESPIN | Bet from buy feature |
GAMBLE | Bet from gamble feature |
JACKPOT | Bet from jackpot feature |
Response
Response Structure
Let check Success Response Structure and Failure Response Structure
Data Response
Name | Description | Data type | Status |
---|---|---|---|
currency | Currency of the player | String | Required |
balance | Balance of the player | Decimal (20,2) | Required |
Example of Response
Success Response Example (HTTP status code 200)
{
"data": {
"balance": 99999992,
"currency": "THB"
}
}
Fail Response Example (HTTP status code 400)
{
"data": null,
"error": {
"statusCode": 400,
"message": "Cannot verify data!"
}
}