API Documentation

API for Encrypting, Fetching, and Launching Games

Encrypt Request Data

Guide to encrypt data using AES-256-ECB with a secret key, ensuring wallet_amount and timestamp are numbers.

JSON Data Structure

Key Type Description Example Value
user_id string Unique identifier for the user "12345"
wallet_amount string Amount in user's wallet "456.25"
game_uid string Unique identifier for the game "game_789"
token string Authentication token "abcdef123456"
timestamp string Time of request in milliseconds "1700000000000"

AES-256 Encryption Process

Step 1: Prepare the Data

Create a JSON object with user details.

{
  "user_id": "12345",
  "wallet_amount": 456.25,
  "game_uid": "game_789",
  "token": "abcdef123456",
  "timestamp": 1700000000000
}
Note: wallet_amount and timestamp must be numbers, not strings.

Step 2: Convert JSON to String

const data = {
  user_id: "12345",
  wallet_amount: 456.25,
  game_uid: "game_789",
  token: "abcdef123456",
  timestamp: 1700000000000
};
const jsonString = JSON.stringify(data);

Step 3: Encrypt Data (AES-256-ECB)

const crypto = require("crypto");
function aes256Encrypt(aesKey, plaintext) {
    const key = Buffer.from(aesKey, "utf8");
    const cipher = crypto.createCipheriv("aes-256-ecb", key, null);
    cipher.setAutoPadding(true);
    let encrypted = cipher.update(plaintext, "utf8", "base64");
    encrypted += cipher.final("base64");
    return encrypted;
}
const secretKey = "xyz-provide-by-us";
const encryptedText = aes256Encrypt(secretKey, jsonString);
Note: Secret key must be 32 characters (256 bits). Output is Base64 encoded.

Get Provider Game List

Gets information about a collection. For a complete list of this endpoint's possible values, use the collection.json schema file.

Endpoint

URL: https://playwin6.com/providerGame?provider=JiliGaming&count=12&type=Slot Game

Method: GET

Request Parameters

Field Type Description Example Value
provider string Unique identifier for the game provider JiliGaming
count number Number of results to return 12
type string Category or type of game (optional) Slot Game

Response Fields

Field Type Description
game_name string Name of the game
game_code string Unique code of the game
game_type string Category or type of the game
game_image string URL of the game's image

Example Request

library(httr)

res <- VERB("GET", url = "https://api.getpostman.com/collections/12ece9e1-2abf-4edc-8e34-de66e74114d2")

cat(content(res, 'text'))

Example Response

Status: 200 OK

{
  "collection": {
    "info": {
      "name": "Test Collection",
      "description": "This is a test collection that makes a tiny request to Postman Echo service to get the list of request headers sent by a HTTP client.",
      "_postman_id": "12ece9e1-2abf-4edc-8e34-de66e74114d2",
      "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json",
      "updatedAt": "2022-06-16T20:21:13.000Z",
      "fork": {
        "label": "Test Fork",
        "createdAt": "2022-06-16T19:51:44.069Z",
        "from": "12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2"
      }
    },
    "item": [
      {
        "name": "Test GET Response",
        "id": "82ee981b-e19f-962a-401e-ea34ebfb4848",
        "event": [
          {
            "listen": "test",
            "script": {
              "id": "7d2334fc-a84a-4c3d-b26c-7529afa4c0ae",
              "exec": [
                "pm.test(\"Status code is 200\", function () {",
                "    pm.response.to.have.status(200);",
                "});"
              ],
              "type": "text/javascript"
            }
          }
        ],
        "request": {
          "url": "https://echo.getpostman.com/headers",
          "method": "GET",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "response": []
      }
    ]
  }
}

Launch Game API

Gets all of your collections. The response includes all of your subscribed collections.

Endpoint

URL: https://playwin6.com/launchGame?user_id=test001&wallet_amount=1000&game_uid=provider&token=token×tamp=1739445377742&payload=

Method: GET

Request Parameters

Field Type Description Example Value
user_id string User ID used in your project test001
wallet_amount number User's wallet balance in your project 1000
game_uid string Unique identifier for the game provider provider
token string Secure token for validation token
timestamp string Current timestamp in milliseconds 1739445377742
payload string AES-256 encrypted hash -

Response

Example Request

library(httr)

res <- VERB("GET", url = "https://api.getpostman.com/collections")

cat(content(res, 'text'))

Example Response

Status: 200 OK

{
  "collections": [
    {
      "id": "dac5eac9-148d-a32e-b76b-3edee9da28f7",
      "name": "Cloud API",
      "owner": "12345678",
      "createdAt": "2022-04-12T10:29:46.000Z",
      "updatedAt": "2022-04-12T10:29:56.000Z",
      "uid": "12345678-dac5eac9-148d-a32e-b76b-3edee9da28f7",
      "isPublic": true
    },
    {
      "id": "12ece9e1-2abf-4edc-8e34-de66e74114d2",
      "name": "Test Collection",
      "owner": "12345678",
      "createdAt": "2022-01-13T10:21:46.000Z",
      "updatedAt": "2022-02-12T11:29:56.000Z",
      "uid": "12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2",
      "isPublic": false,
      "fork": {
        "label": "Test Fork",
        "createdAt": "2022-06-16T19:51:44.069Z",
        "from": "12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2"
      }
    },
    {
      "id": "f695cab7-6878-eb55-7943-ad88e1ccfd65",
      "name": "Postman Echo",
      "owner": "12345678",
      "createdAt": "2021-04-11T09:18:26.000Z",
      "updatedAt": "2022-05-01T15:29:32.000Z",
      "uid": "12345678-f695cab7-6878-eb55-7943-ad88e1ccfd65",
      "isPublic": true
    }
  ]
}

Authentication

Requires a system-provided token to validate user identity and permissions.

getProvider API

Retrieves provider information.

Endpoint

URL: https://playwin6.com/getProvider

Method: GET

Request Parameters

No parameters required.

Example Request

library(httr)

res <- VERB("GET", url = "https://playwin6.com/getProvider")

cat(content(res, 'text'))

Example Response

Status: 200 OK

No response body provided in the documentation.

Callback Description

Sends game outcome details to the provided URL when results are ready.

Callback Request

Method: POST

{
  "game_uid": "12345",
  "game_round": "67890",
  "bet_amount": "50.00",
  "serial_number": "SN123456789",
  "win_amount": "100.00",
  "member_account": "user123",
  "currency_code": "USD",
  "timestamp": "2025-01-27T12:34:56Z"
}

Callback Response

Responds with updated credit amount and timestamp.

{
  "credit_amount": "1000",
  "timestamp": "2025-01-27T12:34:56Z"
}