Returns player balance after debit transaction.
Request common parameters
Query string name | type (max) | description | mandatory |
---|---|---|---|
callerId | String | Caller authentication username | Y |
callerPassword | String | Caller authentication password | Y |
callerPrefix | String | 2 or more letter prefix that is used internally to prefix player username for your account | N |
username | String | Player username (non-prefixed) created by your createPlayer call | Y |
Debit players balance
Query string name | type (max) | description | mandatory |
---|---|---|---|
action | string | External service action [balance, debit, credit] | Y |
remote_id | integer(10) | Unique player id | Y |
amount | double(10,2) | Amount to debit from players account | Y |
provider | string(2) | Game provider | Y |
game_id | string (32 - 40) | Unique game id, see action available_games | Y |
transaction_id | string(32-70) | Unique transaction id for current transaction (In Evolution multiple players playing same table can share transaction_id - combined with remote_id it is unique) | Y |
gameplay_final | integer(1) | It tells you if the round is finished(1..finished, 0..unfinished) | Y |
round_id | string(32-70) | Game round id for current running game round | Y |
session_id | string (32 - 40) | Unique game session id generated by gamehub | Y |
key | string(40) | Request validation cache key | Y |
gamesession_id | string (255) | Enable tracking the player game sessions, if player has multiple sessions open we use session from the last launched game | Y |
game_id_hash | string (100) | Related to introduction of id_hash from getGameList method, can be used the same way as currently is game_id used | N |
fee | double(10,2) | Fees related to this transction. Only used in tournament hub. | N |
tip_in_amount | double(10,2) | Player left a tip for the dealer - it is already included in amount field. Only used in Ezugi livecasino. | N |
is_freeround_bet | boolean | This bet came from freerounds (usualy amount will be 0) | N |
freeround_id | string(100) | ID of the freerounds. It should be the same as "freeround_id " paramater in AddFreerounds response | N |
odd_factor | double(10,2) | odd factor - only used in sportsbooks | N |
jackpot_contribution_in_amount | double(10,6) | Amount of bet that is contributed to the jackpot contribution. Already included in bet. | N |
jackpot_contribution_ids | array of alphanumeric ids | Ids' of the jackpots this bet is contributing to - deprecated | N |
jackpot_contribution_per_id | array of doubles | Contributions per different jackpot types, in same order as above contribution_ids. - deprecated | N |
Request
<REMOTE URL>/?action=debit&callerId=test&callerPassword=12dar67890123&remote_id=1&amount=0.3&game_id=3 &transaction_id=27&round_id=123&session_id=123456789012 345678901324567980abcd &key=49f749364b129d9f91d2bef7dd044a93af0fb676&new_parameter=12345&gamesession_id=98erf743arka&game_id_hash=gs_gs-texas-rangers-reward
Response
{"status":"200","balance":"300.00"}
If we get the request with the transaction_id that was already processed on our side, on a retry, the response of the transaction should be the same as on first request.
For example if transaction_id = 61385912731123 response was {"status":"200","balance":"105793.30"}
, on a retry with same transaction_id it should be exactly the same response.
Status codes
External service can respond with 4 type of status codes. 200 for success, 500 service error, 404 transaction not found and 403 for debit transaction refusal. Only status of 200 will be accepted as OK by the Xapi Platform server.
- status 500 will make the bet to be retried / canceled and rollback will be sent
- status 403 will make the bet be refused
JSON key | type (max) | description | mandatory |
---|---|---|---|
status | integer(3) | HTTP status code | Y |
Balance | double(10,2) | Players balance (after transaction) | Y |
msg | string(255) | Error message | N |
transaction_id | string(8 - 64) | Transaction id | N |
Example
{"status":"200","balance":"300.00"}, {"status":"403","balance":"0.30","msg":"Insufficient funds"}, {"status":"500","msg":"internal error"}, {"status":"404","msg":"TRANSACTION_NOT_FOUND"}
Additional info
Jackpot bets
- all debit requests that are contributing to jackpot pool wil have jackpot_contribution_in_amount > 0
Flowchart: