Skip to main content

Seamless wallet integration (legacy)

[ATTENTION]

Seamless wallet integration is now considered legacy, as it is no longer recommended for use and is not supported.

Therefore, for Casino Seamless wallet integration, please refer to the standard Seamless Integration documentation.

3.1 Settings

To set up Seamless Wallet you should provide us with:

  • CALLBACK_URL. URL for request to get a balance, money deposit/withdrawal/rollback
  • SECRET_KEY. The Key that is used to sign requests.

3.2 Interaction protocol

All requests are to be sent by HTTP(S) using the method POST, using JSON, answers are expected to be made in JSON format.

3.3 Security

In order to provide for security of the API, a secret key is used to sign requests. A request signature has to be validated on your server, and an error should be returned in case it does not match.

Please note that if your secret key is compromised, then immediately notify the support service. To ensure better security please request changes to your key from time to time.

Forming request

To form up a request for signature to JSON - SECRET_KEY is added to the string of the request, afterwards SHA256 algorithm is applied.

A PHP - example of forming a signature:

    // Step 1. Gathering required data
$SECRET_KEY = ''; // Your secret key
$jsonMessage = '{}'; // JSON string

// Step 2. Adding a secret key to the string
// and forming a signature, using SHA256 algorithm
$sign = hash(‘sha256’, $jsonMessage . $SECRET_KEY);

3.4 API methods documentation

3.4.1 Balance request

Request header (HTTP header)
Parameter NameDescriptionOptional / Mandatory
signRequest signatureMandatory
Request parameters
Parameter NameDescriptionOptional / Mandatory
clientIdCasino identifier. Sent in the request lineMandatory
method“balance” Mandatory
sessionIdUnique game session identifierMandatory
userIdUser identifierMandatory
currencyCurrency ISO-codeMandatory
Request validation

Upon receipt it is required to validate the request the following way:

  • Request parameters, marked as Mandatory, must be passed in the request. If this does not happen, then the error “Invalid request params” has to be returned.
  • sign. The request signature must match the parameters passed. In case it does not, then the error “Invalid signature” has to be returned.
  • clientId. If clientId is not valid, then the error “Invalid request params” has to be returned.
  • userId must exist. If a player does not exist, then the error “Player not found” has to be returned.
  • currency must be a valid currency ISO-code that is used in your system. If it is not, then the error “Invalid request params” has to be returned.
  • sessionId must exist. If session does not exist, then the error “Session not found” has to be returned.

If an error occurs please return the parameters errorCode and errorDescription only.

Response parameters

A response to a request is expected to be in JSON. Response parameters:

Parameter NameDescriptionOptional / Mandatory
balanceCurrent player’s balance in CentsMandatory
currencyCurrency ISO-codeMandatory
errorCodeError code, if the request does not come thru successfully, and 0 in any other caseMandatory
errorDescriptionError description in case the request has not been successfully handledOptional
Resending request

If any error message is received, the Request is not going to be resent.

Request example
{
"clientId": "yourClientId",
"method": "balance",
"sessionId": "a7c29f707997ace69478c30dd3cbc8a9",
"userId": "1234656",
"currency": "USD"
}

Response example

{
"balance": 5000,
"currency": "USD",
"errorCode": 0,
"errorDescription": "",
}

3.4.2 Debit request

Request withdraws money from the player’s wallet. This financial transaction will be done when a bet is placed (regular, side or bet behind), freeroll is used or the dealer is tipped.

Request header (HTTP header)
Parameter NameDescriptionOptional / Mandatory
signRequest signatureMandatory
Request parameters
Parameter NameDescriptionOptional / Mandatory
clientIdCasino identifier. Sent in the request lineMandatory
method“debit”Mandatory
userIdUser identifierMandatory
sessionIdUnique game session identifierMandatory
gameIdGame identifierMandatory
amountAmount to debit/credit in centsMandatory
currencyCurrency ISO-codeMandatory
transactionIdTransaction identifier (string data type that can include alphanumeric characters)Mandatory
betTypeType of betMandatory
roundIdGame round identifierOptional
Request validation

