Returns player balance after debit transaction.
Query string name | type (max) | description | mandatory |
---|---|---|---|
callerId | String | Caller authentication username | Y |
callerPassword | String | Caller authentication password | Y |
action | string | External service action [balance, debit, credit] | Y |
remote_id | integer(10) | Unique player id, user_username from playerExists, createPlayer and getGame requests | N |
username | String | Player username (non-prefixed) created by getGame call | Y |
session_id | string (32 - 40) | Unique game session id generated by provider | Y |
amount | double(10,2) | Amount to withdraw from players account (0 during freerounds awarded via API) | Y |
game_id_hash | string | Game id, same as id used for game launch in getGame | Y |
transaction_id | string(32-70) | Unique transaction id for current transaction | Y |
round_id | string(32-70) | Game round id for current running game round | Y |
gameplay_final | integer(1) | It tells you if the round is finished(1..finished, 0..unfinished) | Y |
is_freeround_bet | integer(1) | This bet came from freerounds (usualy amount will be 0) | Y |
freeround_id | string(100) | ID of the freerounds. It should be the same as "freeround_id " paramater parameter in AddFreerounds response | N |
fee | double(10,2) | Fees related to this transction | N |
jackpot_contribution_in_amount | double(10,4) | Amount of bet that is contributed to the jackpot contribution. Already included in bet. | N |
gamesession_id | string (255) | Enable tracking the player game sessions | Y |
key | string (40) | Request validation cache key | Y |
Request
GET
<REMOTE URL>/api/seamless/s2s/gh?callerId=danitestdev_s&callerPassword=7c222fb2927d828af22f592134e8932480637c0d&action=debit&remote_id=961229&username=946062&session_id=5abe10f0c71ae&amount=2&game_id=47477&game_id_hash=re_re-reactor&transaction_id=re-96939786-11&round_id=96939786&gameplay_final=0&is_freeround_bet=0&jackpot_contribution_in_amount=0.000000&gamesession_id=re_924795-762e30b2ab6e3dd4fdf0-47477&key=9c474472432d70239cd443bc6ab9fe37bab32b7d
Response
{
"status"
:
"200"
,
"balance"
:
"300.00"
}
External service can respond with 3 type of status codes. 200 for success, 500 service error and 403 for debit transaction refusal (sending rollback is not acceptable on 403).
- status 500 will make the bet to be retried
- status 403 will make the bet be refused (insufficient funds error)
Example:
{
"status"
:
"403"
,
"
msg
":
"bet rejected"}
{
"status"
:
"500"
,
"msg"
:
"internal error"
}