Deposit

Using this method, an operator can deposit funds into a player's wallet in the Naga Games system.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
🚧

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 */

// `nativeTransactionId` must be changed each deposit time
const payload = {
  "nativeId": "safutest03",
  "brandCode": "srot",
  "groupCode": "dpae",
  "currencyCode": "THB",
  "amount": 10,
  "nativeTransactionId": "3b380261-d3d6-b086-9cbe-0f70fe730e59",
};

//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/deposit
HTTP Method : POST

Header Parameter:

  • X-Signature (String) - Required
    Must be generated from signing process with correct order of data fields & secretKey.

Body Parameters:

  • data (JSON)
    must contain all the below fields.
Parameter NameDescriptionData TypeStatus
nativeIdIdentifier of the player in Operator’s systemString (length: 255)Required
brandCodeAuto-generated code of the brand in Naga Games’s databaseString (length: 4)Required
groupCodeAuto-generated code of the group in Naga Games’s databaseString (length: 4)Required
currencyCodeCurrency code of the playerString (length: 4)Required
amountAmount of the transactionDecimal (20,4)Required
nativeTransactionIdThe unique identifier of the transaction on the operator systemString (length: 36)Required

Example

curl --request POST \
     --url https://api.stg.game.topplatform.online/operator/transfer/deposit \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'x-signature: 9f6f1e94f2a2da3f4f227eef750ea0aece03642ea700a34bd9e8e2e48e674e28' \
     --data '
{
  "nativeId": "safutest03",
  "brandCode": "srot",
  "groupCode": "dpae",
  "currencyCode": "THB",
  "amount": 10,
  "nativeTransactionId": "3b380261-d3d6-b086-9cbe-0f70fe730e58"
}
'

Response

Data Response:

Parameter NameDescriptionData type
transactionIdThe unique identifier of the transaction on the Naga Games system.String (length: 36)
nativeTransactionIdThe unique identifier of the transaction on the Operator system.String (length: 36)
updatedBalanceBalance of the player’s wallet after the transactionDecimal (20,2)

Example

Success Response Example (HTTP status code 200)

{
  "transactionId": "96903007-2c74-6953-8203-2419ec4a9f74",
  "updatedBalance": "10000",
  "nativeTransactionId": "167e696f-4e74-58e8-044f-145adaeb72e0"
}

Failure Response Example (HTTP status code 400)

{
  "message": "Invalid Signature",
  "code": 1211,
  "timestamp": "2022-05-12T07:03:56.066Z"
}
Body Params
string
required
Defaults to safutest03

Identifier of the player in Operator’s system

string
required
Defaults to srot

Auto-generated code of the brand in Naga’s database

string
required
Defaults to dpae

Auto-generated code of the group in Naga’s database

string
required
Defaults to THB

Code of the transaction’s currency

int64
required
Defaults to 10

Amount of the transaction

string
required
Defaults to 3b380261-d3d6-b086-9cbe-0f70fe730e58

The unique identifier of the transaction on the Operator system.

Headers
string
required
Defaults to 9f6f1e94f2a2da3f4f227eef750ea0aece03642ea700a34bd9e8e2e48e674e28
Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json