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
Type | Input |
Method | POST |
URL | https://<OPERATOR-API-BASE-URL>/credit |
Headers | "Content-Type": "application/json" |
POST Parameters | JSON 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
Parameter | Type | Description | Optional |
account_id | String | Player Account ID | |
game_transaction_id | String | Unique ID of the transaction | |
value | Decimal | Win Amount to be credited to players wallet | |
game_id | Integer | Game ID | |
game_round_id | String | Rounds ID of each play/spin | |
game_type | String | Type of game. slots/ table_games / scratch_cards / bingo etc… | |
note | String | Any extra information about the credit request | |
game_provider | String | Game provider name e.g., drogangaming, betsoft | YES |
round_end | Bool | Does the transaction close the round? | |
freespins_end | Bool | Is freespins end? | |
session_id | String | Token received from game launch request | |
hash key | string | The computed md5().hex digest() value of (session_id+value+game_round_id+ game_transaction_id) |
9.3 Response Parameters
Parameter | Type | Description |
account_id | String | Player Account ID |
session_id | String | Token received from game launch request |
cash | Decimal | Cash balance |
transaction_id | String | Credit transaction ID |
amount_credited | List 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. |
currency | String | The 3-letter ISO 4217 currency code of the player |
mode | String | Mode of play, for example: ‘real’ - when playing with real cash ‘goldcoins’- when playing with gold coins ‘sweepcoins’- when playing with sweep coins |
gold_coins | Decimal | Gold coins balance. (applicable only for mode=GoldCoins) |
sweep_coins | Decimal | Sweep 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" }