Deposit
Pays money to the player: a win, a rollback, or money received from chat or a free bet.
Path
/depositMethod
POSTContent-Type
application/jsonHeaders
X-Client-IDX-Client-TSX-Client-SignatureAppended to your wallet base URL. Signed: see Securing requests.
When we call it
- When a bet wins: the full payout, stake included (
action: "win"). - When a stake goes back (
action: "rollback", see Rollback). - When a player claims rain or a tip, or a free bet wins (
action: "claim").
Request
| Parameter | Type | Description |
|---|---|---|
user_idrequired | string | Your player ID, as your /auth returned it. |
session_tokenrequired | string | The launch token the player opened the game with. |
currencyrequired | string | Currency code, e.g. KES. |
amountrequired | number | The amount to move, in the agreed unit (see Amounts). Never negative. |
gamerequired | string | The game code, e.g. avionix (see Games). |
actionrequired | string | win, rollback or claim. |
providerrequired | string | Who is calling: the same value as X-Client-ID. |
provider_tx_idrequired | integer | Our transaction ID: the bet's ID for stakes, wins and rollbacks. Unique per game server; store it as text. |
action_idrequired | integer | Same value as provider_tx_id. |
platformrequired | string | Device type. Currently always mobile. |
withdraw_provider_tx_idrequired | integer | The provider_tx_id of the bet being paid (same value as provider_tx_id). For a claim there may be no such withdraw. |
Request body
{
"user_id": "100245",
"session_token": "8f3c1d2e9b7a4c5d8e1f2a3b4c5d6e7f",
"currency": "KES",
"amount": 250,
"game": "avionix",
"action_id": 5823019,
"action": "win",
"provider": "avionix",
"provider_tx_id": 5823019,
"platform": "mobile",
"withdraw_provider_tx_id": 5823019
}Response
| Field | Type | Description |
|---|---|---|
coderequired | integer | 200 when the money moved (or had already moved, for a repeat). |
messagerequired | string | ok, or the reason for a refusal (shown to the player). |
data.old_balancerequired | number | The balance before this transaction. |
data.new_balancerequired | number | The balance after it. |
data.operator_tx_idoptional | string | Your transaction ID, for reconciliation. |
data.user_idoptional | string | Echo of the request. |
data.provideroptional | string | Echo of the request. |
data.provider_tx_idoptional | integer | Echo of the request. |
data.currencyoptional | string | The balance currency. |
Response
{
"code": 200,
"message": "ok",
"data": {
"operator_tx_id": "884133",
"user_id": "100245",
"provider": "avionix",
"provider_tx_id": 5823019,
"old_balance": 1400.5,
"new_balance": 1650.5,
"currency": "KES"
}
}Result codes
| Code | Meaning |
|---|---|
200 | Paid. |
404 | No such player (the payout is retried, then left for you to settle). |
500 | Unclear: the payout is retried. |
Every method: see Result codes.