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 | Scenario | HTTP | Status | Returned balance | | --- | ---: | --- | ---: | | Valid operator and user | `200` | `OP_SUCCESS` | Current balance | | User does not exist | `200` | `OP_USER_NOT_FOUND` | `0` | | Operator is invalid | `200` | `OP_INVALID_OPERATOR` | `0` | | Signature is missing or invalid | `200` | `OP_INVALID_SIGNATURE` | `0` | > **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.