Upon receipt of the request it is required to validate it the following way:

  • request parameters, marked as Mandatory, shall be passed in the request. If the parameters are not passed, then the error “Invalid request params” has to be returned.
  • sign. Request signature shall correspond to parameters passed. If not, then the error “Invalid signature” has to be returned.
  • clientId. If clientId is not valid, then the error “Invalid request params” has to be returned.
  • sessionId must exist. If session does not exist, then the error “Session not found” has to be returned.
  • userId must exist. If a player does not exist, then the error “Player not found” has to be returned.
  • currency shall have a valid ISO-code used in your system. If not, then the error “Invalid request params” has to be returned.
  • amount shall always be a positive integer. If not, then the error “Invalid request params” has to be returned.
  • If a transaction with passed transactionId has already been handled on your side, then the error “Transaction is already processed” has to be returned. You should not process the transaction for the second time.
  • If a Player does not have enough funds for withdrawal, the error “Insufficient funds” has to be returned.
  • betType. If you would like forbid specific bet(s) then you could return error “Bet type is not supported” for them.

If the error “Insufficient funds”, “Transaction already processed” or “Bet type is not supported” occurs, it is required to return all parameters. If other errors occur, you should only return parameters errorCode and errorDescription.

Response parameters

A response to a request is expected to be in JSON. Response parameters:

Parameter NameDescriptionOptional / Mandatory
balanceCurrent player’s balance in CentsMandatory
currencyCurrency ISO-codeMandatory
errorCodeError code, if the request does not come thru successfully, and 0 in any other caseMandatory
errorDescriptionError description in case the request has not been successfully handledOptional
Resending request

If any error message is received, the request is not going to be resent.

Request example
{
"clientId": "yourClientId",
"method": "debit",
"sessionId": "a7c29f707997ace69478c30dd3cbc8a9",
"userId": "1234656",
"gameId": "301",
"amount": "1000",
"currency": "USD",
"transactionId": "123456",
"roundId": "",
"betType": "",
}

Response example

{
"balance": 5000,
"currency": "USD",
"errorCode": 0,
"errorDescription": "",
}

3.4.3 Credit player balance request

A request to deposit money to user account.

Request header (HTTP header)
Parameter NameDescriptionOptional / Mandatory
signRequest signatureMandatory
Request parameters
Parameter NameDescriptionOptional / Mandatory
clientIdCasino identifier. Sent in the request lineMandatory
method“credit”Mandatory
userIdUser identifierMandatory
sessionIdUnique game session identifierMandatory
gameIdGame identifierMandatory
amountAmount to debit/credit in centsMandatory
currencyCurrency ISO-codeMandatory
transactionIdTransaction identifier (string data type that can include alphanumeric characters)Mandatory
roundIdGame round identifierOptional
winTypeType of winMandatory
Request validation

Upon receipt of the request it is required to validate it the following way:

  • request parameters, marked as Mandatory, shall be passed in the request. If the parameters are not passed, then the error “Invalid request params” has to be returned.
  • sign. Request signature shall correspond to parameters passed. If not, then the error “Invalid signature” has to be returned.
  • clientId. If clientId is not valid, then the error “Invalid request params” has to be returned.
  • sessionId must exist. If session does not exist, then the error “Session not found” has to be returned.
  • userId must exist. If a player does not exist, then the error “Player not found” has to be returned.
  • currency shall have a valid ISO-code used in your system. If not, then the error “Invalid request params” has to be returned.
  • amount shall always be a positive integer, or 0 if the player did not win any funds. If not, then the error “Invalid request params” has to be returned.
  • If a transaction with passed transactionId has already been handled on your side, then the error “Transaction is already processed” has to be returned. You should not process the transaction for the second time.

If the error “Transaction already processed” occurs, it is required to return all parameters. If other errors occur, you should only return parameters errorCode and errorDescription.

Response parameters

A response to a request is expected to be in JSON. Response parameters:

Parameter NameDescriptionOptional / Mandatory
balanceCurrent player’s balance in CentsMandatory
currencyCurrency ISO-codeMandatory
errorCodeError code, if the request does not come thru successfully, and 0 in any other caseMandatory
errorDescriptionError description in case the request has not been successfully handledOptional
Resending request

If any error message is received, the request is not going to be resent.

