Esc to clear, Enter to open the best match, click an export to open it in its page
Money

Bank Accounts

Every character has a personal bank account and can hold savings, shared and business accounts. The exports are on Bank API, and running banks in game on Banks.

Accounts and roles

An account's type is 'personal', 'savings', 'business' or 'shared'. A new character gets a personal account with Config.StartingBalance ($1000) and isDefault = 1. Account numbers are WB- and six random digits.

view (1) < deposit (2) < withdraw (3) < manager (4) < owner (5)

Each role includes those before it. A granter can only give roles below their own, and owner access can't be revoked.

Moving money

Who decidesExports
A playerTheir role: deposit to pay in, withdraw to take out or transferBankDeposit, BankWithdraw, BankTransfer, passing the player's source or { charId = n } (a bare number is a server id, never a charId). Bank money only: no cash moves
The systemYour resource: no permission checkBankSystemDeposit (wages, takings), BankSystemWithdraw (fines, fees), BankSystemTransfer (payroll), logged with your resource's name

Ask CanUseBankAccount to decide what to offer, such as only the accounts a person can pay from. To charge a player, use ChargePlayer; to pay one, PayPlayer.

-- A fine out of a player's default account
local account = exports.whip_core:GetDefaultBankAccount(source)
if account then
    local ok, why = exports.whip_core:BankSystemWithdraw(account.accountId, 250, { reason = 'Speeding fine' })
end

Good to know