Backend integration
Transfer Wallet API introduction
Provider - side which provides games (Aviatrix).
Partner - side which integrates games.
Brand - partner's casino website where users playing games and making bets.
Current document describes methods implemented by provider. Methods allow the partner to manage the player's balance on the provider's side.
Can not be combined with Seamless Wallet API
Transfer Wallet API methods
All POST requests contain the X-Auth-Signature HTTP header required to authenticate the host. That allows to refuse IP whitelisting during integration process. Otherwise, it deprives the provider of the ability to scale quickly (horizontally) without notifying the platform.
Ask your integration manager for the base URL.
/transferwallet/launchGame
The method is used to get an URL for iFrame embedding.
Example of the request
POST /transferwallet/launchGame HTTP/1.1
Content-Type: application/json
Accept: application/json
X-Auth-Signature: <signature>
{
"cid": "someplatform",
"playerId": "john",
"productId": "nft-aviatrix",
"currency": "EUR",
"lang": "en",
"lobbyUrl": "https://someplatform.com",
"isDemo": false
}
| Parameter | Description | Type | Requirements | Explanation |
|---|---|---|---|---|
| cid | unique brand identifier | string | mandatory | value from URL parameters of games provider during integration |
| productId | game identifier | string | mandatory | available identifiers: nft-aviatrix, second-chance, aviatrix-fruits |
| playerId | user identifier | string | mandatory | unique for a brand |
| currency | bet currency | string | mandatory | 3-5 symbols |
| lang | language code | string | optional | format code ISO 639-1. Default value is en |
| lobbyUrl | lobby url | string | optional | needed for redirects to brand homepage |
| isDemo | isDemo= value true or false | string | optional | needed to enable the demo mode of the game. Required parameter for demo mode |
Example of a response from the server
HTTP/1.1 200 OK
{
"url": "https://domain.com?cid=someplatform&productId=nft-aviatrix&sessionToken=abcd1234&lang=en&lobbyUrl=https://someplatform.com"
}
| Parameter | Description | Type | Requirements | Explanation |
|---|---|---|---|---|
| url | url for iFrame embedding | string | mandatory | url for front-end integration |
/transferwallet/checkTx
The method is used to get a previously sent transaction.
Example of the request
POST /transferwallet/checkTx HTTP/1.1
Content-Type: application/json
Accept: application/json
X-Auth-Signature: <signature>
{
"cid": "someplatform",
"txId": "4df40f77-2b38-43f4-b264-1d850f5a6715"
}
| Parameter | Description | Type | Requirements | Explanation |
|---|---|---|---|---|
| cid | unique brand identifier | string | mandatory | value from URL parameters of games provider during integration |
| txId | transaction identifier | string | mandatory | identifier from /transferwallet/deposit or /transferwallet/withdrawal requests |
Example of a response from the server
HTTP/1.1 200 OK
{
"txId": "4df40f77-2b38-43f4-b264-1d850f5a6715",
"playerId": "john",
"type": "deposit",
"currency": "EUR",
"amount": 1234,
"createdAt": "2020-12-03T12:15:30.000Z",
"postTransactionBalance": 5678
}
| Parameter | Description | Type | Requirements | Explanation |
|---|---|---|---|---|
| txId | transaction identifier | string | mandatory | identifier from /transferwallet/deposit or /transferwallet/withdrawal requests |
| playerId | user identifier | string | mandatory | unique for a brand |
| type | transaction type | string | mandatory | possible values: deposit or withdrawal |
| currency | transaction currency | string | mandatory | 3-5 symbols |
| amount | transaction amount | integer | mandatory | amount in the format minor currency unit (given the cents, i.e. the number multiplied by 100) |
| createdAt | creation timestamp | timestamp | mandatory | format: yyyy-MM-dd’T’HH:mm:ss.SSSZ |
| postTransactionBalance | current balance after transaction | integer | mandatory | user balance after transaction in the format minor currency unit (given the cents, i.e. the number multiplied by 100) |
/transferwallet/getBalance
The method is used to get player's balances on the partner's side.
Example of the request
POST /transferwallet/getBalance HTTP/1.1
Content-Type: application/json
Accept: application/json
X-Auth-Signature: <signature>
{
"cid": "someplatform",
"playerId": "john"
}
| Parameter | Description | Type | Requirements | Explanation |
|---|---|---|---|---|
| cid | unique brand identifier | string | mandatory | value from URL parameters of games provider during integration |
| playerId | user identifier | string | mandatory | unique for a brand |
Example of a response from the server
HTTP/1.1 200 OK
{
"EUR": 1234,
"USD": 5678
}
| Parameter | Description | Type | Requirements | Explanation |
|---|---|---|---|---|
| Currency code | player's balance in the certain count | integer | mandatory | ISO-4217-3 format. |
/transferwallet/getHistory
The method is used to get list of deposit and withdrawal transactions. Response is sorted by createdAt in descending order.
Example of the request
POST /transferwallet/getHistory HTTP/1.1
Content-Type: application/json
Accept: application/json
X-Auth-Signature: <signature>
{
"cid": "someplatform",
"playerId": "john",
"limit": 20,
"from": "2020-12-03T12:15:30.000Z"
}
| Parameter | Description | Type | Requirements | Explanation |
|---|---|---|---|---|
| cid | unique brand identifier | string | mandatory | value from URL parameters of games provider during integration |
| playerId | user identifier | string | mandatory | unique for a brand |
| limit | transctions count limit | string | optional | 0 < limit < 100, default value: 20 |
| from | transactions with createdAt lower than from will be returned | timestamp | optional | format: yyyy-MM-dd’T’HH:mm:ss.SSSZ |
Example of a response from the server
HTTP/1.1 200 OK
[
{
"txId": "4df40f77-2b38-43f4-b264-1d850f5a6715",
"playerId": "john",
"type": "deposit",
"currency": "EUR",
"amount": 1234,
"createdAt": "2020-12-03T12:15:30.000Z",
"postTransactionBalance": 5678
}
]
| Parameter | Description | Type | Requirements | Explanation |
|---|---|---|---|---|
| txId | transaction identifier | string | mandatory | identifier from /transferwallet/deposit or /transferwallet/withdrawal requests |
| playerId | user identifier | string | mandatory | unique for a brand |
| type | transaction type | string | mandatory | deposit or withdrawal |
| currency | transaction currency | string | mandatory | 3-5 symbols |
| amount | transaction amount | integer | mandatory | amount in the format minor currency unit (given the cents, i.e. the number multiplied by 100) |
| createdAt | creation timestamp | timestamp | mandatory | format: yyyy-MM-dd’T’HH:mm:ss.SSSZ |
| postTransactionBalance | current balance after transaction | integer | mandatory | user balance after transaction in the format minor currency unit (given the cents, i.e. the number multiplied by 100) |
/transferwallet/getGameHistory
The method is used to get list of game transactions. Response is sorted by createdAt in descending order.
Example of the request
POST /transferwallet/getGameHistory HTTP/1.1
Content-Type: application/json
Accept: application/json
X-Auth-Signature: <signature>
{
"cid": "someplatform",
"productId": "nft-aviatrix",
"limit": 20,
"from": "2020-12-03T12:15:30.000Z"
}
| Parameter | Description | Type | Requirements | Explanation |
|---|---|---|---|---|
| cid | unique brand identifier | string | mandatory | value from URL parameters of games provider during integration |
| productId | game identifier | string | mandatory | available identifiers: nft-aviatrix, second-chance, aviatrix-fruits |
| limit | transctions count limit | string | optional | 0 < limit < 100, default value: 50 |
| from | transactions with createdAt lower than from will be returned | timestamp | optional | format: yyyy-MM-dd’T’HH:mm:ss.SSSZ |
Example of a response from the server
HTTP/1.1 200 OK
[
{
"betId": "1a2b3c4d-6f5e-4d3c-b2a1-f6e5d4c3b2a1",
"playerId": "john",
"txId": "4df40f77-2b38-43f4-b264-1d850f5a6715",
"type": "bet",
"currency": "EUR",
"amount": 1234,
"createdAt": "2020-12-03T12:15:30.000Z",
"postTransactionBalance": 5678
}
]
| Parameter | Description | Type | Requirements | Explanation |
|---|---|---|---|---|
| betId | bet identifier | string | mandatory | created on the provider side |
| playerId | user identifier | string | mandatory | unique for a brand |
| txId | transaction identifier | string | mandatory | in-game transaction identifier, generated on the provider side |
| type | transaction type | string | mandatory | bet, win, cancel or promoWin |
| currency | transaction currency | string | mandatory | 3-5 symbols |
| amount | transaction amount | integer | mandatory | amount in the format minor currency unit (given the cents, i.e. the number multiplied by 100) |
| createdAt | creation timestamp | timestamp | mandatory | format: yyyy-MM-dd’T’HH:mm:ss.SSSZ |
| postTransactionBalance | current balance after transaction | integer | mandatory | user balance after transaction in the format minor currency unit (given the cents, i.e. the number multiplied by 100) |
/transferwallet/deposit
The method is used to deposit assets to player's balance.
Example of the request
POST /transferwallet/deposit HTTP/1.1
Content-Type: application/json
Accept: application/json
X-Auth-Signature: <signature>
{
"cid": "someplatform",
"playerId": "john",
"txId": "4df40f77-2b38-43f4-b264-1d850f5a6715",
"currency": "EUR",
"amount": 1234
}
| Parameter | Description | Type | Requirements | Explanation |
|---|---|---|---|---|
| cid | unique brand identifier | string | mandatory | value from URL parameters of games provider during integration |
| playerId | user identifier | string | mandatory | unique for a brand |
| txId | transaction identifier | string | mandatory | identifier from /transferwallet/deposit or /transferwallet/withdrawal requests |
| currency | deposit currency | string | mandatory | 3-5 symbols |
| amount | deposit amount | integer | mandatory | ISO-4217-3 format. |
Example of a response from the server
HTTP/1.1 200 OK
{
"txId": "4df40f77-2b38-43f4-b264-1d850f5a6715",
"playerId": "john",
"currency": "EUR",
"balance": 1234
}
| Parameter | Description | Type | Requirements | Explanation |
|---|---|---|---|---|
| txId | transaction identifier | string | mandatory | identifier from /transferwallet/deposit or /transferwallet/withdrawal requests |
| playerId | user identifier | string | mandatory | unique for a brand |
| currency | player's balance currency | string | mandatory | 3-5 symbols |
| balance | playr's balance in the chosen currency | integer | mandatory | ISO-4217-3 format. |
/transferwallet/withdraw
The method is used to withdraw assets from player's balance.
Example of the request
POST /transferwallet/withdraw HTTP/1.1
Content-Type: application/json
Accept: application/json
X-Auth-Signature: <signature>
{
"cid": "someplatform",
"playerId": "john",
"txId": "4df40f77-2b38-43f4-b264-1d850f5a6715",
"currency": "EUR",
"amount": 1234
}
| Parameter | Description | Type | Requirements | Explanation |
|---|---|---|---|---|
| cid | unique brand identifier | string | mandatory | value from URL parameters of games provider during integration |
| playerId | user identifier | string | mandatory | unique for a brand |
| txId | transaction identifier | string | mandatory | identifier from /transferwallet/deposit or /transferwallet/withdrawal requests |
| currency | withdrawal currency | string | mandatory | 3-5 symbols |
| amount | withdrawal amount | integer | mandatory | ISO-4217-3 format. |
Example of a response from the server
HTTP/1.1 200 OK
{
"txId": "4df40f77-2b38-43f4-b264-1d850f5a6715",
"playerId": "john",
"currency": "EUR",
"balance": 1234
}
| Parameter | Description | Type | Requirements | Explanation |
|---|---|---|---|---|
| txId | transaction identifier | string | mandatory | identifier from /transferwallet/deposit or /transferwallet/withdrawal requests |
| playerId | user identifier | string | mandatory | unique for a brand |
| currency | player's balance currency | string | mandatory | 3-5 symbols |
| balance | playr's balance in the chosen currency | integer | mandatory | ISO-4217-3 format. |