Request example
    {
"clientId": "yourClientId",
"method": "credit",
"sessionId": "a7c29f707997ace69478c30dd3cbc8a9",
"userId": "1234656",
"gameId": 301,
"amount": 1000,
"currency": "USD",
"transactionId": "123456",
"roundId": "",
"winType": "",
}
Response example
{
"balance": 5000,
"balance": 5000,
"currency": "USD",
"errorCode": 0,
"errorCode": 0,
"errorDescription": "",
}

3.4.4 Rollback debit transaction

Request header (HTTP header)
Parameter NameDescriptionOptional / Mandatory
signRequest signatureMandatory
Request parameters
Parameter NameDescriptionOptional / Mandatory
clientIdCasino identifier. Sent in the request lineMandatory
method“rollback” Mandatory
userIdUser identifierMandatory
sessionIdUnique game session identifierMandatory
gameIdGame identifierMandatory
amountAmount to debit/credit in centsMandatory
currencyCurrency ISO-codeMandatory
transactionIdTransaction identifier (string data type that can include alphanumeric characters)Mandatory
originalTransactionIdDebit (rolled back) transaction identifierMandatory
roundIdGame round identifierOptional
Request validation

Upon receipt of the request it is required to validate it the following way:

  • request parameters, marked as Mandatory, shall be passed in the request. If the parameters are not passed, then the error “Invalid request params” has to be returned.
  • sign. Request signature shall correspond to parameters passed. If not, then the error “Invalid signature” has to be returned.
  • clientId. If clientId is not valid, then the error “Invalid request params” has to be returned.
  • sessionId must exist. If session does not exist, then the error “Session not found” has to be returned.
  • userId must exist. If a player does not exist, then the error “Player not found” has to be returned.
  • currency shall have a valid ISO-code used in your system. If not, then the error “Invalid request params” has to be returned.
  • amount shall always be a positive integer. If not, then the error “Invalid request params” has to be returned.
  • If a transaction with passed transactionId has already been handled on your side, then the error “Transaction is already processed” has to be returned. You should not process the transaction for the second time.
  • If originalTransactionId doesn’t exist, then the error “Transaction not found” has to be returned.

If the error “Transaction already processed” occurs, it is required to return all parameters. If other errors occur, you should only return parameters errorCode and errorDescription.

Response parameters

A response to a request is expected to be in JSON. Response parameters:

Parameter NameDescriptionOptional / Mandatory
balanceCurrent player’s balance in CentsMandatory
currencyCurrency ISO-codeMandatory
errorCodeError code, if the request does not come thru successfully, and 0 in any other caseMandatory
errorDescriptionError description in case the request has not been successfully handledOptional
Resending request

If any error message is received, the request is not going to be resent.

Request example
{
"clientId": "yourClientId",
"method": "rollback",
"sessionId": "a7c29f707997ace69478c30dd3cbc8a9",
"userId": "1234656",
"gameId": "301",
"amount": "1000",
"currency": "USD",
"transactionId": "123456",
"originalTransactionId": "123455",
"roundId": "",
}

Response example

{
"balance": 5000,
"currency": "USD",
"errorCode": 0,
"errorDescription": "",
}

3.5 Dictionaries

3.5.1 Response error codes

errorCodeerrorDescription
0Completed successfully
1Invalid signature
2Player not found
3Insufficient funds
4Invalid request params
5Session not found
6Transaction is already processed
7Bet type is not supported
8Transaction not found

3.5.2 Bet type codes

CodeDescription
betRegular bet
freeroundFreeround
tipTip
insuranceInsurance
double_betDouble bet
split_betSplit bet
anteAnte
bet_behindBet behind
split_bet_behindSplit bet behind
double_bet_behindDouble bet behind
bet_behind_insuranceInsurance bet behind
callCall

3.5.3 Win type codes

CodeDescription
winWin with regular bet
win_freeWin with freeround
win_insuranceWin with insurance
win_doubleWin with double bet
win_splitWin with split bet
win_anteAnte win
win_bet_behindWin with bet behind
win_split_bet_behindWin with split bet behind
win_double_bet_behindWin with double bet behind
win_bet_behind_insuranceWin with insurance bet behind
win_callWin after call