• 1. Overview



  • 1.1 Live Casino Product List

    Product ID

    Provider

    Type ID

    Description

    5001

    Evolution


    Note:

    For Evolution integration

    please set iframe

    allowfullscreen =true

    0

    Default lobby

    1

    RNG Black Jack

    2

    RNG Money Wheel

    3

    RNG Roulette Lightning

    4

    RNG Roulette European

    5

    RNG Megaball

    6

    RNG Dragon Tiger

    7

    RNG Baccarat

    8

    RNG Topcard

    5002

    Big Gaming

    0

    Default lobby

    5003

    MG Titanium

    0

    Default lobby

    1

    Grand lobby

    5006

    Dream Gaming

    0

    Default lobby

    5009

    Sexy Gaming

    0

    Default lobby

    5010

    Pragmatic Play

    0

    Default lobby

    5012

    Playtech Casino

    0

    Default lobby

    5016

    Royal Casino Gaming

    0

    Default lobby

    5018

    Bota

    0

    Default lobby

    5019

    Skywind Live Casino

    0

    Default lobby

    5022

    DoWin

    0

    Default lobby

    5024

    Oriental Gaming

    0

    Default lobby

    5026

    Taishan

    0

    Default lobby

    5030

    ICONIC21

    0

    Default lobby

    5034

    GPI

    0

    Default lobby

    5035

    XPG

    0

    Default lobby

    5038

    DB

    0

    Default lobby


  • 1.2 Slot Product List

    Product ID

    Provider

    Type ID

    Description

    5000

    Slot Lobby

    0

    Default slot lobby for all slot games.

    5200

    PP Slot

    Generate with lobby

    PP slot games

    5201

    Habanero

    Generate with lobby

    Habanero slot games

    5202

    Elysium

    Generate with lobby

    Elysium slot games

    5204

    QuickSpin

    Generate with lobby

    Quickspin slot games

    5205

    Spade Gaming

    Generate with lobby

    Spade Gaming slot games

    5208

    World Match

    Generate with lobby

    World Match slot games

    5209

    MG Slot

    Generate with lobby

    MG slot games

    5212

    YL Gaming

    Generate with lobby

    YL Gaming slot games

    5213

    EVO Red Tiger

    Generate with lobby

    EVO Red Tiger slot games

    5214

    Netent

    Generate with lobby

    Netent slot games

    5215

    Dragoon Soft

    Generate with lobby

    Dragoon Soft slot games

    5216

    YGG Drasil

    Generate with lobby

    YGG Drasil slot games

    5217

    Booongo

    Generate with lobby

    Booongo slot games

    5218

    Playson

    Generate with lobby

    Playson slot games

    5219

    Playtech Slot

    Generate with lobby

    Playtech slot games

    5220

    CQ9 Slot

    Generate with lobby

    CQ9 slot games.

    5221

    Skywind

    Generate with lobby

    Skywind slot games.

    5223

    Pgsoft

    Generate with lobby

    Pgsoft slot games.

    5224

    Royal Slot Gaming

    Generate with lobby

    Royal Slot Gaming slot games.

    5225

    EVO Big Time Gaming

    Generate with lobby

    EVO Big Time Gaming slot games.

    5227

    EVO No Limit City

    Generate with lobby

    EVO No Limit City slot games.

    5228

    CC88

    Generate with lobby

    CC88 slot games.

    5230

    FastSpin

    Generate with lobby

    FastSpin slot games.

    5231

    NextSpin

    Generate with lobby

    NextSpin slot games.

    5249

    Naga Games

    Generate with lobby

    Naga Games slot games.

    5253

    Slotmill

    Generate with lobby

    Slotmill slot games.

    5254

    Peter&Sons

    Generate with lobby

    Peter&Sons slot games.

    5255

    Hacksaw Gaming

    Generate with lobby

    Hacksaw Gaming slot games.

    5256

    AvatarUX

    Generate with lobby

    AvatarUX slot games.

    5263

    JiLi

    Generate with lobby

    JiLi slot games.

    5265

    JDB

    Generate with lobby

    JDB slot games.

    5267

    GPI Slot

    Generate with lobby

    GPI slot games.


    ****NOTE****

    Product id 5000, slot lobby is not applicable to perform deposit, withdraw, balance and transfer status.

    Product id 5223 need to auth game before perform deposit.



  • 1.3 Temporary Wallet

    Product ID

    Provider

    Type ID

    Description

    0

    KPLAY

    0

    Temporary Wallet to store failed transaction amount for auto transfer.


    Temporary able to get balance, withdraw, and check transfer status with transaction id for deposit in auth.



    Flow diagram above declare how failed auto transfer transaction being resettle.


  • 1.4 Items to be supplied by KPLAY

    • KPLAY endpoint

    • KPLAY merchant code

    • KPLAY merchant token



  • 2. AUTH


    Merchant will call this API to launch the game. API will automatically create or update member's info.


    HTTP methods : POST

    Live Casino URL : <KPLAY endpoint>/auth


  • 2.1 Request Format

    Header

    Name

    Type

    Mandatory

    Remark

    ag-code

    String

    Y

    ag-token

    String

    Y


    Body

    Name

    Type

    Mandatory

    Remark

    user

    Object

    Y

    user.id

    Number

    Y

    Unique identifier for member


    Length 9

    user.name

    String

    Y

    Unique name for the member. Name can not be changed once it is created.


    Length 3 – 20

    user.language

    String

    Y

    Korean : ko,

    English : en

    user.currency

    String

    Y

    Member's currency

    user.domain_url

    String

    Y

    (FOR SLOT LOBBY)


    This field is required to call back to your domain and redirect to the slot game.

    prd

    object

    Y

    prd.id

    Number

    Y

    Product ID


    Please refer to 1.1 and 1.2


    Product Id 5000, slot lobby is not applicable for deposit.

    prd.type

    Number

    Y

    Game ID, when accessing slot lobby just put '0'

    prd.filter

    Number

    N

    FOR SLOT LOBBY ONLY


    Use for filtering with specific products’ ID when entering the lobby.


    The IDs can refer to 1.2

    prd.open_type

    String

    N

    FOR SLOT LOBBY ONLY


    n – new tab, r – redirect

    Default: n

    prd.skin

    Number

    N

    FOR SLOT LOBBY ONLY


    Slot lobby theme options. Default is "Dark 2".


    Product skins available:-

    1 - Dark 1

    2 - Light 1

    3 - Dark 2

    4 - Light 2

    prd.is_mobile

    boolean

    Y

    If true, url will be for mobile site


    Default: false

    prd.table_id

    string

    N

    Evolution Live Casino Table ID

    Refer to 17. Get Game Table ID

    url




    url.lobby

    String

    N

    lobby url to be send to provider, if provider support call back to lobby

    url.cashier

    String

    N

    cashier url to be send to provider, if provider support call back to cashier



    ****NOTE****

    For slots, the format for the call back URL will be http://{domain_url}/slots/{product_id}/{type}?isMobile=false. Merchants are required to map this call back URL back to this auth method (section 2. User authentication), passing in the {product_id} and {type} variable to launch the slot game.


    ****Mobile URL****

    http://{domain_url}/slots/{product_id}/{type}?isMobile=true


    Request Example

    {

    "user":{

    "id":1,

    "name":"johndoe",

    "language":"en",

    "currency":"KRW",

    "domain_url":"http://slot_game.url"

    },

    "prd":{

    "id":5001,

    "type":0,

    "is_mobile":false,

    "skin":1,

    "open_type":"n",

    "filter":5200

    },

    "url":{

    "lobby":"http://lobby.url/",

    "cashier":"http://cashier.url/"

    }

    }



  • 2.2 Response Format

    Body

    Name

    Type

    Remark

    status

    Number

    0 = error

    1 = success

    user_id

    Number

    KPLAY user ID

    username

    String

    KPLAY username

    launch_url

    String

    Launch URL

    error

    String

    Error message when status = 0

    txn_status

    Number

    Default: Status = 0

    is used to cater for backward compatibility


    Response Example

    When success


    {

    "status":1,

    "user_id":100018,

    "username":"johndoe",

    "launch_url": "http://game.url",

    "txn_status":0

    }



    When error


    {

    "status":0,

    "error":"ACCESS_DENIED",

    "txn_status":0

    }



    Error Message

    Remarks

    INTERNAL ERROR

    KPLAY internal error

    ACCESS_DENIED

    Invalid merchant credential is invalid

    INVALID_USER

    Invalid user id




  • 3. AUTH DEPOSIT


    Merchant will call this API to launch the game. API will automatically create or update member's info.


    ****NOTE****

    Every time when merchant call this API, will withdraw money from the last three deposited product and deposit it to the latest auth product as the auto-transfer.


    If the last three deposited products include 5202, 5204, 5209 & 5219, the system will not withdraw money of decimal value. The decimal money will still remain in that product balance.


    Failed deposit or withdrawal amount for auto-transfer will be stored in product id 0 temporary wallet.


    HTTP methods : POST

    Live Casino URL : <KPLAY endpoint>/auth-deposit


  • 3.1 Request Format

    Header

    Name

    Type

    Mandatory

    Remark

    ag-code

    String

    Y

    ag-token

    String

    Y


    Body

    Name

    Type

    Mandatory

    Remark

    user

    Object

    Y

    user.id

    Number

    Y

    Unique identifier for member


    Length 9

    user.name

    String

    Y

    Unique name for the member. Name can not be changed once it is created.


    Length 3 – 20

    user.language

    String

    Y

    Korean : ko,

    English : en

    user.currency

    String

    Y

    Member's currency

    user.domain_url

    String

    Y

    (FOR SLOT LOBBY)


    This field is required to call back to your domain and redirect to the slot game.

    prd

    object

    Y

    prd.id

    Number

    Y

    Product ID


    Please refer to 1.1 and 1.2


    Product Id 5000, slot lobby is not applicable for deposit.

    prd.type

    Number

    Y

    Game ID, when accessing slot lobby just put '0'

    prd.filter

    Number

    N

    FOR SLOT LOBBY ONLY


    Use for filtering with specific products’ ID when entering the lobby.


    The IDs can refer to 1.2

    prd.open_type

    String

    N

    FOR SLOT LOBBY ONLY


    n – new tab, r – redirect

    Default: n

    prd.skin

    Number

    N

    FOR SLOT LOBBY ONLY


    Slot lobby theme options. Default is "Dark 2".


    Product skins available:-

    1 - Dark 1

    2 - Light 1

    3 - Dark 2

    4 - Light 2

    prd.is_mobile

    boolean

    Y

    If true, url will be for mobile site


    Default: false

    url




    url.lobby

    String

    N

    lobby url to be send to provider, if provider support call back to lobby

    url.cashier

    String

    N

    cashier url to be send to provider, if provider support call back to cashier

    deposit

    Object

    N

    deposit.amount

    Number

    N

    Amount to be deposit into provider wallet

    deposit.txn_id

    Number

    N

    Self generated unique number

    max length = 12



    ****NOTE****

    For slots, the format for the call back URL will be http://{domain_url}/slots/{product_id}/{type}?isMobile=false. Merchants are required to map this call back URL back to this auth method (section 2. User authentication), passing in the {product_id} and {type} variable to launch the slot game.


    ****Mobile URL****

    http://{domain_url}/slots/{product_id}/{type}?isMobile=true


    Request Example

    {

    "user":{

    "id":1,

    "name":"johndoe",

    "language":"en",

    "currency":"KRW",

    "domain_url":"http://slot_game.url"

    },

    "prd":{

    "id":5001,

    "type":0,

    "is_mobile":false,

    "skin":1,

    "open_type":"n",

    "filter":5200

    },

    "url":{

    "lobby":"http://lobby.url/",

    "cashier":"http://cashier.url/"

    },

    "deposit":{

    "amount":10000,

    "txn_id":99999999

    }

    }



  • 3.2 Response Format

    Body

    Name

    Type

    Remark

    status

    Number

    0 = error

    1 = success

    2 = unknown

    user_id

    Number

    KPLAY user ID

    username

    String

    KPLAY username

    launch_url

    String

    Launch URL

    error

    String

    Error message when status = 0

    txn_status

    Number

    Status for the deposit transaction


    0 = failed

    1 = success

    2 = unknown


    Merchant can call 8.1 transfer status api to check deposit/withdraw status and perform retry if require


    Attention: Please note that 'txn_status' may equal to 1 (success) even when 'status' is 0 (error). When txn_status is NOT equal to 0, AG should be responsible to deduct the deposit amount from member account.

    transactions

    Array

    List of transactions processed

    transactions.txn_id

    Number

    For auth deposit transaction which deposit to product id 0 (temporary wallet) is merchant sent transaction id

    transaction id for auto deposit is self generated by Kplay

    transactions.prd_id

    Number

    Product ID

    transactions.amount

    Number

    Amount to be deposit to or withdraw from provider wallet

    transactions.type

    Char

    d = deposit

    w = withdraw

    transactions.txn_status

    Number

    Status for the deposit transaction


    0 = failed

    1 = success


    Merchant can call 8.1 transfer status api to check deposit/withdraw status and perform retry if required

    transactions.error

    String

    Error Message if txn_status = 0


    Response Example

    When success


    {

    "status":1,

    "user_id":100018,

    "username":"johndoe",

    "launch_url": "http://game.url",

    "txn_status":1

    "transactions":[

    {

    "txn_id":99999999,

    "prd_id":0,

    "amount":"10000.00",

    "type":"d",

    "txn_status":1

    }

    {

    "txn_id":10000001,

    "prd_id":5001,

    "amount":"2000.00",

    "type":"w",

    "txn_status":1

    }

    {

    "txn_id":10000002,

    "prd_id":5006,

    "amount":"0.00",

    "type":"w",

    "txn_status":0

    }

    {

    "txn_id":10000003,

    "prd_id":5202,

    "amount":"12000.00",

    "type":"d",

    "txn_status":1

    }

    ]

    }



    When error


    {

    "status":0,

    "error":"ACCESS_DENIED",

    "txn_status":0,

    "transactions":[]

    }



    Error Message

    Remarks

    INTERNAL ERROR

    KPLAY internal error

    ACCESS_DENIED

    Invalid merchant credential is invalid

    INVALID_USER

    Invalid user id




  • 4. DEPOSIT


    Merchant can call this API to deposit money to provider wallet.


    HTTP methods : POST

    URL : <KPLAY endpoint>/deposit



    ****NOTE****

    New member of the provider below have to access the game first before perform DEPOSIT. BOTA, Beter, Taishan, CC88.


  • 4.1 Request Format

    Header

    Name

    Type

    Mandatory

    Remark

    ag-code

    String

    Y

    ag-token

    String

    Y


    Body

    Name

    Type

    Mandatory

    Remark

    user

    Object

    Y

    user.id

    Number

    Y

    Unique identifier for member


    Length 9

    user.name

    String

    Y

    Unique name for member, name can not be changed once it is created.


    Length 3 - 20

    currency

    String

    Member's currency

    prd

    Number

    Y

    Please refer to 1.1 and 1.2


    Product Id 5000, slot lobby is not applicable for deposit.

    amount

    Number

    Y

    Amount to be deposit to provider wallet

    txn_id

    Number

    Y

    Self generated unique number

    max length = 12


    Request Example

    {

    "user":{

    "id":1,

    "name":"johndoe",

    "currency":"KRW"

    },

    "prd":5001,

    "amount":100000,

    "txn_id":1644239819287

    }



  • 4.2 Response Format

    Body

    Name

    Type

    Mandatory

    Remark

    status

    Number

    Y

    0 = error

    1 = success

    user_id

    Number

    Y

    KPLAY user id

    username

    String

    Y

    KPLAY username

    balance

    Decimal (10,2)

    Y

    Provider balance

    txn_id

    Number

    Y

    Unique number send by merchant

    txn_status

    Number

    Y

    Status for the deposit transaction


    0 = failed

    1 = success

    2 = unknown


    Agent may call 8.1 transfer status api to check deposit/withdraw status and perform retry if required

    error

    String

    N

    Error message when status = 0


    Response Example

    When success


    {

    "status":1,

    "user_id":100018,

    "username":AAAjohndoe,

    "balance":100000.00,

    "txn_id":1644239819287,

    "txn_status":1

    }



    When error


    {

    "status":0,

    "error":"INTERNAL_ERROR",

    "txn_status":0

    }





  • 5. WITHDRAW


    Merchant can call this API to withdraw money from provider wallet.


    HTTP methods : POST

    URL : <KPLAY endpoint>/withdraw


  • 5.1 Request Format

    Header

    Name

    Type

    Mandatory

    Remark

    ag-code

    String

    Y

    ag-token

    String

    Y


    Body

    Name

    Type

    Mandatory

    Remark

    user

    Object

    Y

    user.id

    Number

    Y

    Unique identifier for member


    Length 9

    user.name

    String

    Y

    Unique name for member, name can not be changed once it is created.


    Length 3 - 20

    currency

    String

    Member's currency

    prd

    Number

    Y

    Please refer to 1.1 and 1.2


    Product Id 5000, slot lobby is not applicable for withdraw.

    amount

    Decimal(10,2)


    Number for prd_id 5202,5204,5209 & 5219

    Y

    Amount to be deposit to provider wallet


    Note: prd id 5202,5204,5209 & 5219 withdraw does not support decimal.

    txn_id

    Number

    Y

    Self generated unique number

    max length = 12


    Request Example

    {

    "user":{

    "id":18,

    "name":"test_user",

    "currency":"KRW"

    },

    "prd":5001,

    "amount":100000.00,

    "txn_id":1644240365458

    }



  • 5.2 Response Format

    Body

    Name

    Type

    Mandatory

    Remark

    status

    Number

    Y

    0 = error

    1 = success

    user_id

    Number

    Y

    KPLAY user id

    username

    String

    Y

    KPLAY username

    balance

    Decimal (10,2)

    Y

    Provider balance

    txn_id

    Number

    Y

    Unique number send by merchant

    txn_status

    Number

    Y

    Status for the deposit transaction


    0 = failed

    1 = success

    2 = unknown


    Agent may call 8.1 transfer status api to check deposit/withdraw status and perform retry if required

    error

    String

    N

    Error message when status = 0


    Response Example

    When success


    {

    "status":1,

    "user_id":100018,

    "username":AAAjohndoe,

    "prd_id":1,

    "balance":0.00,

    "txn_id":1644240365458,

    "txn_status":1

    }



    When error


    {

    "status":0,

    "error":"INTERNAL_ERROR",

    "txn_status":1

    }





  • 6. BALANCE


    Merchant can call this API to retrieve member available balance from provider’s wallet


    HTTP methods: POST

    URL: <KPLAY endpoint>/balance


  • 6.1 Request Format

    Header

    Name

    Type

    Mandatory

    Remark

    ag-code

    String

    Y

    ag-token

    String

    Y


    Body

    Name

    Type

    Mandatory

    Remark

    user

    Object

    Y

    user.id

    integer

    Y

    KPLAY user id

    user.currency

    String

    Y

    Member's currency

    prd

    Number

    Y

    Please refer to 1.1 and 1.2


    Product Id 5000, slot lobby is not applicable for balance checking.


    Request Example

    {

    "user":{

    "id":10018,

    "currency":"KRW"

    },

    "prd":5001

    }



  • 6.2 Response Format

    Body

    Name

    Type

    Mandatory

    Remark

    status

    Number

    Y

    0 = error

    1 = success

    balance

    Decimal(10, 2)

    Y

    Provider wallet balance

    error

    String

    N

    Error message when status = 0


    Response Example

    When success


    {

    "status":1,

    "balance":"9999.99"

    }



    When error


    {

    "status":0,

    "error":"INTERNAL_ERROR"

    }



    *Note: There are three group of products sharing wallet balance:


    Product ID

    Provider

    Allow to get balance

    5001

    Evo

    yes

    5213

    Red Tiger

    no

    5214

    Netent

    yes

    5227

    No Limit City

    no

    5010

    Pragmatic Casino

    yes

    5200

    Pragmatic Slot

    yes

    5012

    Playtech Casino

    yes

    5202

    Elysium

    yes

    5204

    QuickSpin

    no

    5219

    Playtech Slot

    no

    5003

    MG Titanium

    yes

    5209

    MG Slot

    yes




  • 7. BALANCE ALL


    Merchant can call this API to retrieve member available balance from all provider’s wallet


    HTTP methods : POST

    URL: <KPLAY endpoint>/balance-all


  • 7.1 Request Format

    Header

    Name

    Type

    Mandatory

    Remark

    ag-code

    String

    Y

    ag-token

    String

    Y


    Body

    Name

    Type

    Mandatory

    Remark

    user

    Object

    Y

    user.id

    Integer

    Y

    KPLAY user id

    user.currency

    String

    Y

    Member's currency


    Request Example

    {

    "user":{

    "id":999157,

    "currency":"KRW"

    }

    }



  • 7.2 Response Format

    Name

    Type

    Mandatory

    Remark

    status

    Number

    Y

    0 = error

    1 = success

    data

    Arrays

    Y

    Provider wallet balance

    data.prd_id

    Number

    Y

    Please refer to 1.1 and 1.2

    data.balance

    Decimal (10,2)

    Y

    Provider wallet balance

    data.status

    Number

    Y

    0 = No response from provider

    1 = Received response from provider


    Note: Response received maybe valid or invalid (Subjected to balance amount above)


    Response Example

    When success


    {

    "status": 1,

    "data": [

    {

    "prd_id:5001,

    "balance":100.00,

    "status":1

    },

    {

    "prd_id:5010,

    "balance":100.00,

    "status":1

    },

    {

    "prd_id:5012,

    "balance":8600.00,

    "status":1

    },

    {

    "prd_id:5205,

    "balance":800.00,

    "status":1

    },

    {

    "prd_id:5212,

    "balance":900.00,

    "status":1

    },

    {

    "prd_id:5220,

    "balance":1000.00,

    "status":1

    }

    ]

    }



    When error


    {

    "status":0,

    "error":"INTERNAL_ERROR

    }




    *Note: There’s are three group of products sharing wallet balance in balance all, but only one product ID will represent:


    Product ID

    Provider

    Allow to get balance

    5001

    Evo

    yes

    5213

    Red Tiger

    no

    5214

    Netent

    no

    5227

    No Limit City

    no

    5010

    Pragmatic Casino

    yes

    5200

    Pragmatic Slot

    yes

    5012

    Playtech Casino

    yes

    5202

    Elysium

    no

    5204

    QuickSpin

    no

    5219

    Playtech Slot

    no

    5003

    MG Titanium

    yes

    5209

    MG Slot

    yes




  • 8. TRANSFER STATUS


    Merchant can call this API to check previous deposit / withdraw transaction status.


    HTTP methods : POST

    URL : <KPLAY endpoint>/transfer-status


  • 8.1 Request Format

    Header

    Name

    Type

    Mandatory

    Remark

    ag-code

    String

    Y

    ag-token

    String

    Y


    Body

    Name

    Type

    Mandatory

    Remark

    txn_id

    Number

    Y

    Unique transaction id for the deposit or withdraw


    Request Example

    {

    "txn_id":1644240365458

    }



  • 8.2 Response Format

    Name

    Type

    Mandatory

    Remark

    status

    Number

    Y

    0 = error

    1 = success

    txn_status

    number

    Y

    0 = error

    1 = success

    2 = unknown

    description

    number

    Y

    FAIL

    SUCCESS

    UNKNOWN

    prd_id

    Number

    Y

    Product ID. Please refer to 1.2 Slot Product List

    amount

    Number

    Y

    Transfer amount

    error

    String

    N

    Error message when status = 0


    Response Example

    When success


    {

    "status":1,

    "txn_status":1,

    "description":"SUCCESS",

    "prd_id":5228,

    "amount":"1000.00"

    }



    When error


    {

    "status":0,

    "error":"INTERNAL_ERROR"

    }





  • 9. DATA FEED


    Merchant can call this API to retrieve win loss detail


    HTTP methods : GET

    URL : <KPLAY endpoint>/feed/transaction


  • 9.1 Request Format

    Header

    Name

    Type

    Mandatory

    Remark

    ag-code

    String

    Y

    ag-token

    string

    Y


    Body

    Name

    Type

    Mandatory

    Remark

    start_date

    String

    Y

    Date format YYYY-MM-DD Thh:mm:ssZ

    Timezone: UTC

    Example: 2022-12-12T01:00:00Z

    end_date

    String

    Y

    Date format YYYY-MM-DD Thh:mm:ssZ

    Timezone: UTC

    Example: 2022-12-12T01:01:00Z


    ****NOTE****

    Data can be load in small portions, the period between start_date and end_date should not greater than 5 minutes

    The end_date should not be greater than current time in UTC 0.


    Request Example

  • 9.2 Response Format

    Name

    Type

    Mandatory

    Remark

    status

    Number

    Y

    0 = failed

    1 = success

    data

    array

    Y

    data.prd_id

    Number

    Y

    Product id

    data.txn_id

    String

    Y

    Bet transaction id

    data.game_id

    Number

    Y

    Game id

    data.game_name

    String

    Y

    Game Name

    data.user_id

    Number

    Y

    KPLAY user id

    data.ag_user_id

    Number

    Y

    Merchant user id

    data.username

    String

    Y

    Merchant username

    data.stake

    Decimal (10,2)

    Y

    Stake

    data.payout

    Decimal (10,2)

    Y

    Total payout

    data.bet_time

    String

    Y

    Date format:

    YYYY-MM-DD hh:mm:ss


    Timezone: UTC

    data.settle_time

    String

    Y

    Date format:

    YYYY-MM-DD hh:mm:ss


    Timezone: UTC

    data.type

    Number

    Y

    0 = normal bet, free spin

    1 = promotion

    2 = jackpot

    data.jackpot_amount

    Decimal (10,2)

    Y

    Won jackpot amount

    error

    string

    N

    Error message when status = 0


    Response Example

    When success


    {

    "status":"1",

    "data":[

    {

    "prd_id":5200,

    "txn_id": "2762013201",

    "game_id":1,

    "game_name":"Ocean Lord",

    "user_id":999086,

    "ag_user_id":218,

    "username":"johndoe",

    "stake":2500,

    "payout":800,

    "bet_time":"2021-12-27 06:55:45",

    "settled_time":"2021-12-27 06:55:47",

    "type":2,

    "jackpot_amount":118668.54

    },

    {

    "prd_id":5200,

    "txn_id":"2762015991",

    "game_id":18,

    "game_name":"Let's Shoot",

    "user_id":999086,

    "ag_user_id":218,

    "username":"johndoe",

    "stake":2500,

    "payout":0,

    "bet_time":"2021-12-27 07:21:15",

    "settled_time":"2021-12-27 07:21:15",

    "type":0,

    "jackpot_amount:0

    }

    ]

    }



    When error


    {

    "status":0,

    "error":"INTERNAL_ERROR"

    }





  • 10. GAME LIST


    Merchants can call this API to get product game lists


    HTTP methods : POST

    URL : <KPLAY endpoint>/gamelist



  • 10.1 Request Format

    Header

    Name

    Type

    Mandatory

    Remark

    ag-code

    string

    Y

    ag-token

    string

    Y


    Body

    Name

    Type

    Mandatory

    Remark

    language

    String

    Y

    language option for game name


    Korean: ko,

    English: en


    Request Example

    {

    "language": "en"

    }



  • 10.2 Response Format

    Name

    Type

    Mandatory

    Remark

    status

    Number

    Y

    0 = failed

    1 = success

    game_list

    Array

    Y

    game_list.prd_id

    Number

    Y

    game_list.info

    Array

    Y

    info.game_id

    Number

    Y

    info.game_name

    String

    Y

    info.game_icon

    String

    Y

    Product game icon (For slot game only)

    info.rtp

    String

    Y

    Slot RTP

    info.is_enabled

    Number

    Y

    0 - Disabled

    1 - Enabled

    error

    String

    N

    Error message when status = 0.


    Response Example

    When success


    {

    "game_list":{

    "5001":[

    {

    "game_id": 500015,

    "game_name":"baccarat",

    "rtp":"0",

    "is_enabled": 1

    }

    ],

    "5200":[

    {

    "game_id": 500001,

    "game_name":"Aztec Bonanza",

    "game_icon":"https://slots.kplaycasino.com/pragmatic/slots/id/1.png",

    "game_icon_large":"https://slots.kplaycasino.com/500*500/pragmatic/slots/id/1.png",

    "rtp":"97.06%",

    "is_enabled": 1

    }

    ]

    },

    "status":1

    }



    When error


    {

    "status": 0,

    "error": "INTERNAL_ERROR"

    }





  • 11. Get Game Info (Optional)


    Merchants can call this API to get game info from KPLAY.

    HTTP methods : POST

    URL : <KPLAY endpoint>/gameinfo


  • 11.1 Request Format

    Header

    Field

    Type

    Description

    ag-code

    string

    KPLAY merchant code

    ag-token

    string

    KPLAY merchant token


    Body

    Field

    Type

    Description

    language

    string

    Language option for game name.

    Default English

    Korean : ko, English : en

    Note: 1 call request per minute for game info API


    Request Example

    {

    "language":"en"

    }



  • 11.2 Response Format

    Field

    Type

    Description

    status

    integer

    0 if error

    1 if success

    recommended

    string

    Recommended games

    popular

    string

    Popular games

    new_game

    string

    New games

    game_id

    integer

    Product game ID

    game_name

    string

    Product game name

    error

    string

    Error message when status = 0

    *Note: the JSON object Key value in the response example is the product ID (prd_id)


    Response Example

    When success


    {

    "status":1,

    "recommended":{

    "200":[

    {

    "game_id": 14,

    "game_name":"Wild West Gold"

    },

    "209":[

    {

    "game_id": 62,

    "game_name":"Basketball Star"

    }

    ]

    },

    "popular":{

    "202":[

    {

    "game_id": 466,

    "game_name":"Supa Crew"

    },

    "205":[

    {

    "game_id": 153,

    "game_name":"Christmas Miracles"

    }

    ]

    },

    "new_game":{

    "200":[

    {

    "game_id": 512,

    "game_name":"Kingdom of The Dead"

    },

    "220":[

    {

    "game_id": 277,

    "game_name":"Treasure Pirate"

    }

    ]

    }

    }



    When error


    {

    "status":0,

    "error":"INVALID_PARAMETER"

    }



    Error Message

    Description

    INVALID_PARAMETER

    Invalid secret key

    INVALID_PRODUCT

    Check if product id exists in merchant system

    INTERNAL_ERROR

    KPLAY internal error




  • 12. Get Push Bets (Optional)


    Merchant will call this API from KPLAY to get pushed bet history.


    ● If the result of the game is a tie, transactions that bet on the player and banker will become "pushed" transactions.

    E.g. A player places a bet on either player or banker but the result is tie, then the refunded amount = pushed_amount.

    ● If the pushed amount = 0, it means there is no push in the transaction.

    ● If the transaction is not in the list it means the data is not available yet.

    ● If the txn_id parameter exists, start_date and end_date fields will be ignored and become NOT

    mandatory. It is just specify and grab ONE ONLY.


    Note:

    ● This is used for merchants to get pushed bet history details from Evolution ONLY.

    ● Merchants are required to request date time in UTC+0.

    Only applies to Baccarat and BlackJack games.


    HTTP methods : POST

    URL : <KPLAY endpoint>/getpushbets



  • 12.1 Request Format

    Header

    Field

    Type

    Description

    Mandatory

    ag-code

    string

    KPLAY merchant code

    y

    ag-token

    string

    KPLAY merchant token

    y


    Body

    Field

    Type

    Description

    Mandatory

    start_date

    datetime

    Game start date/time

    y

    (Refer to 12.2 request sample)

    end_date

    datetime

    Game end date/time

    y

    (Refer to 12.2 request sample)

    prd_id

    integer

    Refer to 1.1 Live Casino Product List

    y

    txn_id

    varchar

    Specific transaction ID

    y

    (Refer to 12.2 request sample)


  • 12.2 Request Example

    Using start_date and end_date


    {

    "start_date": "2021-06-01T03:00:00Z",

    "end_date": "2021-06-01T04:50:00Z",

    "prd_id": 1

    }



    **Note: start/end date is only limited to 2 hours.


    Using transaction ID ONLY


    {

    "prd_id" :1,

    "txn_id" :"624610570377457431"

    }



  • 12.3 Response Format

    Field

    Type

    Description

    status

    integer

    0 - error

    1 - success

    data

    object

    Contains transaction ID, pushed amount and pushed amount1 and side_amount.


    pushed_amount (Applicable to baccarat and blackjack)


    Baccarat

    - When the outcome is Tie, the bet amount on player or banker is then pushed


    Blackjack

    - The push will be triggered whenever the dealer and player has the same hand value

    - The rule of push 22 will only occur in Free Bet Blackjack (game id 26)


    pushed_amount1 (Applicable on baccarat only)

    - Push amount added on top of pushed_amount.

    - It will include the bet amount on tie.

    - For example: pushed_amount is 100 and the amount bet on tie amount is 50, pushed_amount1 will be 150


    side_amount (Applicable on baccarat only)

    - Regardless of the result, the total amount of all side bets, except for Banker, Player, and Tie.

    error

    string

    Error message if entered wrong request format.


  • 12.4 Response Example

    When success (using start and end date)


    {

    "status": 1,

    "data": [

    {

    "txn_id": "624610570377450431",

    "pushed_amount": 100,

    "pushed_amount1": 100

    "side_amount": 100

    },

    {

    "txn_id": "624610570377451432",

    "pushed_amount": 0,

    "pushed_amount1": 0

    "side_amount": 0

    }

    ]

    }



    When success (using transaction ID only)


    {

    "status": 1,

    "data": [

    {

    "txn_id": "624610570377457431",

    "pushed_amount": 0,

    "pushed_amount1": 0

    "side_amount": 0

    }

    ]

    }



    When error


    {

    "status": 0,

    "error": "ACCESS_DENIED"

    }



    Error Messages

    Description

    ACCESS_DENIED

    When merchant credentials is invalid.

    INVALID_PRODUCT

    When product is invalid

    INVALID_DATE

    When an entered date is invalid

    INTERNAL ERROR

    KPLAY internal error

    REQUEST_TOO_FREQUENT

    The same product ID is called twice within a minute.




  • 13. WITHDRAW ALL


    Merchant can call this API to withdraw money from all available products wallet for member


    HTTP methods : POST

    URL : <KPLAY endpoint>/withdraw-all


  • 13.1 Request Format

    Header

    Name

    Type

    Mandatory

    Remark

    ag-code

    String

    Y

    ag-token

    String

    Y


    Body

    Name

    Type

    Mandatory

    Remark

    user

    String

    Y

    user.id

    Number

    Y

    Unique identifier for member


    Length 9

    user.name

    String

    Y

    Unique name for member, name can not be changed once it is created.


    Length 3 - 20

    user.currency

    String

    Y

    Member's currency

    txn_id

    string

    Y

    Self generated unique number

    max length = 12


    Request Example

    {

    "user":{

    "id":18,

    "name":"test_user",

    "currency":"KRW",

    }

    "txn_id":123456

    }



  • 13.2 Response Format

    Body

    Name

    Type

    Mandatory

    Remark

    status

    Number

    Y

    0 = failed

    1 = success

    user_id

    Number

    Y

    username

    Number

    Y

    transaction

    Array

    Y

    transaction.prd_id

    Number

    Y

    transaction.txn_id

    Number

    Y

    transaction.amount

    Decimal (10,2)

    Y

    Money withdrawal

    transaction.status

    Number

    Y

    0 = failed

    1 = success

    2 = unknown

    message

    String

    Y

    Message show for status of the withdrawal process

    error

    String

    N

    Error message when status = 0


    Response Example

    When success


    {

    "status":1,

    "user_id":999157,

    "username":"AAAchowtest71",

    "transaction":[

    {

    "prd_id":0,

    "txn_id":null,

    "amount":"0.00",

    "status":1

    "message":"Balance already 0, no perform withdraw"

    },

    {

    "prd_id":5001,

    "txn_id":null,

    "amount":"-1.00",

    "status":1

    "message":"Fail when get balance from provider"

    },

    {

    "prd_id":5010,

    "txn_id":null,

    "amount":"0.00",

    "status":1

    "message":"Balance already 0, no perform withdraw"

    },

    {

    "prd_id":5012,

    "txn_id":null,

    "amount":"0.00",

    "status":1

    "message":"Balance already 0, no perform withdraw"

    },

    {

    "prd_id":5200,

    "txn_id":111111111,

    "amount":"200.00",

    "status":1

    "message":"Success"

    }

    ]

    }



    When error


    {

    "status":0,

    "error":"INTERNAL_ERROR"

    }



    Condition

    Message

    When txn_id = 0 or "null" and amount = "0.00"

    Balance already 0, no perform withdraw

    When amount = "-1.00"

    Fail when get balance from provider

    When txn_id not = 0 or "null" and amount = "0.00"

    Success




  • 14. AVAILABLE PRODUCT


    Merchant can call this API to get product id of all the providers


    HTTP methods : GET

    URL : <KPLAY endpoint>/available-product


  • 14.1 Request Format

    Header

    Name

    Type

    Mandatory

    Remark

    ag-code

    String

    Y

    ag-token

    String

    Y


  • 14.2 Response Format

    Body

    Name

    Type

    Mandatory

    Remark

    status

    Number

    Y

    0 = failed

    1 = success

    prd

    Arrays

    Y

    prd.prd_id

    Number

    Y

    Product id


    Response Example

    When success


    {

    "status":1,

    "prd":[

    {

    "prd_id":5001

    },

    {

    "prd_id":5010

    },

    {

    "prd_id":5012

    },

    {

    "prd_id":5200

    },

    {

    "prd_id":5205

    }

    ]

    }



    When error


    {

    "status":0,

    "error":"INTERNAL_ERROR"

    }





  • 15. BET DETAIL


    Merchant can call this API to get the detail of the bet


    HTTP methods : POST

    URL : <KPLAY endpoint>/betresults


  • 15.1 Request Format

    Header

    Name

    Type

    Mandatory

    Remark

    ag-code

    String

    Y

    ag-token

    String

    Y


    Body

    Name

    Type

    Mandatory

    Remark

    lang

    String

    Y

    Korean: ko,

    English: en

    prd_id

    Number

    Y

    txn_id

    string

    Y


    Request Example

    {

    "lang":"en",

    "prd_id":5001,

    "txn_id":"8888888888"

    }



  • 15.2 Response Format

    If the txn id is valid and successfully retrieves bet detail, we will return a URL that will open the bet detail page. If txn id is not valid or fails to retrieve bet detail, we will respond with the error code.


    Body

    Name

    Type

    Mandatory

    Remark

    status

    Number

    Y

    0 = failed

    1 = success

    error

    String

    N


    Response Example

    When success


    When error


    {

    "status":0,

    "error":"GAME_INFO_NOT_FOUND"

    }





  • 16. REMAINING DEPOSIT


    Merchant can call this API to get AG available deposit and given deposit.

    *Note: For get remaining deposit api, no request body is needed. And merchant is restricted to 1 minute per request to get remaining deposit.


    HTTP methods : GET

    URL : <KPLAY endpoint>/remainingdeposit


  • 16.1 Request Format

    Header

    Name

    Type

    Mandatory

    Remark

    ag-code

    String

    Y

    ag-token

    String

    Y


  • 16.2 Response Format


    Body

    Name

    Type

    Mandatory

    Remark

    given_deposit

    Number

    Y

    available_deposit

    Number

    Y

    status

    Number

    Y

    0 = failed

    1 = success


    Response Example

    When success


    {

    "given_deposit":10000000,

    "available_deposit":1000000,

    "status":1

    }



    When error


    {

    "status":0,

    "error":"INTERNAL_ERROR

    }





  • 17. Get Game Table ID API


    Merchants can call this API to get table ID(s) of Evolution based on their current skin setting from KPLAY. For direct launch to specific table purposes.


    HTTP methods : GET

    URL : <KPLAY endpoint>/getgametable


  • 17.1 Request Format

    Header

    Field

    Type

    Description

    ag-code

    String

    KPLAY merchant code

    ag-token

    String

    KPLAY merchant token



  • 17.2 Response Example

    Field

    Type

    Desciptipn

    status

    Int

    0 - error
    1 - success

    skin_id

    Int

    The current skin ID of the AG.

    game_name

    String

    The name of the game, from Evolution.

    table_id

    String

    The table ID for direct launch to a specific game table.

    game_id

    Int

    The game ID.

    game_type

    String

    Game Type

    error

    String

    Error message when status = 0


  • 17.3 Response Example


    When success


    {

    "status":1,

    "tables":[

    {

    "skin_id": 9,

    "game_name":"Golden Wealth Baccarat",

    "game_id": 1,

    "table_id":[

    "gwbaccarat000001",

    "n7ltqx5j25sr7xbe"

    ],

    "game_type":"Baccarat"

    },

    {

    "skin_id": 9,

    "game_name":"Baccarat Control Squeeze",

    "game_id": 92,

    "table_id":[

    "k2oswnib7jjaaznw"

    ],

    "game_type":"Baccarat"

    }

    ]

    }







  • 18. ERROR MESSAGE



  • 18.1 List of API error message

    Header

    Error Message

    Description

    ACCESS_DENIED

    Invalid AG credential.

    INVALID_PRODUCT

    Invalid Product

    INVALID_USER

    Invalid user information

    INVALID_PARAMETER

    Missing domain url

    INVALID_DATA_TYPE

    Invalid format for amount field

    MISSING_TXNID

    Missing deposit txn_id

    DUPLICATED_TXNID

    Duplicated txn_id

    UNABLE_DEPOSIT_SLOT_LOBBY

    Unable deposit with prd_id = 5000

    INTERNAL_ERROR

    Unknown error

    INVALID_NUMBER_FORMAT

    Invalid format for number field

    UNABLE_DEPOSIT_DECIMAL

    Amount contain decimal value

    INVALID_TXN_ID

    txn_id exist or txn_id longer than 12 digits

    UNABLE_DEPOSIT_TEMP_WALLET

    Unable deposit to temporary wallet

    EXCEED_DEPOSIT_LIMIT

    Deposit amount exceed deposit limit

    UNABLE_WITHDRAW_DECIMAL_FROM_SPECIFIC_PRODUCT

    When withdraw from specific product with decimal amount

    INVALID_CREDENTIAL

    Member ID not belong to AG

    SHARED_WALLET

    Shared wallet please refer to note under section 6. Balance

    TXN_ID_NOT_EXIST

    txn_id not exist

    INVALID_LANGUAGE

    Invalid language

    GAME_INFO_NOT_FOUND

    Game round doesn’t exist in system

    MISSING_LANGUAGE_FIELD

    Language field missing

    MISSING_PRD_ID_FIELD

    Product ID missing

    REQUEST_TOO_FREQUENT

    Specific API unable to call too frequent

    INVALID_START_DATE

    Invalid start date

    INVALID_END_DATE

    Invalid end date

    PERIOD_EXCEED_5_MINUTES

    The Gap between start time and end time more than 5 minutes

    PREV_DEPOSIT_PENDING

    The Previous deposit transfer on the particular member still pending, deposit and transfer status API unavailable until the deposit transfer complete



  • 19. Appendix


  • 19.1 Slot Lobby Skins

    1 - Dark 1



    2 - Light 1



    3 - Dark 2



    4 - Light 2