Transfer Wallet API

The Transfer Wallet API offers wallet management on veligames side.

All following requests are passed from the operator to VeliGames using the HTTP POST method with the content type application/json. The signature parameter in the header is mandatory for all requests.

See also

Authentication

API Method: register

This API method registers a new player and initializes a wallet with a specific currency. This method should be called before player launches veligames start-game endpoint.

Path:

https://VELIGAMES_API_URL/tw-api/public/player/register

HTTP Method:

POST

Request body

Parameter

Type

Description

playerId

string

The identifier of the player on the operator side [4]

playerName

string (optional)

Player Nickname

currency

string

The player’s currency code [1]

brandId

string

The identifier of the casino brand [3]

JSON Response

The response contains playerId registered on transfer wallet side. Used in start-game endpoint.

Parameter

Type

Description

playerId

string

Player Id on transfer wallet side.

An example of using register API method
curl -X 'POST' \
'https://VELIGAMES_API_URL/tw-api/public/player/register' \
-H 'Content-Type": application/json' \
-H 'signature:OPERATOR_ID:tapm5+EvNZ5d...0GCfUspxw==' \
-d '{
       "brandId":"someBrand",
       "currency":"EUR",
       "playerId":"2cafb095...7f05",
       "playerName":"John Doe",
 }'
An example of the success response to the register request
{ "playerId": "2cafb095...7f05" }

Errors

Error

Status code

Description

UNKNOWN_ERROR

500

A generic error: an internal server error, which can be retried

BAD_REQUEST

400

Missing/invalid parameters

UNAUTHORIZED

401

Invalid signature

API Method: info

Using this method Operator can get the current balance of the player.

Path:

https://VELIGAMES_API_URL/tw-api/public/player/info

HTTP Method:

POST

Request body

Parameter

Type

Description

playerId

string

The identifier of the player [4]

currency

string

The player’s currency code [1]

brandId

string

The identifier of the casino brand [3]

JSON Response

The response contains player balance.

Parameter

Type

Description

balance

object

Information about the player’s balance in real money

balance.amount

decimal

The amount of the real balance

balance.currency

string

The currency code [1]

An example of using info API method
curl -X 'POST' \
'https://VELIGAMES_API_URL/tw-api/public/player/info' \
-H 'Content-Type": application/json' \
-H 'signature:OPERATOR_ID:tapm5+EvNZ5d...0GCfUspxw==' \
-d '{
       "brandId":"someBrand",
       "currency":"EUR",
       "playerId":"2cafb095...7f05"
 }'
An example of the success response to the info request
{
   "playerId": "2cafb095...7f05",
   "balance": {
    "currency": "EUR",
    "amount": 50
  }
}

Errors

Error

Status code

Description

UNKNOWN_ERROR

500

A generic error: an internal server error, which can be retried

BAD_REQUEST

400

Missing/invalid parameters

PLAYER_NOT_FOUND

404

The player does not exist (needs register first)

UNAUTHORIZED

401

Invalid signature

API Method: deposit

Important

Idempotent behavior in case of duplicate transactions. Sending the same request after successful response will result in error - DUPLICATE_TRANSACTION

Casino deposits initial funds into the player’s wallet before the game starts.

Path:

https://VELIGAMES_API_URL/tw-api/public/wallet/deposit

HTTP Method:

POST

Request body

Parameter

Type

Description

extTransactionId

string

The unique identifier of the transaction

playerId

string

Identifier of the player [4]

amount

object

Information about the deposit amount

amount.amount

decimal

The deposit amount

amount.currency

string

The currency code [1]

brandId

string

The identifier of the casino brand [3]

An example of a deposit request
curl -X 'POST' \
'https://VELIGAMES_API_URL/tw-api/public/deposit' \
-H 'signature:OPERATOR_ID:tapm5+EvNZ5dCCN...N5CdDx0GCfUspxw==' \
-H 'Content-Type: application/json' \
-d '{
       "brandId":"someBrand",
       "playerId":"PLAYER-2cafb...7f05",
       "transactionId":"TRX-b93...42eb",
       "amount":{"amount":50,"currency":"EUR"}
}'

JSON Response

{
  "balance": {
    "currency": "EUR",
    "amount": 50
  },
  "transactionId": "TRX-b93...42eb",
  "timestamp": "2024-02-09T00:00:00Z"
}

Parameter

Type

Description

transactionId

string

The identifier of the transaction in the transfer wallet

balance

object

Information about the player’s balance in real money

balance.amount

decimal

The amount of the real balance

balance.currency

string

The currency code [1]

timestamp

datetime string ( ISO 8601 )

Exact time of transaction in UTC

Errors

An example of an error response to the deposit request
{"error":"BAD_REQUEST"}

Error ID

Status code

Description

UNKNOWN_ERROR

500

A generic error or an internal server error that can be retried

BAD_REQUEST

400

The parameters are missing or invalid

UNAUTHORIZED

401

Invalid signature

PLAYER_NOT_FOUND

404

The player does not exist (needs register first)

ACCOUNT_LOCKED

403

The player is locked/suspended

DUPLICATE_TRANSACTION

409

Duplicate transaction

API Method: withdraw

Important

Idempotent behavior in case of duplicate transactions. Sending the same request after successful response will result in error - DUPLICATE_TRANSACTION

Casino requests withdrawal of the player’s final balance when they exit the game.

Path:

https://VELIGAMES_API_URL/tw-api/public/wallet/withdraw

HTTP Method:

POST

Request body

Parameter

Type

Description

extTransactionId

string

The unique identifier of the transaction

playerId

string

The identifier of the player [4]

brandId

string

The identifier of the casino brand [3]

amount

object

The amount object operator wants to cash out.

amount.amount

decimal

Amount to cash out.

amount.currency

string

The player’s currency [1]

An example of a withdraw API method
curl -X 'POST' \
'https://VELIGAMES_API_URL/tw-api/public/withdraw' \
-H 'signature:OPERATOR_ID:tapm5+EvNZ5dCCN...N5CdDx0GCfUspxw==' \
-H 'Content-Type: application/json' \
-d '{
       "brandId":"someBrand",
       "playerId":"PLAYER-be6f...26de7",
       "extTransactionId":"TRX-680b24...540e1a",
       "amount":{"amount":1830,"currency":"EUR"}
}'

JSON Response

Parameter

Type

Description

transactionId

string

The identifier of the transaction in the transfer wallet

balance

object

Information about the player’s balance in real money

balance.amount

decimal

The amount of the real balance

balance.currency

string

The currency code [1]

timestamp

datetime string ( ISO 8601 )

Exact time of transaction in UTC

{
    "walletTransactionId": "TRX-b93...42eb",
    "balance": {
       "currency": "EUR",
       "amount":27.3,
    },
    "timestamp": "2024-02-09T00:00:00Z"
}

Errors

Error ID

Status Code

Description

UNKNOWN_ERROR

500

A generic error or an internal server error that can be retried

BAD_REQUEST

400

The parameters are missing or invalid

INSUFFICIENT_BALANCE

400

The balance is not sufficient

ACCOUNT_LOCKED

403

The player is locked/suspended

UNAUTHORIZED

401

The signature is invalid

PLAYER_NOT_FOUND

404

The player does not exist

DUPLICATE_TRANSACTION

409

A duplicate transaction

Footnotes