Update Player Coins

The Game Server Hit the App Server to increment or decrement Player Coins

Request URL:

  • Provided By You

  • Should Be protected by SSL (https)

  • Method: POST

Request Parameter

Param
Val
Required
Description

payload

Array of Objects

YES

A list of objects that contains a game result

round_number

Int

YES

The Round Number.

Single Payload Object:

Param
Val
Required
Description

token

String

YES

The User API Authoriaztion Token

game_id

String

YES

The Game ID You received from Game-ox.com

uid

String

YES

Player Unique ID

sign

String

YES

MD5 Hash. game_id + uid token

amount

Int

YES

amount of coins to increase or decrease

up

Int

YES

0 to decrement and 1 to increment

Response parameters

Param
Val
Required
Description

error_code

Int

YES

0 if no errors 1 if any error occurs

error_message

String

YES

null if no errors string message if any error occurs

Sample Request:

https://an-api-link-provided-by-you?payload=result

// result example: 

{
    "payload": [
        {
            "game_id": "xx",
            "token": "xxx", // player token
            "uid": "123455",
            "amount": 1,
            "up": 1, // increment player coins by 1
            "message": "BET_SUCCESS",
        },
        {
            "game_id": "xx",
            "token": "xxx", // player token
            "uid": "123455",
            "amount": 1,
            "up": 0, // decrement player coins by 1
            "message": "BET_SUCCESS",
        }
    ],
    "round_number": 100
}

Sample Response (success) :

{
    "error_code": 0,
    "error_message": null,
}

Sample Response (error):

{
    "error_code": 1,
    "error_message": "Cannot update coins due to .."
}

Cashback:

In situations where a player loses a significant number of coins, the game has a feature that suggests sending the player a percentage of their lost coins if the game itself is in a winning state. When this scenario occurs and the game updates the player's coins as described earlier, you will receive a message with the code inside the player payload "LOSING_CASHBACK". This message indicates that the player's coins have been successfully adjusted in case you need to send him a notification.

Please note that this feature may not be available in all games.

Last updated