InAPI 1.7+ supports a “multiple withdraws in one game round” scenario. InAPI will not return error 104 “Transaction already exists” on 2nd-or-later Withdrawal requests for the same round.
If a withdrawal call fails, send a Rollback for the transactionId that has failed (retries of withdrawals are not supported).
Required parameters of data:
- token — identifies a player
- transactionId — unique key, in order to identify a single financial transaction
- roundId — identifies game cycle (required, cannot be null)
- gameId — identifies the game
- currencyId — ISO currency code
- betAmount — amount to debit
- betInfo – (can be used if the additional data should be sent)
Response parameter:
- result — request result (true if successful and false if failed)
- err_desc — error description (if “result” is false)
- err_code — error code (if “result” is false)
- transactionId — unique key which identifies a single financial transaction (GP transaction ID)
- balance — player balance after the transaction
Withdraw request example:
Endpoint: https://staging.tomhorngames.com/api/TomHorn/Withdraw
{
"time": "04-02-2021 14:55:48",
"data": {
"token": "136275",
"transactionId": "16928505367480413124",
"roundId": "12345",
"gameId": "racingbet",
"currencyId": "EUR",
"betAmount": "6.00",
"betInfo": ""
},
"hash": "13E9A89766280AC186FE6ABB805073B1"
}
Error codes
err_code | Description | Rollback (Yes/No) |
4 | Wrong Bet Amount | No |
7 | Wrong Game ID | No |
8 | Invalid Hash | No |
21 | Not Enough Money | No |
29 | Player Is Blocked | No |
34 | Wrong Currency | No |
84 | Game is Blocked | No |
104 | Transaction already exist | No |
106 | Token Expired | No |
114 | Token not Found | No |
130 | General Error | Yes |
200 | Incorrect Parameters Passed | No |
201 | Wallet Service Error (call Rollback for this game round) | Yes |
Comments
0 comments
Article is closed for comments.