With this API, Naga Games will call the Operator to retrieve the player's balance.

Request

API URL : {OperatorAPIDomain}/{OperatorEndpoint}
HTTP Method : POST

Body Parameters

  • data (JSON)
    _must contain all fields below.
NameDescriptionData TypeStatus
playerTokenThe Player's Token from the OperatorString (length: 36)Required
  • 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.
  • x-signature (String)
    must be generated from the signing process with the correct order of data fields and private key.

🚧

About Signing & Verifying dataHash & Signature

Please check at How to signing & verify dataHash and signature for Seamless mode?

Response

📘

Response Structure

Refer ➡️ Success Response Structure and Failure Response Structure for HTTP Response structure and codes.

Data Response

NameDescriptionData Type
nativeIdIdentifier of the player in the operator systemString (length: 255)
currencyCurrency of the playerString
balanceBalance of the playerDecimal (20,2)
curl --location 'https://api-demo-operator.stg.game.topplatform.asia/vendor/balance' \
--header 'X-Signature: aWDCTdkcWoX0BqL/fn866/FB8/KMCBlsB4gQ52K52A1BCOrp+1Ji97ryz0ulerVA3S8CQoR9BuN1SI8+3kr1LA92cej5q5w0XCxN+kbEuL6YOMym+FWa7LnNvWSe6q+oHMfkkLydw9Ssk4YyCJAzQiU976mvVeSyXkJJjh8lAh4=' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
  "data": {
    "playerToken": "efb2604ad7b46a9153ee0b52bb535ab3"
  },
  "dataHash": "538f505f997ef1bb8ba8b6ea7507a30b9509e69faab0f638aa4ccebfc250558b"
}
'

Example of Response

Success Response Example (HTTP status code 200)

{
    "data": {
        "nativeId": "user_SEAMLESS",
        "currency": "USD",
        "balance": 9936
    }
}

Fail Response Example (HTTP status code 400)

{
    "data": null,
    "error": {
        "statusCode": 404,
        "message": "User Not Found"
    }
}
Language
Click Try It! to start a request and see the response here!