Store balance
Store balance is a player's internal wallet on your store. The player tops it up with real money and spends it on products.
How balance works
- The player tops up their balance via any connected payment method
- Funds are credited to
PlayerWallet - The player purchases products — the amount is deducted from the balance
- The full operation history is stored in
WalletLedger(immutable log)
Player wallet (PlayerWallet)
| Field | Description |
|---|---|
balanceMinor | Main balance (in kopecks) |
bonusMinor | Bonus balance (promo codes, bonuses) |
currency | Currency (always RUB) |
Deduction priority: bonus balance is spent first, then main balance.
WalletLedger
Every balance operation creates a log entry:
| Operation | Description |
|---|---|
TOPUP | Balance top-up |
PURCHASE | Product purchase |
REFUND | Refund |
BONUS | Bonus credit |
PROMO | Promo code |
ADJUST | Manual adjustment by admin |
Fees
- Top-up: fee charged by the payment provider (depends on the method)
- Purchase: no fee — the player pays exactly the product price
- Tirify: does not participate in fund movement. Money goes directly from the player to the owner
Top-up
The player tops up their balance in a modal:
- Clicks "Top up" (in the header or account area)
- Selects an amount or enters a custom one
- Selects a payment method
- Is redirected to the payment page
- After payment, balance updates automatically
Top-up bonuses: the owner can configure a bonus scale (e.g. +10% on top-ups from 1000 ₽).
Manual adjustment
An admin can adjust a player's balance manually:
- Admin panel → Players → select a player → "Wallet"
- Enter an amount (positive or negative)
- Enter a reason
- The entry is recorded in WalletLedger with type
ADJUST
Next steps
- Payment methods — how to connect
- Transactions — operation history