Game Integration Middleware

https://sisgames.singularqa.uk/game-integration-middleware

https://sisgames.{domain}/game-integration-middleware/api/{version}/{provider}
domain
string required

Deployment domain of the iGaming Platform

Example:
singularqa.uk
version
string required

API version

Example:
v1
provider
string required

Game Provider integrated with the platform

Example:
greentube
API Methods
POST /transaction/bet
bet
POST /transaction/bet

Method is used to withdraw funds from players’s wallet in iGaming Platform. This operation is performed when bet is being placed.

Request body

Object
user_id
integer required

UserID from iGaming Platform

Example:
123
amount
number required

Transaction amount in cents

Example:
4333.43
currency
string required

Transaction currency

Example:
USD
game_id
string

Unique game ID from game provider system

Example:
bookOfGold
provider_transaction_id
string required

Unique transaction ID from game provider system

Max length: 64
Example:
ad123123sdadad1231
reference_id
string nullable

Unique ID of the transaction at the game vendor side. This parameter might only be used if the integration with game vendor is done by aggregator. In this case provider_transaction_id will indicate aggregators transaction ID and reference_id will indicate transaction ID of the game vendor.

round_id
string nullable

Unique round ID from game provider system. Round ID is only mandatory if appropriate plug in is activated. By default round is not mandatory parameter.

Max length: 64
Example:
36546dsasdas23465465asd234
client_ip
string required

IP Address captured from player performing the gameplay

Example:
127.0.0.1
channel
integer nullable

Channel from which gameplay is performed

Enumeration:
0

Unknown

1

Desktop

2

Mobile

3

Teller/Cash-Desk/POS

4

Terminal/ATM/Kios

award_id
string nullable

Player bonus award ID under the scope of which the game round was played

Example:
jskas2910291
request_balance
boolean nullable

Boolean indicating whether user current balance should be returned after transaction or not. Defaults to false if not set

Example:
true
additional_data
Object JSON nullable

Additional data for withdraw transaction containing JSON description of the waget/bet

Example:
{
  "data": {
    "dealer": {
      "name": "Scratchy",
      "uid": "123abcdefg"
    },
    "gameSubType": "dualplay",
    "gameType": "baccarat",
    "id": "158afoofa0b148486c20fbar",
    "participants": [
      {
        "bets": [
          {
            "code": "BAC_BankerPair",
            "description": "Banker Pair",
            "payout": 0,
            "placedOn": "2020-01-07T16:59:50.659Z",
            "stake": 2,
            "transactionId": "1234",
            "owTransactionId": "123456"
          },
          {
            "code": "BAC_Banker",
            "description": "Banker",
            "payout": 3.9,
            "placedOn": "2020-01-07T16:59:50.659Z",
            "stake": 2,
            "transactionId": "1234",
            "owTransactionId": "123456"
          },
          {
            "code": "BAC_PlayerPair",
            "description": "Player Pair",
            "payout": 0,
            "placedOn": "2020-01-07T16:59:50.659Z",
            "stake": 2,
            "transactionId": "1234",
            "owTransactionId": "123456"
          },
          {
            "code": "BAC_Player",
            "description": "Player",
            "payout": 0,
            "placedOn": "2020-01-07T16:59:50.659Z",
            "stake": 2,
            "transactionId": "1234",
            "owTransactionId": "123456"
          },
          {
            "code": "BAC_Tie",
            "description": "Tie",
            "payout": 0,
            "placedOn": "2020-01-07T16:59:50.659Z",
            "stake": 2,
            "transactionId": "1234",
            "owTransactionId": "123456"
          }
        ],
        "casinoId": "thebest00000000001",
        "channel": "mobile",
        "configOverlays": [],
        "currency": "XB2",
        "device": "Generic iPad",
        "os": "iOS 11",
        "playerId": "1234abcdefg",
        "screenName": "Mighty Moe",
        "sessionId": "1234foobar",
        "casinoSessionId": "123456foobar",
        "sideBetBankerPair": "Lose",
        "sideBetPlayerPair": "Lose",
        "subType": "dualplay"
      }
    ],
    "result": {
      "banker": {
        "cards": [
          "5H",
          "4H"
        ],
        "score": 9
      },
      "outcome": "Banker",
      "player": {
        "cards": [
          "7H",
          "6S"
        ],
        "score": 3
      }
    },
    "settledAt": "2020-01-07T17:00:10.858Z",
    "startedAt": "2020-01-07T16:59:25.561Z",
    "status": "Resolved",
    "table": {
      "id": "a1s2d3f4g5h6j7k8",
      "name": "baccarat"
    }
  },
  "timestamp": "2020-01-16T09:25:40.779350",
  "uuid": "7ae7c649-5663-4d6d-89eb-77902728c741"
}
provider
string

Identifier of the provider performing the transaction

Example:
ametic

Responses

200 OK
Body
Object
code
integer required

Status code

Example:
10
message
string required

Operation result description

Example:
success
data
Object required
transaction_id
string uuid required

Transaction ID from Singular iGaming Platform

Example:
52682c71-db9a-4b2e-a101-7148b619bd7e
balance
Object nullable
current_balance
number required

Current balance (in cents) of user in iGaming Platform

Example:
1505.01
currency
string required

Currency for the provided user balance

Example:
USD
Example 1
POST https://sisgames.singularqa.uk/game-integration-middleware/api/v1/greentube/transaction/withdraw HTTP/1.1 

nonce: 1582552119
hash: 4b2b17f68975ba8c806846c5cc898070f3f62423bec9d87f2dbe844b4c14f137
Content-Type: application/json

{
    "user_id": 123,
    "amount": 4333.43,
    "currency": "USD",
    "game_id": "bookOfGold",
    "provider_transaction_id": "ad123123sdadad1231",
    "round_id": "36546dsasdas23465465asd234",
    "client_ip": "127.0.0.1",
    "channel": "5",
    "award_id": "jskas2910291",
    "additional_data": {},
    "request_balance": "true",
    "reference_id": "321654asd21sdas23465465asd2334das"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "code": 10,
    "message": "success",
    "data": {
        "transaction_id": "52682c71-db9a-4b2e-a101-7148b619bd7e",
        "balance": {
            "current_balance": 1505.01,
            "currency": "USD"
        }
    }
}
Classifications & Additional Resources
Status Codes
Name Code
Success 200
WrongRequest 4001
GenericFailed 4002
MissingParameters 4003
IpIsBlocked 4004
AccessDenied 4005
WrongHash 4006

Channel Types

List of all the channels from where a transaction can be performed:

ID Channel
0 Unknown
1 Desktop Web
2 Mobile/Tablet Web
3 Mobile App
4 Terminal