Mangoplay API Document (1.0.0)

Download OpenAPI specification:Download

Request base url : https://api-agg.mangoplay.com/

Agent APIs

Fetch and update user details

Fetch daily report

Return daily report

Authorizations:
Mango-System-X-AuthorizationSignature
query Parameters
endDate
required
string
Example: endDate=2023-09-02 00:00:00

End date format YYYY-MM-DD HH:MM:SS

filterBy
required
string
Example: filterBy=dateBetweenAndPlayerList

Type of filter

dateBetweenAndPlayerList dateBetweenAndPlayerListByProvider dateBetweenAndProviderListByAgent dateBetweenAndReportDateList

playerUsername
string
Example: playerUsername=user_test_mg005

Player username

providerNames
Array of strings

Provider names

Baccarat TigerDragon Balangkai Sicbo Hilo RollADice Roulette Fantan

startDate
required
string
Example: startDate=2023-09-01 00:00:00

Start date format YYYY-MM-DD HH:MM:SS

Responses

Response samples

Content type
application/json
{
  • "turnOver": 1900,
  • "validBet": 1900,
  • "winLose": 1400,
  • "winLoseWithOutTurnOver": -500,
  • "commission": 0,
  • "total": -500,
  • "winLoseAgent": 465,
  • "commissionAgent": 0,
  • "totalAgent": 465,
  • "winLoseCompany": 35,
  • "commissionCompany": 0,
  • "totalCompany": 35,
  • "data": {
    }
}

Fetch list of players

Returns player pagination's

Authorizations:
Mango-System-X-AuthorizationSignature
query Parameters
filterBy
required
string
Example: filterBy=all/username

Type of filter

username
string
Example: username=user_test_mg005

Username

Responses

Response samples

Content type
application/json
{
  • "content": [
    ],
  • "pageable": {
    },
  • "totalPages": 1,
  • "totalElements": 2,
  • "last": true,
  • "size": 25,
  • "number": 0,
  • "sort": {
    },
  • "numberOfElements": 22,
  • "first": true,
  • "empty": false
}

Fetch player data by playerId

Return player data

Authorizations:
Mango-System-X-AuthorizationSignature
query Parameters
id
required
integer <int64>
Example: id=125

Player Id

Responses

Response samples

Content type
application/json
{
  • "id": 1,
  • "displayName": "Test 001",
  • "agentType": "TRANSFER",
  • "agentId": 1,
  • "isMa": false,
  • "isActive": true,
  • "currency": "THB",
  • "userId": 5,
  • "username": "mgt_test1125001",
  • "status": "APPROVED",
  • "betLimit": null
}

Fetch user bet histories

Return user bet histories

Authorizations:
Mango-System-X-AuthorizationSignature
query Parameters
endDate
required
string
Example: endDate=2023-09-02 00:00:00

End date format YYYY-MM-DD HH:MM:SS

startDate
required
string
Example: startDate=2023-09-01 00:00:00

Start date format YYYY-MM-DD HH:MM:SS

username
required
string
Example: username=user_test_mg005

Player username

Responses

Response samples

Content type
application/json
{
  • "turnOver": 1300,
  • "validBet": 1300,
  • "winLose": 1300,
  • "winLoseWithOutTurnOver": 0,
  • "betGames": {
    }
}

Get player deal data

Return player deal data

Authorizations:
Mango-System-X-AuthorizationSignature
path Parameters
dealId
required
string
Example: FUN-GRASP-02-20250717082645-6480-8ECEHSGMYSTFXW6BNWAJ_S

Deal id

query Parameters
AgentPrefixId
string
Example: AgentPrefixId=MGTSTG

Agent prefix id

Security
string
Example: Security=ASW29jfP133KJSSa4

Agent security key

Responses

Fetch wallet transactions

Return wallet transactions

Authorizations:
Mango-System-X-AuthorizationSignature
query Parameters
filterBy
string
Example: filterBy=all/username

Type of filter

type
string
Example: type=BET

Type of transaction

BET SETTLE CANCEL_SETTLE CANCEL_SETTLE_NO_SETTLE DEPOSIT WITHDRAW

username
string
Example: username=user_test_mg005

Player username

Responses

Response samples

Content type
application/json
{
  • "content": [
    ],
  • "pageable": {
    },
  • "totalPages": 1,
  • "totalElements": 2,
  • "last": false,
  • "size": 100,
  • "number": 0,
  • "sort": {
    },
  • "numberOfElements": 100,
  • "first": true,
  • "empty": false
}

Bet Limit APIs

Read and set the per-game bet limits your players see in the game lobby — for your whole agent, or for one player at a time. MangoPlay sets a ceiling for each game; you may set any range inside that ceiling but never above it, and that holds for a single player just as it does for the agent.

Get bet limits

Returns the bet limits currently in effect for every game MangoPlay has enabled for your agent, together with the ceiling you are allowed to move inside. source tells you whether a game is still on the MangoPlay default (MANGOPLAY) or on a value you set yourself (AGG).

