Skip to main content

Settle (To be implemented by Operator)

POST{callbackURL}/settle

Endpoint for PHL to payout those bets that have already been placed after draw settlement.

See the Settle retry mechanism for trigger points, retry frequency, and exit criteria.

Envelope

Please encode the following parameters into JSON, then encode them using Base64 and put them into the data field of a generic request/response. Signature: refer to Signature Description.

Request Schema

PropertyField TypeMandatoryDescriptionSample value
orderIdStringYOrder ID20231009144217
requestDateTimeStringYSettlement request date time in ISO 8601 with offset. Format: yyyy-MM-dd'T'HH:mm:ss'+08:00'2023-10-16T11:24:42+08:00
usernameStringYUsername used from the operator.
Note: such field should be unique across operator system
JOHNDOE
totalBetAmountDecimalYTotal Bet Amount100.00
totalWinAmountDecimalYTotal Win Amount, expected operator to credit into player wallet based on this field.100.00
currencyStringYBet Currency. See System Code – CurrencyPHP
bettingsListYEach bet number details in the ticketRefer bettings

bettings

PropertyField TypeMandatoryDescriptionSample value
bettingIdStringYBet unique Id20230609095201001
betCodeStringYBet CodePCSO
betSiteStringYBet SitePCSO
betTypeStringYBet type. See System Code – Bet Type CodeS
gameTypeStringYGame type. See System Code – Game Type CodeSWER3
betAmountStringYBet amount10.00
betNumberStringYBet number5,7,8
bettingOddsListYBetting odds typesRefer bettingOdds
isJackpotBooleanYIs type of jackpotfalse
drawIdStringYDraw Id20230512001001
winStatusBooleanYBetting win statustrue
winningDetailsListYWinning type and amountRefer winningDetails
creationDateStringYTransaction creation date in ISO 8601 with offset. Format: yyyy-MM-dd'T'HH:mm:ss'+08:00'2023-10-16T11:24:42+08:00
updatedDateStringYTransaction updated date in ISO 8601 with offset. Format: yyyy-MM-dd'T'HH:mm:ss'+08:00'2023-10-16T11:24:42+08:00

bettingOdds

PropertyField TypeMandatoryDescriptionSample value
codeStringYWin type code. See System Code – Win Type Code3D
oddsNumberYThe odds900

winningDetails

PropertyField TypeMandatoryDescriptionSample value
codeStringYWin type code. See System Code – Win Type Code3D
amountStringYWinning amount900.00

Response Schema

PropertyField TypeMandatoryDescriptionSample value
codeStringYStatus code, refers Response Code8000
balanceAmountStringYBalance (real credit plus free credit)3900.00
currencyStringYCurrency wallet transfer to/from. See System Code – CurrencyPHP
realCreditStringYReal credit. If your company has not enabled the free credit function, then no need to return this attribute2000.00
freeCreditStringYFree credit. If your company has not enabled the free credit function, then no need to return this attribute1900.00
lastSyncedDateStringYBalance query time in ISO 8601 with offset. Format: yyyy-MM-dd'T'HH:mm:ss'+08:00'2023-10-16T11:24:42+08:00

Request Sample

{
"orderId": "20231009144217",
"requestDateTime": "2023-10-16T11:24:42+08:00",
"username": "JOHNDOE",
"totalBetAmount": 10,
"totalWinAmount": 9505.5,
"currency": "PHP",
"bettings": [
{
"bettingId": "20230609095201001",
"betCode": "PCSO",
"betSite": "PCSO",
"betType": "S",
"gameType": "SWER3",
"betAmount": "10.00",
"betNumber": "5,7,8",
"bettingOdds": [
{
"code": "3D",
"odds": 950.5
}
],
"isJackpot": "false",
"drawId": "20230512001001",
"winStatus": "true",
"winningDetails": [
{
"code": "3D",
"amount": 9505
}
],
"creationDate": "2023-10-16T11:24:42+08:00",
"updatedDate": "2023-10-16T11:24:42+08:00"
},
{
"bettingId": "20230609095201001",
"betCode": "PCSO",
"betSite": "PCSO",
"betType": "S",
"gameType": "EZ2",
"betAmount": "10.00",
"betNumber": "05,07",
"bettingOdds": [
{
"code": "2D",
"odds": 95.5
}
],
"isJackpot": "false",
"drawId": "20230512001001",
"winStatus": "false",
"winningDetails": [],
"creationDate": "2023-10-16T11:24:42+08:00",
"updatedDate": "2023-10-16T11:24:42+08:00"
}
]
}

Response Sample

{
"balanceAmount": 3900.5,
"currency": "PHP",
"realCredit": "2000.00",
"freeCredit": "1900.00",
"lastSyncedDate": "2023-10-16T11:24:42+08:00"
}