Skip to main content

Exports

Client and server exports available from wasabi_banking. These are useful for radial menus, paychecks, boss menus, and third-party integrations.

danger

The resource folder must be named wasabi_banking for these exports to resolve.

Client exports​

isUIOpen​

Returns whether the banking UI is currently open.

local uiOpen = exports.wasabi_banking:isUIOpen()

if uiOpen then
print('Banking UI is open')
end

OpenUI​

Opens the main banking UI.

exports.wasabi_banking:OpenUI()

CloseUI​

Closes the banking UI.

exports.wasabi_banking:CloseUI()

Server exports​

Transaction​

Adds a statement entry to an account. Useful for paycheck scripts and other money flows that log separately.

exports.wasabi_banking:Transaction(identifier, reason, amount, type, account)
ParameterTypeDescription
identifierstringPlayer identifier / citizenid, or society account id when account is 'society'.
reasonstringTransaction description.
amountnumberTransaction amount.
typestring'deposit' or 'sent'.
accountstring'personal', 'savings', or 'society'. 'personal' is stored as account type bank.

AddMoney​

Adds money to an account. Frozen accounts are rejected (except cash).

exports.wasabi_banking:AddMoney(accountType, accountID, amount, source)
ParameterTypeDescription
accountTypestring'bank', 'cash', 'savings', 'society', or 'shared'.
accountIDstring|numberAccount id (player server id for bank/cash, owner identifier for savings, society name, or shared account id).
amountnumberAmount to add.
sourcenumber?Optional player source for personal bank/cash when accountID is not the server id.

Returns true on success, false on failure.

exports.wasabi_banking:AddMoney('bank', source, 200)
exports.wasabi_banking:AddMoney('shared', sharedAccountId, 150)

RemoveMoney​

Removes money from an account. Frozen accounts are rejected (except cash).

exports.wasabi_banking:RemoveMoney(accountType, accountID, amount, source)

Parameters match AddMoney. Returns true on success, false on failure.

exports.wasabi_banking:RemoveMoney('cash', source, 50)
exports.wasabi_banking:RemoveMoney('society', 'police', 500)

CreateJobAccount​

Creates a society/job account with an initial balance.

local ok = exports.wasabi_banking:CreateJobAccount('police', 5000)

GetAccountBalance​

Returns the balance for an account, or false if not found.

local balance = exports.wasabi_banking:GetAccountBalance(accountID, accountType)
ParameterTypeDescription
accountIDstring|numberAccount id, owner identifier, or society name.
accountTypestring'bank', 'savings', 'society', or 'shared'.

GetPlayerAccounts​

Returns savings and shared accounts for a player.

local accounts = exports.wasabi_banking:GetPlayerAccounts(sourceOrIdentifier)

for _, account in ipairs(accounts) do
print(account.id, account.type) -- type is 'savings' or 'shared'
end

createSavingsAccount​

Creates a savings account for a player.

local ok = exports.wasabi_banking:createSavingsAccount(sourceOrIdentifier, 500)

createSharedAccount​

Creates a shared account owned by the player.

local ok = exports.wasabi_banking:createSharedAccount(source, 'Family Account')

removeUserFromSharedAccount​

Removes a member from a shared account.

local ok = exports.wasabi_banking:removeUserFromSharedAccount(identifier, accountId)

accountId can be obtained from GetPlayerAccounts.

hireUserToSharedAccount​

Adds a member to a shared account.

local ok = exports.wasabi_banking:hireUserToSharedAccount(targetSource, 'John Doe', accountId)

IsAccountFrozen​

Returns whether an account is frozen.

local frozen = exports.wasabi_banking:IsAccountFrozen(accountType, accountId)

FreezeAccount​

Freezes an account by type and id.

local ok, err = exports.wasabi_banking:FreezeAccount(accountType, accountId, frozenBy)
ParameterTypeDescription
accountTypestring'bank', 'savings', 'shared', or 'society'.
accountIdstring|numberCitizenid for bank/savings, shared row id, or society job name.
frozenBystring?Optional actor label stored with the freeze.

Shared accounts must be frozen by id (or IBAN). Display names are not unique.

UnfreezeAccount​

Unfreezes an account by type and id.

local ok, err = exports.wasabi_banking:UnfreezeAccount(accountType, accountId)

GetAccountsByPlayer​

Lists bank, savings, and shared accounts for a player in the same shape as the admin search panel.

local rows = exports.wasabi_banking:GetAccountsByPlayer(sourceOrIdentifier)

GetAccountByIban​

Resolves an IBAN to account info, including frozen state.

local account = exports.wasabi_banking:GetAccountByIban('WSB-123456')

if account then
print(account.type, account.id, account.frozen)
end

Returns nil when the IBAN is not found.

FreezeAccountByIban​

Freezes an account looked up by IBAN.

local ok, err = exports.wasabi_banking:FreezeAccountByIban('WSB-123456', 'export')

Compatibility exports​

When enabled in Config.CompatExports, wasabi_banking also answers export calls aimed at replaced banking/management resources. See Migration for setup rules.

qb-management​

ExportPurpose
GetAccount / GetGangAccountSociety balance
AddMoney / AddGangMoneyAdd society money
RemoveMoney / RemoveGangMoneyRemove society money

The real qb-management resource must be removed. wasabi_banking provides it in fxmanifest.lua.

Renewed-Banking​

ExportPurpose
getAccountMoneySociety or online player bank balance
addAccountMoneyAdd society or player bank money
removeAccountMoneyRemove society or player bank money
handleTransactionRecord a statement entry only
GetJobAccountRenewed-shaped society account object
CreateJobAccountCreate a society account

Auto-skipped if the real Renewed-Banking resource is started. Used to keep qbx_management boss menus working.

okokBanking​

ExportPurpose
GetAccountSociety balance
AddMoneyAdd society money
RemoveMoneyRemove society money
AddTransactionRecord a statement entry
GetPlayerTransactionsFetch player transaction history

The real okokBanking resource must be removed. wasabi_banking provides it in fxmanifest.lua.