Authorizations:
AgentPrefixIdSecurity
header Parameters
AgentPrefixId
required
string

AgentPrefixId

Security
required
string

Security

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "Success [getBetLimits]",
  • "data": {
    }
}

Set bet limits

Sets the bet limits for the games you send. Games you do not send are left exactly as they are, so you never have to resend your whole configuration.

For each game send either list (the full tier ladder that replaces your current one for that game) or reset: true (drop your own value and go back to the MangoPlay default). Every tier must sit inside the ceiling returned by GET /api/v1/open/config/betLimitsmaxLimit may not exceed it and minLimit may not fall below it. If any game fails the check, nothing is written at all and the response lists every game that failed.

Players pick up the new limits the next time they enter a game.

Authorizations:
AgentPrefixIdSecurity
header Parameters
AgentPrefixId
required
string

AgentPrefixId

Security
required
string

Security

Request Body schema: application/json
required

Request DTO

required
Array of objects

Only the games you want to change. Maximum 20 entries.

Responses

Request samples

Content type
application/json
{
  • "betLimits": [
    ]
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "Success [updateBetLimits]",
  • "data": {
    }
}

Get bet limits for one player

Returns the bet limits in effect for a single player. source tells you which layer each game's value comes from — PLAYER (set for this player), TAG (a tier), AGG (your agent-wide value) or MANGOPLAY (our default) — so you can see at a glance why a game shows the value it does.

Send username without your agent prefix; it is added automatically, the same as every other endpoint.

Authorizations:
AgentPrefixIdSecurity
query Parameters
username
required
string
Example: username=player001

Player username without the agent prefix

header Parameters
AgentPrefixId
required
string

AgentPrefixId

Security
required
string

Security

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "Success [getPlayerBetLimits]",
  • "data": {
    }
}

Set bet limits for one player

Sets bet limits for a single player. This is the most specific layer — it wins over a tier and over your agent-wide value — but it still may not exceed the ceiling MangoPlay set for your agent.

Same rules as the agent-wide endpoint: games you do not send are left alone, each game takes either list or reset: true, and if any game fails the ceiling check nothing is written at all.

You may set one player higher than your own agent-wide value (for a VIP, say) as long as it stays inside the MangoPlay ceiling. The new limits apply the next time the player enters a game.

Authorizations:
AgentPrefixIdSecurity
header Parameters
AgentPrefixId
required
string

AgentPrefixId

Security
required
string

Security

Request Body schema: application/json
required

Request DTO

username
required
string

Player username without the agent prefix — it is added automatically.

required
Array of objects

Only the games you want to change for this player. Maximum 20 entries.

Responses

Request samples

Content type
application/json
{
  • "username": "player001",
  • "betLimits": [
    ]
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "Success [updatePlayerBetLimits]",
  • "data": {
    }
}

Reconciliation APIs

Check and close bills that were left open by a timeout. Use these instead of raising a manual ticket when a bet shows as failed or a settle is still pending on your side but you believe the opposite is true.

Get bet info

Returns a bet, its settle status, and the most recent request/response exchanged with your wallet for that deal. Call this first to decide whether a deal actually needs reconciling. Accepts a deal_id with or without the _B / _S suffix. You can only read deals that belong to your own agent.

Authorizations:
AgentPrefixIdSecurity
header Parameters
AgentPrefixId
required
string

AgentPrefixId

Security
required
string

Security

Request Body schema: application/json
required

Request DTO

deal_id
required
string

Deal id of the bet. Accepted with or without the _B / _S suffix — it is normalised automatically.

Responses

Request samples

Content type
application/json
{
  • "deal_id": "HL-B20260729081834-1785313129946-DH0L94K3_B"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "Success [betInfo]",
  • "data": {
    }
}

Reconcile and settle a deal

Closes a bill that our side marked FAILED because the call to your wallet timed out, even though you actually applied the debit. The bet is flipped to SUCCESS and then settled against the round result.

This call is idempotent: if a settle already exists it only re-calls your wallet and never issues a second payout.

Call it only after the round has closed, because the payout is computed from the round result. Use betInfo first to confirm the deal really is in the state you think it is.

Authorizations:
AgentPrefixIdSecurity
header Parameters
AgentPrefixId
required
string

AgentPrefixId

Security
required
string

Security

Request Body schema: application/json
required

Request DTO

deal_id
required
string

Deal id of the bet. Accepted with or without the _B / _S suffix — it is normalised automatically.

Responses

Request samples

Content type
application/json
{
  • "deal_id": "HL-B20260729081834-1785313129946-DH0L94K3_B"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "Success [reSettle]",
  • "data": {
    }
}

Seamless Wallet APIs

Create Player

Create player

Authorizations:
AgentPrefixIdSecurity
path Parameters
action
required
string

action

header Parameters
AgentPrefixId
required
string

AgentPrefixId

Security
required
string

Security

Request Body schema: application/json
required

Request DTO

username
string
password
string
displayName
string
profileImage
string

Responses

Request samples

Content type
application/json
{
  • "username": "mgt_test01",
  • "password": "apb@1se@esq",
  • "displayName": "mgt_test01",
  • "profileImage": "N/A"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "Success [createPlayer]"
}

Play game

Generate play URL

Authorizations:
AgentPrefixIdSecurity
path Parameters
action
required
string

action

header Parameters
AgentPrefixId
required
string

AgentPrefixId

Security
required
string

Security

Request Body schema: application/json
required

Request DTO

username
string
password
string
lang
string
returnURL
any

Responses

Request samples

Content type
application/json
{}

Edit player password

Edit the player password

Authorizations:
AgentPrefixIdSecurity
path Parameters
action
required
string

action

header Parameters
AgentPrefixId
required
string

AgentPrefixId

Security
required
string

Security

Request Body schema: application/json
required

Request DTO

username
string
password
string

Responses

Request samples

Content type
application/json
{
  • "username": "mgt_test01",
  • "password": "apb@1se@esq"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "Success [editPassword]"
}

Transfer Wallet APIs

Create Player

Create player

Authorizations:
AgentPrefixIdSecurity
path Parameters
action
required
string

action

header Parameters
AgentPrefixId
required
string

AgentPrefixId

Security
required
string

Security

Request Body schema: application/json
required

Request DTO

username
string
password
string
displayName
string
profileImage
string

Responses

Request samples

Content type
application/json
{
  • "username": "mgt_test01",
  • "password": "apb@1se@esq",
  • "displayName": "mgt_test01",
  • "profileImage": "N/A"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "Success [createPlayer]"
}

Play game

Generate play URL

Authorizations:
AgentPrefixIdSecurity
path Parameters
action
required
string

action

header Parameters
AgentPrefixId
required
string

AgentPrefixId

Security
required
string

Security

Request Body schema: application/json
required

Request DTO

username
string
password
string
lang
string
returnURL
any

Responses

Request samples

Content type
application/json
{}

Edit player password

Edit the player password

Authorizations:
AgentPrefixIdSecurity
path Parameters
action
required
string

action

header Parameters
AgentPrefixId
required
string

AgentPrefixId

Security
required
string

Security

Request Body schema: application/json
required

Request DTO

username
string
password
string

Responses

Request samples

Content type
application/json
{
  • "username": "mgt_test01",
  • "password": "apb@1se@esq"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "Success [editPassword]"
}

Logout

Force logout player

Authorizations:
AgentPrefixIdSecurity
path Parameters
action
required
string

action

header Parameters
AgentPrefixId
required
string

AgentPrefixId

Security
required
string

Security

Request Body schema: application/json
required

Request DTO

username
string
password
string

Responses

Request samples

Content type
application/json
{
  • "username": "mgt_test01",
  • "password": "apb@1se@esq"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "Success [logOut]"
}

Edit player status

Change the player status

Authorizations:
AgentPrefixIdSecurity
path Parameters
action
required
string

action

header Parameters
AgentPrefixId
required
string

AgentPrefixId

Security
required
string

Security

Request Body schema: application/json
required

Request DTO

username
string
status
string
Enum: "APPROVED" "BANNED" "BLACKLIST" "HOLD" "SUSPECT"

Responses

Request samples

Content type
application/json
{
  • "username": "mgt_test01",
  • "status": "APPROVED"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "Success [editStatusPlayer]"
}

Get player credit

fetch player credit (balance)

Authorizations:
AgentPrefixIdSecurity
path Parameters
action
required
string

action

header Parameters
AgentPrefixId
required
string

AgentPrefixId

Security
required
string

Security

Request Body schema: application/json
required

Request DTO

username
string

Responses

Request samples

Content type
application/json
{
  • "username": "mgt_test01"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "balance": 4334637.5,
  • "txId": null
}

Deposit player credit

Deposit credit to player (Add Balance)

Authorizations:
AgentPrefixIdSecurity
path Parameters
action
required
string

action

header Parameters
AgentPrefixId
required
string

AgentPrefixId

Security
required
string

Security

Request Body schema: application/json
required

Request DTO

username
string
amount
number
description
string
requestId
string

Responses

Request samples

Content type
application/json
{
  • "username": "mgt_test01",
  • "amount": 1000,
  • "description": "deposit player credit",
  • "requestId": "TXN-04122024-MG-1230-TTXXSAXDWF"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "balance": 4434637.5,
  • "txId": "65c9ac395b596bfd38509b01"
}

Withdraw player credit

Withdraw player credit

Authorizations:
AgentPrefixIdSecurity
path Parameters
action
required
string

action

header Parameters
AgentPrefixId
required
string

AgentPrefixId

Security
required
string

Security

Request Body schema: application/json
required

Request DTO

username
string
amount
number
description
string
requestId
string

Responses

Request samples

Content type
application/json
{
  • "username": "mgt_test01",
  • "amount": 1000,
  • "description": "withdraw player credit",
  • "requestId": "TXN-04122024-MG-1230-TTXXSAXDWF"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "balance": 4434637.5,
  • "txId": "65c9ac52602ccca94a1e57a2"
}