Credit() API
This API would be similar to Debit API Request. This API request is made to credit a currency amount to a player’s account. This is made every time a player wins a monetary value from the games. Its response would contain the information of all credited amounts.
POST /credit
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": true,
"note": "credit",
"additional_details": {
"bonus_id": "13et",
"is_freespin": true
}
}
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. |
additional_details.is_freespin | Boolean( Optional ) | This parameter is optional. When the game triggers any features, such as in-game free spins or bonus games etc.., it will be true in these cases else it always be false. |
Response Example
{
"status": 1,
"player_id": "125917",
"token": "3c2ef39d02581e2db3ddf6c713e83e05",
"currency": "USD",
"bonus_amount": 100,
"balance": 1200,
"transaction_id": "1222445",
"bonus_win": 1.2
}
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_win | Decimal | If any transaction that are made by the bonus amount, Operator has to send that win amount in the API response. If it is not bonus transaction, then value should sent as a zero. |