Get User Balance

The OMG platform calls this interface to obtain the player's current balance.

GetBalance

This API is provided by the integrator and is called by the OMG platform.

POST {AGENT_URL}/api/luck/balance/get_balance?trace_id=omg_trace_id

{AGENT_URL} is the callback address entered in the integrator's backend.

Headers

Name
Value

Content-Type

"application/json; charset=utf-8"

sign

"omg_sign_string"

Please refer to the Signature Algorithm and Example page for details on the signature algorithm.

Body

Name
Type
Description

app_id

string

The unique identifier for the user, available in the merchant backend.

uname

string

User ID provided by the integrator

timestamp

integer

timestamp (in seconds)

game_id

integer optional

Game ID

player_login_token

stringoptional

User Token provided by the integrator

OMG Platform Request Parameter Example

Integrator Response Parameter Example

Integrator Response Parameter Example Description

The OMG platform only records the numerical value of the balance, and the specific currency unit is determined based on the accessing party's backend selection.

Name
Required
Type
Description

data

Yes

object

Response Data

balance

Yes

string (decimal)

User balance, supports up to 4 decimal places

code

Yes

integer

Status Code

msg

Yes

string

Message

Error Code

For more error codes, please refer to the General Error Codes page description.

Last updated