This API call is to debit an amount from a player’s balance. This is triggered whenever a player
plays a game. The response would contain information and details of any debited amounts.
8.1 Debit Request
Type | Input |
Method | POST |
URL | https://<OPERATOR-API-BASE-URL>/debit |
Headers | "Content-Type": "application/json" |
POST Parameters | JSON Object |
Example | { "account_id": "123", "session_id": "0b3fcbee-9c1e-4c8b-b97a-8746a8a96a ", "game_id": "123456", "game_transaction_id": "game_transaction_id", "value": "value", "game_round_id": "game_round_id", "game_type": "casino", "note": "debiting amount", "game_provider": "dragon_gaming", "amount_type": "real", "context": "{"key":"value"}", "hash_key": "Hash" } |
8.2 Request Parameters
Parameter | Type | Description | Optional |
account_id | String | Player Account ID | |
session_id | String | Token received from game launch request | |
game_id | Integer | Game ID | |
game_transaction_id | String | Unique ID of the transaction | |
value | Decimal | Bet Amount to be debited from the player's wallet. | |
game_round_id | String | Rounds ID of each play/spin | |
game_type | String | Type of the game. casino/slots table_games/scratch_card/bingo etc… | |
note | String | Any extra information about the debit request | |
game_provider | String | Game provider name e.g., drogangaming, betsoft | YES |
amount_type | String | Indicate the type of amount type. It can be real/bonus/realandbonus/freespins | YES |
context | JSON Object | JSON object containing metadata in case of cash and bonus combination bets. e.g.,{"bet_percentage": 100} | YES |
hash_key | String | The computed md5().hex digest() value of (session_id+value+game_round_id+\ game_transaction_id) |
8.3 Response Parameters
Parameter | Type | Description |
account_id | String | Player Account ID |
transaction_id | String | Debit transaction ID |
currency | String | The 3-letter ISO 4217 currency code of the player |
session_id | String | Token received from game launch request |
cash | Decimal | Cash Balance |
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 |
amount_debited | List of JSON Object | Bet Amount Details (refer sample response for more details) type - Cash/Bonus value - Debited value balance_id – Balance identifier at Operator end. Can be None if not applicable. |
gold_coins | Decimal | Gold coins balance. (applicable only for mode=GoldCoins) |
sweep_coins | Decimal | Sweep coins balance. (applicable only for mode=SweepCoins) |
8.4 Example Debit Response
{ "account_id": "123", "session_id": "123456", "transaction_id": "abcd-1234-efgh", "cash": 100, "currency": "USD", "mode": "Real", "amount_debited": [{ "type": "Cash", "value": 0.1, "balance_id": "0e4cda43-c9ce-4256-91f4-b7945ad1791b" }] }
8.5 Example Error Response
The error response indicates an insufficient balance (code 6001) with the message
"InsufficientBalance" provides details about the unsuccessful bet request. Refer to section 12 for more
information.
{ "error": true, "code": 6001, "message": "InsufficientBalance", "detail": "Insufficient Balance" }