Refund() API

This API request allows the credit of an amount to a player’s balance. This request is made when something goes wrong at the server / game-engine side and a previous debit request needs to be refunded. Its response would contain the information of any credited amount.

Refund() Request

TypeInput
HTTP MethodPOST
API URLhttps://<API_BASE_URL>/refund
Headers"Content-Type": "application/json"
POST Parametersjson object e.g.:
{
"token": "cc918a3e4dea45ef5c31d6e3b9dce4afed3c02eb",
"account_id": "259823",
"amount": 100,
"original_transaction_id": 1655,
"transaction_id": 2322
"amount_type": "real",
"currency": "GBP",
"game_id": 1,
"round_id": 198909,
"game_type": "slots",
"game_name": "testgamename",
"note": "refund",
}
ParametersTypeDescription
tokenStringUnique string assigned to each player (session ID).
account_idStringAccount ID of the player.
amountIntegerAmount to be credited to player’s wallet
original_transaction_idStringA transaction ID which is related to respective debit transaction.
transaction_idStringNew refund transaction ID, should not be the same as the failed transaction.
amount_typeStringIndicate type of amount type. It can be real only.
currencyStringCurrency of the player
game_idIntegerUnique ID of the game
round_idBigint unsignedRound ID related to the Debit request in question
game_typeStringType of the game. slots / table_games / scratch_cards / bing
game_nameStringName of the game
noteStringExtra information about the cancel debit request

Refund() Response + Example

{
	"status": 0,
	"account_id": "123123",
	"country": "US",
	"token": "3c2ef39d02581e2db3ddf6c713e83e05",
	"balance": 12345,
	"currency": "USD",
	"transaction_id": "205354854449856",
}
Object/Key in Response ObjectTypeDescription
statusIntegerResponse status
account_idStringAccount ID of the player
countryStringCountry of the player
tokenStringUnique string assigned to each player (session ID)
balanceIntegerBalance of the player
currencyStringCurrency of the player
transaction_idStringNew refund transaction ID, should not be the same as the failed transaction.