Skip to main content

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

  1. The player tops up their balance via any connected payment method
  2. Funds are credited to PlayerWallet
  3. The player purchases products — the amount is deducted from the balance
  4. The full operation history is stored in WalletLedger (immutable log)

Player wallet (PlayerWallet)

FieldDescription
balanceMinorMain balance (in kopecks)
bonusMinorBonus balance (promo codes, bonuses)
currencyCurrency (always RUB)

Deduction priority: bonus balance is spent first, then main balance.


WalletLedger

Every balance operation creates a log entry:

OperationDescription
TOPUPBalance top-up
PURCHASEProduct purchase
REFUNDRefund
BONUSBonus credit
PROMOPromo code
ADJUSTManual 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:

  1. Clicks "Top up" (in the header or account area)
  2. Selects an amount or enters a custom one
  3. Selects a payment method
  4. Is redirected to the payment page
  5. 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:

  1. Admin panel → Players → select a player → "Wallet"
  2. Enter an amount (positive or negative)
  3. Enter a reason
  4. The entry is recorded in WalletLedger with type ADJUST

Next steps