Skip to main content
The Banking component manages player bank accounts, balance operations, and transaction history. It supports personal checking, savings, and organization accounts.

Overview

Access via Banking (server-side only).

Account Types

Personal, Savings, Organization

Balance Operations

Deposit, Withdraw, Charge

Transaction Logs

Full transaction history per account

Joint Accounts

Savings accounts with joint owners
Server-Side Only: All banking operations must be performed on the server. Never attempt to modify balances from the client.

Account Management

Banking.Accounts:Get

Get an account by its account number.
string
required
The bank account number
table|nil
Account data or nil if not found
Example:

Banking.Accounts:CreatePersonal

Creates or retrieves an existing personal checking account for a character. New accounts start with $5,000.
number
required
Character State ID (SID)
table
The personal checking account data
Example:

Banking.Accounts:GetPersonal

Retrieves an existing personal checking account.
number
required
Character State ID (SID)
table|nil
Personal account or nil if none exists
Example:

Banking.Accounts:CreatePersonalSavings

Creates a personal savings account with optional joint owners.
number
required
Character State ID
table
Array of State IDs for joint owners
Example:

Banking.Accounts:GetPersonalSavings

Gets all savings accounts a character owns or has joint access to.
number
required
Character State ID
table
Array of savings accounts (owned and joint)

Banking.Accounts:AddPersonalSavingsJointOwner

Adds a joint owner to a savings account.
string
required
Account number
number
required
State ID of the new joint owner

Banking.Accounts:RemovePersonalSavingsJointOwner

Removes a joint owner from a savings account.

Banking.Accounts:CreateOrganization

Creates an organization (business/government) bank account.
string
required
Custom account number/ID
string
required
Display name for the account
number
required
Initial balance
table
required
Array of job access definitions
Example:
Permission values are job permission strings (not grade numbers). The system checks if the player’s job has the specified permission via Jobs.Permissions:HasJob. Use strings like 'BANK_ACCOUNT_WITHDRAW' which map to job permission definitions.

Banking.Accounts:GetOrganization

Retrieves an organization account.

Banking.Accounts:AddOrganizationAccessingJob

Adds job access to an existing organization account.

Banking.Accounts:RemoveOrganizationAccessingJob

Removes job access from an organization account.

Balance Operations

Banking.Balance:Get

Get the current balance of an account.
string
required
Bank account number
number
Current balance
Example:

Banking.Balance:Has

Check if an account has sufficient funds.
string
required
Bank account number
number
required
Amount to check against
boolean
true if balance >= amount
Example:

Banking.Balance:Deposit

Deposit funds into an account.
string
required
Bank account number
number
required
Amount to deposit
table
required
Transaction log entry (see Transaction Log Structure below)
boolean
Skip sending phone notification
number
Updated balance after deposit
Example:

Banking.Balance:Withdraw

Withdraw funds from an account.
string
required
Bank account number
number
required
Amount to withdraw
table
required
Transaction log entry
number
Updated balance after withdrawal
Withdraw does NOT check if the account has sufficient funds. Use Charge if you need automatic validation, or check with Has first.

Banking.Balance:Charge

Withdraw funds only if the account has sufficient balance.
string
required
Bank account number
number
required
Amount to charge
table
required
Transaction log entry
number|boolean
New balance if successful, false if insufficient funds
Example:

Transaction Logs

Banking.TransactionLogs:Add

Record a transaction in the account’s history.
string
required
Bank account number
string
required
Transaction type: deposit, withdraw, transfer, paycheck, fine, fine_profit, bill, loan
number
required
Transaction amount
string
required
Human-readable title
string
required
Transaction details
string|boolean
required
Related account number, or false if none
table
Custom data dictionary

Banking.TransactionLogs:Get

Get transaction history for an account.
string
required
Bank account number
table
Array of transaction records for the account

Transaction Log Structure

Transaction Types:

Account Data Structure


Best Practices


Next Steps

Finance - Payments

Cash, bills, fines, and charges

Finance - Crypto

Cryptocurrency system

Finance - Loans

Loan and credit system

Characters API

Character data access