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.
NameDescriptionData typeStatus
betIdUnique ID of the betString (length: 36)Required
currencyCurrency of the playerStringRequired
gameCodeCode of the gameString (length: 255)Required
playerTokenUnique token of the playerString (length: 255)Required
groupCodeAuto-generated code of the group in Naga Games’s databaseString (length: 4)Required
transactionIdUnique ID of the payout transactionString (length: 36)Required
amountAmount of the winDecimal (20,2)Required
parentBetIdUnique 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
brandCodeAuto-generated code of the brand in Naga Games’s databaseString (length: 4)Required
betTypeType of the BetStringOptional
isLastFreeSpinsThis indicates to the operator that this bet is the last free spin in the entire free spin round.BooleanOptional
  • 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

TypeDescription
NORMALBet from base game
PREPAIDBet from marketing tool
WIN_FREESPINBet from free game
BUY_FREESPINBet from buy feature
GAMBLEBet from gamble feature
JACKPOTBet from jackpot feature

Response

📘

Response Structure

Let check Success Response Structure and Failure Response Structure

Data Response

NameDescriptionData typeStatus
currencyCurrency of the playerStringRequired
balanceBalance of the playerDecimal (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!"
    }
}

Language
Click Try It! to start a request and see the response here!