Using this method, the operator can find out the current balance of a player’s wallet in the Naga Games system.
Read Me First!
An operator must generate X-Signature based on their input data before sending the request.
Please Refer ➡️ How to generate signature for Transfer mode?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 ).
Please Refer ➡️ Data Order before Stringify & Hashing
/* JAVASCRIPT EXAMPLE */ // Example for request data const payload = { "nativeId": "safutest03", "brandCode": "srot", "groupCode": "dpae", }; //To ensure accurate results when using this API. //The operator must create an instance of the generateSignatureExample() function. //Prior to employing the API, it is necessary to generate the signature using the newly implemented function since it provides a guaranteed output and response. const signature = generateSignatureExample(payload);
Request
API URL : {NagaGamesAPIDomain}/operator/transfer/wallet-balance
HTTP Method : GET
Header Parameter:
- X-Signature (String) - Required
Must be generated from signing process with correct order of data fields & secretKey.
URL Parameters:
Name | Description | Data type | Status |
---|---|---|---|
nativeId | Unique Identifier of the player in Operator’s system | String (length: 255) | Required |
groupCode | Auto-generated code of the group in Naga Games’s database | String (length: 4) | Required |
brandCode | Auto-generated code of the brand in Naga Games’s database | String (length: 4) | Required |
Example
curl --request GET \
--url 'https://api.stg.game.topplatform.asia/operator/transfer/wallet-balance?nativeId=safutest03&brandCode=srot&groupCode=dpae' \
--header 'accept: application/json' \
--header 'x-signature: 21298857c50f0839ffda12222391d64018ea01dcc5277da26cc7fa5b40bb598a'
Response
Data Response:
Name | Description | Data type | Status |
---|---|---|---|
currency | Currency of the player in unique three letter code | String | Required |
balance | Current balance of the player’s wallet in Naga Games system | Decimal (20,2) | Required |
Example of Response
Success Response Example (HTTP status code 200)
{
"balance": "10000",
"currency": "TBH"
}
Failure Response Example (HTTP status code 400)
{
"message": "Forbidden Request",
"code": 1210,
"timestamp": "2022-05-12T07:08:22.756Z"
}