Skip to navigation

Get player balance

View as Markdown

Direction: Wuzzlo → Operator

Returns the player’s current wallet balance without mutation.

Processing order

  1. Verify the Wuzzlo Signature against the exact UTF-8 request body.
  2. Validate the operator and user.
  3. Read and return the balance using decimal-safe arithmetic.

Response contract

ScenarioHTTPStatusReturned balance
Valid operator and user200OP_SUCCESSCurrent balance
User does not exist200OP_USER_NOT_FOUND0
Operator is invalid200OP_INVALID_OPERATOR0
Signature is missing or invalid200OP_INVALID_SIGNATURE0

Security: An invalid signature must not change the user’s actual wallet balance.

Authentication

Signaturestring

Wuzzlo-to-Operator: Base64 RSA-SHA256 PKCS#1 v1.5 signature of the exact UTF-8 JSON body, verified with the Wuzzlo public key.

Request

This endpoint expects an object.
operatorIdstringRequired
tokenstringRequired

Operator session token validated through /auth/login.

userIdstringRequired

Response

HTTP 200 wallet response. The body status MUST match exactly one documented scenario requirement; statuses are not interchangeable.

balancedouble

Balance returned for this response scenario. Successful mutations return the calculated post-transaction balance; duplicate and rejected scenarios return the unchanged balance.

statusenum
Exact business status required by the matched endpoint scenario. A different status is a contract failure even when the returned balance is correct.
Allowed values: