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
}

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"
}