Skip to main content

Get Player Balance (To be implemented by Operator)

POST{callbackURL}/getBalance

Endpoint for PHL to sync player's balance from operator periodically.

PHL will only invoke this endpoint when player haven't synced in X minutes of periods or player choose to manually click on refresh button from site.

X = 5 minutes (Configurable in PHL)

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
usernameStringYUsername used from the operator.
Note: such field should be unique across operator system
JOHNDOE
currencyStringYCurrency CodePHP

Response Schema

PropertyField TypeMandatoryDescriptionSample value
codeStringYStatus code, refers Response Code8000
balanceAmountDecimalYBalance (real credit plus free credit)3900.00
currencyStringYCurrency wallet transfer to/from. See System Code – CurrencyPHP
realCreditDecimalYReal credit. If your company has not enabled the free credit function, then no need to return this attribute2000.00
freeCreditDecimalYFree credit. If your company has not enabled the free credit function, then no need to return this attribute1900.00
lastSyncedDateDecimalYBalance 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

{
"username": "JOHNDOE",
"currency": "PHP"
}

Response Sample

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