9. CREDIT/WIN API

This API call is to credit an amount to a player’s wallet. This is triggered whenever a player plays
a game. The response would contain information and details of all credited amounts.

9.1 Credit Request

TypeInput
MethodPOST
URLhttps://<OPERATOR-API-BASE-URL>/credit
Headers "Content-Type": "application/json"
POST ParametersJSON Object
Example{
"account_id": "123",
"game_transaction_id": "123456",
"value": 100.00,
"game_id": 1,
"game_round_id": "123456",
"game_type": "casino",
"note": "credit amount",
"game_provider": "dragon_gaming",
"round_end": True,
"freespins_end": False,
"session_id": " abcd-efgh-1234-12ab",
"hash_key": "abcd-efgh-1234",
"context": {}
}

9.2 Request Parameters

ParameterTypeDescriptionOptional
account_idStringPlayer Account ID
game_transaction_idStringUnique ID of the transaction
valueDecimalWin Amount to be credited to players wallet
game_idIntegerGame ID
game_round_idStringRounds ID of each play/spin
game_typeStringType of game. slots/ table_games /
scratch_cards / bingo etc…
noteStringAny extra information about the credit
request
game_providerStringGame provider name e.g., drogangaming,
betsoft
YES
round_endBoolDoes the transaction close the round?
freespins_endBoolIs freespins end?
session_idStringToken received from game launch request
hash keystringThe computed md5().hex digest() value of
(session_id+value+game_round_id+
game_transaction_id)

9.3 Response Parameters

ParameterTypeDescription
account_idStringPlayer Account ID
session_idStringToken received from game launch request
cashDecimalCash balance
transaction_idStringCredit transaction ID
amount_creditedList of JSON
Object
Win Amount Details (refer to sample response for more
details)
type - Cash/Bonus
value -Credited value
balance_id – Balance identifier at Operator end. Can be
None if not applicable.
currencyStringThe 3-letter ISO 4217 currency code of the player
modeStringMode of play, for example:
‘real’ - when playing with real cash
‘goldcoins’- when playing with gold coins
‘sweepcoins’- when playing with sweep coins
gold_coinsDecimalGold coins balance.
(applicable only for mode=GoldCoins)
sweep_coinsDecimalSweep coins balance.
(applicable only for mode=SweepCoins)

9.4 Credit Response

{
	"account_id": "123",
	"session_id": "123456",
	"transaction_id": "abcd-efgh-1234",
	"cash": 200,
	"currency": "USD",
	"mode": "Real",
	"amount_credited": [{
		"type": "Cash",
		"value": 0.1,
		"balance_id": "0e4cda43-c9ce-4256-91f4-b7945ad1791b"
	}]
}

9.5 Example Error Response
The error response indicates an unknown transaction (code 6006) with the message "Unknown
Transaction," providing details about the unsuccessful credit process. Refer to section 12 for more
information.

{
	"error": true,
	"code": 6006,
	"message": "UnkownTransaction",
	"detail": "Unknown Transaction"
}