Money deposit request
A request to deposit money to the user's account is made when the player:
- Stands up from a table
- Receives a tournament prize
- Receives a refund for buy-in in a cancelled tournament
NOTE: Please use this tool to check your integration implementation for seamless wallet operations: https://tests.evenbetgaming.com/seamless/
Request header (HTTP Header)
Parameter Name | Description | Optional / Mandatory | Data type |
---|---|---|---|
sign | Request signature | Mandatory | string |
Request parameters
Parameter Name | Description | Optional / Mandatory | Data type |
---|---|---|---|
method | ReturnCash | Mandatory | string |
userId | User identifier | Mandatory | string |
amount | Amount to withdraw/deposit in Cents | Mandatory | integer |
currency | ISO currency code | Mandatory | string |
transactionId | Transaction ID | Mandatory | string |
Optional parameters
Parameter Name | Description | Data type |
---|---|---|
sessionId | Session external identifier or unique token of session | string |
tableId | Table identifier | string |
tournamentId | Tournament identifier | string |
transactionType | Server transaction type | string |
transactionSubType | Sub types for transaction | string |
tableSessionId | Table session identifier | string |
tournamentBuyIn | Tournament Buy-In part | integer |
tournamentEntryFee | Tournament Entry Fee part | integer |
tournamentBountyKnockout | Tournament Bounty part | integer |
tournamentSessionId | Tournament Session ID. All requests, related to a tournament, contain this ID. | string |
result | From Table amount - To Table amount | integer |
sumOfBets | Total amount of all bets for the player in table session | integer |
rake | Total amount of player's rake. 1/1000 of minimum currency precision | integer |
linkedTransactionIds | IDs of the transactions associated with debiting money from a player to obtain the current returhCash transaction. For example, the GetCash transaction id | array |
tableName | Table name | string |
tournamentName | Tournament name | string |
extras | The amount of additional spending at the table, e.g. RabbitHunting | integer |
tableSumHands | The number of hands played by a player at the table within one session | integer |
Request validation
Upon receipt it is required to validate the request according to the following rules:
- Request parameters, marked as Mandatory, must be passed in the request. If not, then the error “Invalid request params” is returned.
- sign. Request signature should correspond to the parameters passed. If not, then the error “Invalid signature” must be returned.
- userId must exist. If a player does not exist, then the error “Player not found” must be returned.
- currency should have a valid ISO-code used in your system. If not, then the error “Invalid request params” must be returned.
- amount must always be a positive integer. If not, then the error “Invalid request params” must be returned.
- if a transaction with passed transactionId has already been handled on your side, then it is required to return errorCode = 0 with the comment “Transaction already processed”. You should not process the transaction for the second time.
If the error “Transaction already processed” appeared, it is required to return all parameters. For other errors, please return errorCode and errorDescription parameters only.
Response parameters
A response to request is expected to be made in JSON format. Response Parameters:
Parameter Name | Description | Optional / Mandatory | Data type |
---|---|---|---|
balance | Current player’s balance in Cents (after the changes, if deposit/withdrawal successfully completed) | Mandatory | integer |
errorCode | Error code if the request does not come through successfully, and 0 in any other case. | Mandatory | integer |
errorDescription | Error description in case the request has not been successfully processed. | Optional | string |
Resending the request
In case an error is received, the request is going to be resent. The request will be sent in 30 seconds intervals through 2 days.
Money deposit request statuses
Depending on the situation when the method is triggered, the ReturnCash transaction can be in one of 2 states:
-
Stopped If a player is blocked, then the ReturnCash transaction is stopped. Stopped transactions can be re started from Backoffice in External Transactions section.
-
Delayed The delayed status is set when the execution of transaction is delayed. It can happen if the transaction value is greater than x (this is a fixed value configured on deploy and can be manually adjusted). The delayed execution is optional and disabled by default.
Delayed transaction execution process:
- ReturnCash event is received
- If the condition is met (the transaction amount is greater than the specified X value), the transaction goes into delayed status
- The server repeats the ReturnCash event after 30 seconds
- The status changes to created and is then executed as a normal transaction
Request example
{
"method": "ReturnCash",
"userId": 123456,
"amount": 20000,
"currency":"USD",
"transactionId":"123456789",
}
Response example
{
"balance": 12300,
"errorCode": 0,
"errorDescription":"",
}