Debit() API
This API request debits a currency amount from a player’s balance. This triggered every time a player plays a game. The response would contain information and details of any debited amounts.
POST /debit
JSON
Host: https://test-api.netgaming.com/v1/
{
"token": "cc918a3e4dea45ef5c31d6e3b9dce4afed3c02eb",
"player_id": "125917",
"amount": 100,
"amount_type": "real",
"currency": "GBP",
"channel": "desktop",
"game_id": 1,
"round_id": 198909,
"game_type": "slots",
"game_name": "ageofdavinci",
"transaction_id": 2322,
"game_ended": false,
"note": "debit",
"additional_details": {
"bonus_id": "13et"
}
}
Parameters | Type | Description |
token | String | Token(session ID) created created for the player during login |
player_id | String | Id of the player |
amount | Integer | Should be in Cents format(balance = amount x 100 |
amount_type | String | real -> when playing game with real mode promo_freespin -> when playing game with promo_freespin |
currency | String | Players currency |
channel | String | desktop/mobile |
game_id | Integer | Game ID provided by the provider |
round_id | Integer | ID of each play / spin |
game_type | String | Types of game:slots,table_games, promo_freespin |
game_name | String | Name of the game |
transaction_id | String | Unique ID of the transaction |
game_ended | Boolean | This indicates, weather round id closed or in-progress. game_ended = true/false |
note | String | Extra information about debit request |
additional_details | JSON Object | If needed any extra params, we can add those into this object |
additional_details.bonus_id | String | Provider will send the bonus / campaign ID which is related to the promotional freespins. It will be null when it is in real mode. |
Response Example
{
"status": 1,
"player_id": "125917",
"token": "3c2ef39d02581e2db3ddf6c713e83e05",
"currency": "USD",
"bonus_amount": 100,
"balance": 1200,
"transaction_id": "1222445",
"bonus_bet": 0
}
Parameters | Type | Description |
status | Integer | 0 Indicates fail, 1 indicates success response |
player_id | String | Id of the player |
transaction_id | String | Operators, Unique ID of the transaction |
currency | String | Currency of the player |
token | String | Unique string assigned to each player(session ID) |
balance | Integer | Should be in Cents format(balance = amount x 100) |
bonus_amount | Integer | Should be in Cents format(balance = amount x 100) |
bonus_bet | Decimal | If any transaction that are made by the bonus amount, Operator has to send that bet amount in the API response. If it is not bonus transaction, then value should sent as a zero. |