/
9) seamless credit players balance callback *

9) seamless credit players balance callback *

Returns player balance after credit transaction. Credit is called after every debit, even if credit amount is 0. This signifies that a game round is complete.

Explanation

Credit requests are called after the debit request, as a response/win. Includes amount to a credit to player.


Request common parameters
Query string nametype (max)descriptionmandatory
callerIdStringCaller authentication usernameY
callerPasswordStringCaller authentication passwordY
callerPrefixString2 or more letter prefix that is used internally to prefix player username for your accountN
usernameStringPlayer username (non-prefixed) created by your createPlayer callY


Credit players balance
Query string nametype (max)descriptionmandatory

actionStringType of action [credit]Y

remote_idinteger(10)Unique player id Y

amountdouble(10,2)Amount to credit to players accountY

providerstring (2)Game providerY

game_id string (32 - 40)Unique game id, see action available_gamesY

transaction_id string(32- 70)Unique transaction id for current transaction Y

gameplay_final Integer(1)It tells you if the round is finished(1 - finished, 0 - unfished)Y

round_id string (32 - 70)Game round id for current running game roundY

session_idstring (32 - 40)Unique game session id generated by gamehubY

keystring(40)Request validation cache keyY

gamesession_idstring (255)Enable tracking the player game sessions, if player has multiple sessions open we use session from the last launched gameY

game_id_hashstring (100)Related to introduction of id_hash from getGameList method, can be used the same way as currently is game_id usedN

is_freeround_winInteger (1/0)This win came from freerounds if 1, else 0N

freeround_idstring(100)ID of the freerounds. It should be the same as "freeround_id" paramater in AddFreerounds responseN

freeround_spins_remaininginteger(3)Number of freeround spins remaining. Currently not available for all providersN

freeround_completedInteger (1/0)Freerounds completed if 1, else 0N

is_promo_wininteger (1/0)Transaction is a promo win if 1, else 0N

is_jackpot_winInteger (1/0)This is a jackpot win if 1, else 0N

jackpot_win_idsarray of alphanumeric idsIds' of the jackpots this win belongs to. - deprecatedN

jackpot_win_in_amountdouble(10,2)Jackpot amount won - already included in the amount property.N

is_featurebuy_winInteger (1/0)This is a featurebuy win if 1, else 0N

currencystring(3)Players currency code. Uppercase letters
Y

jackpot_contribution_in_amountdouble(10,6)Amount of bet that is contributed to the jackpot contribution. Already included in bet.N

Request: <REMOTE URL>/?action=credit&callerId=test&callerPassword=12dar67890123&remote_id=1&amount=0.3&game_id=3&transaction _id=27&round_id=123&session_id=12345678901 2345678901324567980abcd &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 3 type of status codes. 200 for success, 500 service error and 403 for credit transaction refusal (Credits should not be Refused!). Only status of 200 will be accepted as OK by the Xapi Platform server.

JSON keytype (max)descriptionmandatory
statusinteger(3) Status codeY
Balancedouble(10,2)Players balance (after transaction)Y
msgstring(255)Error messageN
transaction_idstring(8 - 64)transaction idN

Example: {"status":"200","balance":"300.00"}, {"status":"403","balance":"0.30","msg":"Insufficient funds"}, {"status":"500","msg":"internal error"}

Additional info

With round_id win can be connected to the corresponding bet. Please be aware there can be some cases of wins without bet before them. For example, in some cases some kind of ingame award, or bonus game or ingame freespins. It depends from provider to provider. Please do not decline those wins.


Jackpot wins

  • all credit requests coming from jackpot win will have is_jackpot_win = 1 and jackpot_win_in_amount > 0

Flowchart:

Related content