With this API, Naga Games will send the playerToken, gameCode, betId, bet amount (amount), betType, currency, and transactionId to the Operator for a 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
groupCodeAuto-generated code of the group in the Naga Games systemString (length: 4)Required
playerTokenUnique token of the playerString (length: 255)Required
transactionIdUnique ID of the bet transactionString (length: 36)Required
amountAmount of the bet

Note: For free spins, a bet request with a zero bet amount will be sent.
Decimal (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 the Naga Games 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 & private Key.

🚧

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
GAMBLE_LASTLast Bet from gamble feature
WIN_FREESPIN_LASTLast bet from free game
BUY_FREESPIN_LASTLast bet from Buy feature

Example

curl --location 'https://api-demo-operator.stg.game.topplatform.asia/vendor/placebet' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-signature: XRm4olA+PIQIhCKqoscsMGX7In4bFQ3tprVCZxe1/I4RqjvFCGHftdPww0djh8LOwG/H3/0BQC3eX58aV7rOroDZP6Q9BaL5ydIi20s1DVD/QMd3xJhFVfJWraWOBNlH7K2jiozTEUAnjbshz5pIWdDGdPSbCpj18ed+YkkgSvE=' \
--data '{
  "data": {
    "betId": "3a93be66-ec1c-dac5-a765-858f7dc86c12",
    "currency": "THB",
    "gameCode": "fulong",
    "playerToken": "49aea340db7fc8851d8facaa7a84d62a",
    "groupCode": "dpae",
    "transactionId": "3a93be66-ec1c-dac5-a765-858f7dc86c12-101-1682652126658",
    "amount": 10,
    "parentBetId": null,
    "brandCode": "dtdr",
    "isLastFreeSpins": null
  },
  "dataHash": "0ad7b2a651f3f025246ff07fe6a4d04478e1946f7ef0ff711a8d84791561af01"
}'

Response

📘

Response Structure

For Response code please refer here Success Response Structure and Failure Response Structure

Data Response

NameDescriptionData type
currencyCurrency of the playerString
balanceBalance of the playerDecimal (20,2)

Example

Success Response Example (HTTP status code 200)

{
    "data": {
        "balance": 99999990,
        "currency": "THB"
    }
}

Failure 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!