Wallet API v.2 Desc en
Wallet API v.2 Desc en
Wallet API v.2 Desc en
The exchange protocol between the game server and the server of credits.
Server of credits:
Integration side required to provide the URL of a server of credits for "Wallet URL" for activation
of communication with the game server.
1. Mandatory fields such as "Wallet token" provided by the control panel. It is possible to
change them by contacting the support team.
2. External identifier (WALLET_TOKEN) serves for searching of an agent, e.g.
«hmeu134_56eEYeGgre» and up to 40 symbols. Only letters, digits and the “_” symbol allowed.
Demo mode
https://domain.example.com?mode=demo&gameID=YOUR_GAME_ID&lang=en
Real mode
https://domain.example.com?mode=real_play&gameID=YOUR_GAME_ID&token=PLAYER_TOKE
N&lang=LANG&wallet=WALLET_TOKEN
2
WALLET API DESCRIPTION
where:
YOUR_GAME_ID — game ID, e.g. - 1014.
PLAYER_TOKEN — ID of a player.
LANG — language of game client, e.g. "en" (set up by 2 letters ISO 639-1 standard).
WALLET_TOKEN — a unique ID of an agent (wallet).
The http POST method is used for all requests to the server.
1.01 A list of operations and their parameters with the samples of successful
responses:
request:
{"code":"hmeu134_56eEYeGgre","type":"credit","time":"21-09-2023 03:23:23"}
where:
● code — a unique ID of a player's game session.
● type — a type of request.
● time — a date and a time of response.
response:
{"credit":100000,"player_id"="usr-1122334455","result":1,"time":"21-09-2023
03:23:23","currency":"USD"}
where:
● credit — an integer number with an amount of credit in cents (kopecks).
● result — in case of positive result =1, in case of error any other number (e.g. if a code does
not exist).
● currency — name of a currency
● player_id — unique player identifier (up to 40 characters)
request:
{"bet":500,"code":"hmeu134_56eEYeGgre","game":1012,"id":3,"type":"bet","time":"21-09-2023
03:23:23"}
3
WALLET API DESCRIPTION
where:
● bet — an integer number with an amount of bet in cents (kopecks).
● code — a unique ID of a player's game session.
● game — a code of the game system.
● id — ID of transaction, a 64 bit unsigned integer.
● type — a type of request.
response:
{"credit":99500,"result":1,"time":"21-09-2023 03:23:23"}
where:
● credit — an integer number with amount of credit in cents (kopecks), after deducting the
bet.
● result — in case of positive result =1, in case of error any other number (e.g. if a bet exceeds
current credit).
Note!
The “id” parameter is unique within one currency, only one player for the same currency can
have a transaction, for example - 123. But if there are several currencies, then the player can
have the same transaction for UAH=123 and for USD=123.
{"code":"hmeu134_56eEYeGgre","game":1012,"id":4,"type":"win","win":1000,"time":"21-09-202
3 03:23:23"}
where:
● code — a unique ID of a player's game session.
● game — a code of the game in the game system.
● id — ID of transaction, a 64 bit unsigned integer.
● type — a type of request.
● win — an integer number with amount of winning in cents (kopecks)
response:
{"credit":100500,"result":1,"time":"21-09-2023 03:23:23"}
where:
● credit — an integer number with amount of credit in cents (kopecks), after adding a winning.
● result — in case of positive result =1, in case of error any other number (a winning has to be
taken because operation of such an account will not be possible).
Request to cancel a bet (type="cancel")
4
WALLET API DESCRIPTION
Request is sent if a game system was unable to place a confirmed bet.
Request:
{"code":"hmeu134_56eEYeGgre","id":5,"type":"cancel","time":"21-09-2023 03:23:23"}
where:
● code — a unique ID of a player's game session.
● id — ID of transaction that should be canceled, a 64 bit unsigned integer.
● type — type of request.
response:
{"credit":100000,"result":1,"time":"21-09-2023 03:23:23"}
where:
● credit — an integer number with amount of credit in cents (kopecks) after cancellation of a bet.
● result — if such transaction canceled or does not exist =1, any other number in case of error.
{"bet":100,"code":"hmeu134_56eEYeGgre","game":1053,"id":85,"round_id":85,"type":"bet","time":"
21-09-2023 07:27:44"}
where:
● bet — an integer number with an amount of bet in cents (kopecks).
● code — a unique ID of a player's game session.
● game — a code of the game in the game system.
● id — ID of transaction that should be canceled, a 64 bit unsigned integer.
● round_id – transaction number of the first bet.
● type — type of request.
5
WALLET API DESCRIPTION
Request after winning in the game:
{"code":"hmeu134_56eEYeGgre","game":1053,"id":86,"round_id":85,"type":"win","win":50,"time":
"21-09-2023 07:27:45"}
{"code":"hmeu134_56eEYeGgre","game":1053,"id":86,"round_id":85,"type":"win","win":0,"time":"
21-09-2023 07:27:45"}
{"code":"hmeu134_56eEYeGgre","id":5,"type":"cancel","round_id":85,"time":"21-09-2023 07:27:45"}
If the "result":1, the request is processed and the following steps are taken according to the
documentation.
where:
● credit — an integer number with amount of credit in cents (kopecks) after bet or win request.
● result — in case of positive result =1.
● currency — name of a currency.
If the "result": a number other than “1”, the request is not processed and is counted as an error
request. And we record what we got in "err_code" and "err_desc" in the log.
where:
● result — in case of error, any other number that is not equal to 1.
● err_code — error code that occurred.
● err_desc — error text that is displayed on the client.
6
WALLET API DESCRIPTION
2.01 Game calling order
7
WALLET API DESCRIPTION
Call order at the end of a winning game:
8
WALLET API DESCRIPTION