WAIJA

Callbacks / Balance

Callback Action: balance

Asked at session start so Waija can read the player’s current wallet.

When

Start of a game session

Call

GET to your callback URL

Return

{ error, balance } — balance in cents

HTTP

Always 200 — errors live in the JSON body

Operator

Look up the player. Unknown / bad signature → error: 2, balance: 0

call_id is a unique reference on every callback.

Request

{
  "username": "yourPlayerId9959",
  "currency": "USD",
  "action": "balance",
  "call_id": "e2b801a1-e098-411c-8940-00514cb8070c",
  "timestamp": "1696463571",
  "key": "6c4e5fd14e796284b327bb4f9603aee4"
}

Responses

$2.50 → 250.

Successful

{
  "error": 0,
  "balance": 250
}

Insufficient balance

Rare on balance (nothing is deducted). Same shape as debit if you must refuse.

{
  "error": 1,
  "balance": 250
}

Processing error

Player not found or invalid signature.

{
  "error": 2,
  "balance": 0
}