Skip to content
VAS HUB
Wallet API

Rollback

Returns a stake. A rollback is a deposit with action: "rollback": there is no separate endpoint.

Path/deposit
MethodPOST
Content-Typeapplication/json
HeadersX-Client-IDX-Client-TSX-Client-Signature

Sent to your /deposit with action: "rollback".

When we call it

  • A player cancels a bet before the round starts.
  • A stake was confirmed too late to play (after its round ended).
  • Your wallet took a stake but left the balance below zero.

Request

ParameterTypeDescription
user_idrequiredstringYour player ID, as your /auth returned it.
session_tokenrequiredstringThe launch token the player opened the game with.
currencyrequiredstringCurrency code, e.g. KES.
amountrequirednumberThe amount to move, in the agreed unit (see Amounts). Never negative.
gamerequiredstringThe game code, e.g. avionix (see Games).
actionrequiredstringAlways rollback.
providerrequiredstringWho is calling: the same value as X-Client-ID.
provider_tx_idrequiredintegerOur transaction ID: the bet's ID for stakes, wins and rollbacks. Unique per game server; store it as text.
action_idrequiredintegerSame value as provider_tx_id.
platformrequiredstringDevice type. Currently always mobile.
withdraw_provider_tx_idrequiredintegerThe provider_tx_id of the withdraw being returned.
Request body
{
  "user_id": "100245",
  "session_token": "8f3c1d2e9b7a4c5d8e1f2a3b4c5d6e7f",
  "currency": "KES",
  "amount": 100,
  "game": "avionix",
  "action_id": 5823019,
  "action": "rollback",
  "provider": "avionix",
  "provider_tx_id": 5823019,
  "platform": "mobile",
  "withdraw_provider_tx_id": 5823019
}

Response

FieldTypeDescription
coderequiredinteger200 when the money moved (or had already moved, for a repeat).
messagerequiredstringok, or the reason for a refusal (shown to the player).
data.old_balancerequirednumberThe balance before this transaction.
data.new_balancerequirednumberThe balance after it.
data.operator_tx_idoptionalstringYour transaction ID, for reconciliation.
data.user_idoptionalstringEcho of the request.
data.provideroptionalstringEcho of the request.
data.provider_tx_idoptionalintegerEcho of the request.
data.currencyoptionalstringThe balance currency.
Response
{
  "code": 200,
  "message": "ok",
  "data": {
    "operator_tx_id": "884127",
    "user_id": "100245",
    "provider": "avionix",
    "provider_tx_id": 5823019,
    "old_balance": 1400.5,
    "new_balance": 1500.5,
    "currency": "KES"
  }
}

Result codes

CodeMeaning
200Stake returned.
500Unclear: the rollback is retried.

Every method: see Result codes.