Oxide StudiosOxide Studios

Configuration Guide

Configure account tiers, loans, interest rates, and transaction fees.

This guide covers all configurable options in Oxide Banking. Configuration files are located in the config/ folder.


Table of Contents

  1. config.lua - General Settings
  2. accounts.lua - Tiers & Account Types
  3. loans.lua - Loan Products
  4. interest.lua - Interest & Investments
  5. fees.lua - Transaction Fees

config.lua - General Settings

Debug Mode

Config.Debug = false  -- Enable debug logging in console

Interaction System

Config.UseTarget = true  -- Use qb-target or PolyZone (true = qb-target, false = proximity)

Set to true to use qb-target for interactions, or false for proximity-based (press E) interactions.


ATM Models

ATM props that players can interact with:

Config.ATMModels = {
    'prop_atm_01',
    'prop_atm_02',
    'prop_atm_03',
    'prop_fleeca_atm',
}

Add or remove models as needed for your server.


Bank Locations

Default bank branch locations:

Config.BankLocations = {
    { coords = vector3(149.05, -1041.3, 29.37), heading = 340.0, label = 'Fleeca Bank - Legion Square' },
    { coords = vector3(313.32, -280.03, 54.17), heading = 340.0, label = 'Fleeca Bank - Alta' },
    { coords = vector3(-350.99, -51.26, 49.04), heading = 340.0, label = 'Fleeca Bank - Burton' },
    { coords = vector3(-1212.98, -331.26, 37.79), heading = 27.0, label = 'Fleeca Bank - Rockford Hills' },
    { coords = vector3(-2962.58, 482.63, 15.7), heading = 87.0, label = 'Fleeca Bank - Pacific Bluffs' },
    { coords = vector3(1175.07, 2708.19, 38.09), heading = 177.0, label = 'Fleeca Bank - Grand Senora' },
    { coords = vector3(-112.22, 6470.03, 31.63), heading = 132.0, label = 'Blaine County Savings' },
    { coords = vector3(247.26, 223.97, 106.29), heading = 160.0, label = 'Maze Bank Tower' },
}

To add a new bank location:

{ coords = vector3(X, Y, Z), heading = 0.0, label = 'My Custom Bank' },

Map Blips

Config.Blips = {
    enabled = true,      -- Show bank blips on map
    sprite = 108,        -- Blip icon (108 = bank)
    color = 2,           -- Blip color (2 = green)
    scale = 0.55,        -- Blip size
    label = 'Bank',      -- Default label
}

Security Settings

Config.Security = {
    Enable2FA = true,                     -- Enable 2FA for large transactions
    TwoFactorThreshold = 50000,           -- Transactions over this trigger 2FA
    MaxLoginAttempts = 3,                 -- Failed PIN attempts before lockout
    LockoutDuration = 300,                -- Lockout duration in seconds (5 min)
    EnableFraudDetection = true,          -- Automatic fraud detection
    SuspiciousTransactionAmount = 100000, -- Flag transactions over this amount
    EnableTransactionAlerts = true,       -- Notify players of transactions
    AlertThreshold = 10000,               -- Minimum amount to trigger alert
}
SettingDescription
Enable2FARequires verification code for large transactions
TwoFactorThresholdDollar amount that triggers 2FA
MaxLoginAttemptsWrong PIN attempts before temporary lockout
LockoutDurationHow long players are locked out (seconds)
EnableFraudDetectionAutomatically flags suspicious activity
SuspiciousTransactionAmountTransactions above this are flagged
EnableTransactionAlertsSend notifications for transactions
AlertThresholdMinimum amount for transaction alerts

Daily Limits

Default limits (can be overridden by account tiers):

Config.DailyLimits = {
    ATMWithdraw = 5000,   -- Max ATM withdrawal per day
    ATMDeposit = 10000,   -- Max ATM deposit per day
    Transfer = 50000,     -- Max transfer amount per day
}

Time Settings

Controls in-game time scheduling:

Config.TimeSettings = {
    UseInGameTime = true,           -- Use qb-weathersync for time
    InterestPayoutHour = 0,         -- Process daily tasks at midnight
    SavingsInterestInterval = 1,    -- Process savings interest every N in-game days
    LoanPaymentInterval = 7,        -- Loan payments every 7 in-game days
    InvestmentUpdateInterval = 1,   -- Update investments every in-game day
    RecurringPaymentCheck = 1,      -- Check recurring payments daily
    DaysPerYear = 28,               -- In-game days per "year" for interest
}

Note: If qb-weathersync is not installed, the system falls back to real time.


Card Settings

Config.Cards = {
    OrderCost = 50,           -- Cost to order a new card
    ReplacementCost = 100,    -- Cost to replace a lost card
    PinLength = 4,            -- PIN digit length
    MaxCardsPerAccount = 2,   -- Default max cards per account

    -- Override max cards by account type
    MaxCardsPerAccountType = {
        checking = 3,
        savings = 2,
        shared = 3,
        job = 2,
        gang = 2,
    },

    -- Display format for masked card numbers
    CardNumberMaskFormat = '**** **** **** %s',

    -- Minimum permission to issue cards for shared accounts
    SharedAccountMinPermission = 'user',

    -- Privacy: show balance in card selector?
    ShowAccountBalanceInSelector = false,

    -- Card management options
    AllowPINChange = true,      -- Allow PIN changes
    AllowFreeze = true,         -- Allow card freezing
    AllowCancel = true,         -- Allow card cancellation
    AllowReplacement = true,    -- Allow replacement cards
}

Notification Settings

Config.Notifications = {
    Position = 'top-right',  -- Notification position on screen
    Duration = 5000,         -- Duration in milliseconds
}

Logging

Integrates with qb-log for Discord logging:

Config.Logging = {
    Enabled = true,
    WebhookName = 'banking',    -- Webhook name in qb-log
    LogTransactions = true,     -- Log deposits/withdrawals/transfers
    LogLoans = true,            -- Log loan applications/payments
    LogAccountChanges = true,   -- Log account creation/deletion
    LogSecurityEvents = true,   -- Log security-related events
}

Business Settings

Config.Business = {
    -- Expense Categories (shown in UI)
    ExpenseCategories = {
        { id = 'supplies', label = 'Supplies', icon = 'fas fa-box' },
        { id = 'utilities', label = 'Utilities', icon = 'fas fa-bolt' },
        { id = 'vehicle', label = 'Vehicle', icon = 'fas fa-car' },
        { id = 'property', label = 'Property', icon = 'fas fa-building' },
        { id = 'legal', label = 'Legal', icon = 'fas fa-gavel' },
        { id = 'marketing', label = 'Marketing', icon = 'fas fa-bullhorn' },
        { id = 'other', label = 'Other', icon = 'fas fa-ellipsis-h' },
    },

    -- Invoice Settings
    InvoiceDueDays = 7,              -- Days until invoice due
    InvoiceLateFeeEnabled = true,    -- Apply late fees
    InvoiceLateFeePercent = 0.05,    -- 5% late fee
    InvoiceMaxLateFee = 10000,       -- Maximum late fee amount

    -- Approval Thresholds
    LargeExpenseThreshold = 10000,   -- Expenses over this need approval (0 = disabled)

    -- Report Settings
    ReportCacheDuration = 3600,      -- Cache reports for 1 hour
    MaxReportMonths = 12,            -- Max months of history in reports
}

accounts.lua - Tiers & Account Types

Account Tiers

Three tiers are available:

Basic Tier (Free)

['basic'] = {
    label = 'Basic Account',
    description = 'Standard free checking account',
    monthlyFee = 0,
    interestRate = 0.005,            -- 0.5% annual
    maxSharedAccounts = 1,
    dailyWithdrawLimit = 5000,
    dailyTransferLimit = 25000,
    features = {
        savings = false,
        investments = false,
        overdraft = false,
        prioritySupport = false,
    },
    requirements = {
        minBalance = 0,
        creditScore = 0,
    },
},

Premium Tier ($50/month)

['premium'] = {
    label = 'Premium Account',
    description = 'Enhanced account with better rates and features',
    monthlyFee = 50,
    interestRate = 0.02,             -- 2% annual
    maxSharedAccounts = 3,
    dailyWithdrawLimit = 25000,
    dailyTransferLimit = 100000,
    features = {
        savings = true,
        investments = false,
        overdraft = true,
        overdraftLimit = 5000,
        prioritySupport = true,
        noATMFees = true,
    },
    requirements = {
        minBalance = 5000,           -- $5,000 minimum balance
        creditScore = 600,           -- Fair credit required
    },
},

Business Tier ($200/month)

['business'] = {
    label = 'Business Account',
    description = 'Full-featured business banking with invoicing and expense tracking',
    monthlyFee = 200,
    interestRate = 0.015,            -- 1.5% annual
    maxSharedAccounts = 10,
    dailyWithdrawLimit = 100000,
    dailyTransferLimit = 500000,
    features = {
        savings = true,
        investments = true,
        overdraft = true,
        overdraftLimit = 25000,
        prioritySupport = true,
        noATMFees = true,
        invoicing = true,
        expenseTracking = true,
        -- multiSignature = true,  -- Future feature
        -- subAccounts = true,     -- Future feature
    },
    requirements = {
        minBalance = 10000,          -- $10,000 minimum balance
        creditScore = 700,           -- Good credit required
        jobBoss = true,              -- Must be a job boss
    },
},

Tier Comparison

FeatureBasicPremiumBusiness
Monthly Fee$0$50$200
Interest Rate0.5%2.0%1.5%
Max Shared Accounts1310
Daily Withdraw$5,000$25,000$100,000
Daily Transfer$25,000$100,000$500,000
Savings AccountsNoYesYes
InvestmentsNoNoYes
OverdraftNo$5,000$25,000
No ATM FeesNoYesYes
InvoicingNoNoYes
Expense TrackingNoNoYes

Account Types

Config.AccountTypes = {
    ['checking'] = {
        label = 'Checking Account',
        icon = 'fa-wallet',
        allowMultiple = false,
        interestEarning = true,
    },
    ['savings'] = {
        label = 'Savings Account',
        icon = 'fa-piggy-bank',
        allowMultiple = true,
        maxAccounts = 3,
        interestEarning = true,
        interestMultiplier = 2.0,         -- 2x the tier rate
        earlyWithdrawalPenalty = 0.01,    -- 1% penalty
        minimumBalance = 1000,
    },
    ['shared'] = {
        label = 'Shared Account',
        icon = 'fa-users',
        allowMultiple = true,
        interestEarning = true,
    },
    ['job'] = {
        label = 'Business Account',
        icon = 'fa-briefcase',
        allowMultiple = false,
        interestEarning = true,
        bossOnly = true,
    },
    ['gang'] = {
        label = 'Organization Account',
        icon = 'fa-user-secret',
        allowMultiple = false,
        interestEarning = true,
        bossOnly = true,
    },
}

Savings Goals

Config.SavingsGoals = {
    maxGoals = 5,                    -- Max goals per player
    categories = {
        { id = 'car', label = 'Vehicle', icon = 'fa-car' },
        { id = 'house', label = 'Property', icon = 'fa-home' },
        { id = 'vacation', label = 'Vacation', icon = 'fa-plane' },
        { id = 'business', label = 'Business', icon = 'fa-store' },
        { id = 'emergency', label = 'Emergency Fund', icon = 'fa-medkit' },
        { id = 'other', label = 'Other', icon = 'fa-star' },
    },
}

loans.lua - Loan Products

General Loan Settings

Config.Loans = {
    enabled = true,
    maxActiveLoans = 3,      -- Max concurrent loans per player
    gracePeriod = 1,         -- Grace period before late fees (in-game days)
}

Loan Products

Personal Loan

['personal'] = {
    label = 'Personal Loan',
    description = 'General purpose personal loan',
    icon = 'fa-user',
    minAmount = 1000,
    maxAmount = 50000,
    baseInterestRate = 0.08,         -- 8% annual
    termOptions = { 7, 14, 28 },     -- Terms in in-game days
    requirements = {
        minCreditScore = 500,
        minAccountAge = 1,
        minIncome = 0,
    },
    collateral = false,
},

Vehicle Loan

['vehicle'] = {
    label = 'Vehicle Loan',
    description = 'Financing for vehicle purchases',
    icon = 'fa-car',
    minAmount = 5000,
    maxAmount = 250000,
    baseInterestRate = 0.06,         -- 6% annual
    termOptions = { 14, 28, 56 },
    requirements = {
        minCreditScore = 580,
        minAccountAge = 3,
        minIncome = 500,
    },
    collateral = true,
    collateralType = 'vehicle',
},

Property Loan (Mortgage)

['property'] = {
    label = 'Property Loan',
    description = 'Mortgage for property purchases',
    icon = 'fa-home',
    minAmount = 50000,
    maxAmount = 1000000,
    baseInterestRate = 0.045,        -- 4.5% annual
    termOptions = { 56, 112, 168 },
    requirements = {
        minCreditScore = 650,
        minAccountAge = 7,
        minIncome = 2000,
    },
    collateral = true,
    collateralType = 'property',
},

Business Loan

['business'] = {
    label = 'Business Loan',
    description = 'Capital for business expansion',
    icon = 'fa-briefcase',
    minAmount = 25000,
    maxAmount = 500000,
    baseInterestRate = 0.07,         -- 7% annual
    termOptions = { 28, 56, 84 },
    requirements = {
        minCreditScore = 680,
        minAccountAge = 7,
        jobBoss = true,
    },
    collateral = false,
},

Emergency Loan

['emergency'] = {
    label = 'Emergency Loan',
    description = 'Quick cash for emergencies - higher rates',
    icon = 'fa-ambulance',
    minAmount = 500,
    maxAmount = 10000,
    baseInterestRate = 0.15,         -- 15% annual (higher risk)
    termOptions = { 3, 7 },
    requirements = {
        minCreditScore = 400,
        minAccountAge = 0,
        minIncome = 0,
    },
    collateral = false,
    instantApproval = true,
},

Loan Products Summary

Loan TypeAmount RangeBase RateMin CreditSpecial Requirement
Personal$1K - $50K8%500None
Vehicle$5K - $250K6%580Collateral
Property$50K - $1M4.5%650Collateral
Business$25K - $500K7%680Job Boss
Emergency$500 - $10K15%400None (Instant)

Credit Score Rate Modifiers

Players with better credit scores get better rates:

Config.CreditScoreRateModifiers = {
    { minScore = 800, modifier = -0.02 },   -- Excellent: -2% off base
    { minScore = 740, modifier = -0.015 },  -- Very Good: -1.5%
    { minScore = 670, modifier = -0.01 },   -- Good: -1%
    { minScore = 580, modifier = 0 },       -- Fair: base rate
    { minScore = 500, modifier = 0.02 },    -- Poor: +2%
    { minScore = 0, modifier = 0.05 },      -- Very Poor: +5%
}

Example: A player with 800+ credit applying for a Personal Loan:

  • Base rate: 8%
  • Credit modifier: -2%
  • Final rate: 6%

Late Payment Configuration

Config.LatePayment = {
    lateFee = 50,                    -- Flat late fee
    lateFeePercent = 0.05,           -- 5% of payment amount
    maxLateFee = 500,                -- Maximum late fee
    creditScorePenalty = 25,         -- Points lost per late payment
    missedPaymentPenalty = 50,       -- Points lost for missed payment
    collectionsThreshold = 3,        -- Missed payments before collections
}

Collections Configuration

Config.Collections = {
    enabled = true,
    warningNotifications = true,     -- Warn players before collections
    assetSeizure = true,             -- Seize collateral for secured loans
    wageGarnishment = true,          -- Garnish income automatically
    garnishmentPercent = 0.25,       -- 25% of income garnished
    creditScoreImpact = 100,         -- Major credit score penalty

    -- Collateral Seizure Integration
    -- Set to your vehicle/property script name to enable automatic seizure
    collateralHandlerResource = nil, -- e.g., 'qb-vehiclemanager'
}

Collateral Seizure Integration

To enable automatic collateral seizure, your vehicle/property script must export:

exports('SeizeLoanCollateral', function(citizenid, collateralType, collateralId, loanId)
    -- collateralType: 'vehicle' or 'property'
    -- collateralId: plate number or property ID
    -- Return true if seizure was successful
    if collateralType == 'vehicle' then
        -- Your logic to remove vehicle ownership
        return true
    end
    return false
end)

Then configure: Config.Collections.collateralHandlerResource = 'your-resource-name'


Loan Approval Settings

Config.LoanApproval = {
    processingTime = 0,              -- Instant processing (0 hours)
    manualApprovalThreshold = 100000,-- Loans over $100K need manual approval
    autoApproveUnderAmount = 100000, -- Auto-approve loans under this (should match above)
}

interest.lua - Interest & Investments

Interest Configuration

Config.Interest = {
    enabled = true,
    calculationMethod = 'compound',  -- 'simple' or 'compound'
    payoutFrequency = 'daily',       -- 'daily' or 'weekly'
    minimumBalance = 100,            -- Min balance to earn interest
    maxInterestPayout = 10000,       -- Max payout per cycle (anti-exploit)

    -- Interest multipliers by account type
    accountTypeRates = {
        ['checking'] = nil,          -- Uses tier rate
        ['savings'] = 2.0,           -- 2x tier rate
        ['shared'] = 0.5,            -- 0.5x tier rate
        ['job'] = 0.25,              -- 0.25x tier rate
        ['gang'] = 0.25,             -- 0.25x tier rate
    },
}

Investment Products

Config.Investments = {
    enabled = true,
    products = {
        ['savings_bond'] = {
            label = 'Savings Bond',
            description = 'Low risk, guaranteed returns',
            icon = 'fa-file-invoice-dollar',
            minInvestment = 1000,
            maxInvestment = 100000,
            termDays = 28,
            guaranteedReturn = 0.04,          -- 4% guaranteed
            earlyWithdrawalPenalty = 0.5,     -- Lose 50% of earnings
            risk = 'none',
        },
        ['stock_index'] = {
            label = 'Stock Index Fund',
            description = 'Medium risk, market-based returns',
            icon = 'fa-chart-line',
            minInvestment = 5000,
            maxInvestment = 500000,
            termDays = 14,
            expectedReturn = 0.08,            -- Expected 8%
            volatility = 0.15,                -- +/- 15% variance
            risk = 'medium',
        },
        ['crypto_fund'] = {
            label = 'Crypto Fund',
            description = 'High risk, high potential returns',
            icon = 'fa-bitcoin',
            minInvestment = 1000,
            maxInvestment = 250000,
            termDays = 7,
            expectedReturn = 0.15,            -- Expected 15%
            volatility = 0.40,                -- +/- 40% variance
            risk = 'high',
        },
        ['real_estate'] = {
            label = 'Real Estate Trust',
            description = 'Stable income from property investments',
            icon = 'fa-building',
            minInvestment = 25000,
            maxInvestment = 1000000,
            termDays = 56,
            expectedReturn = 0.06,            -- Expected 6%
            volatility = 0.05,                -- +/- 5% variance
            risk = 'low',
            tierRequired = 'business',        -- Business tier only
        },
    },
}

Investment Products Summary

ProductInvestment RangeTermReturnRisk
Savings Bond$1K - $100K28 days4% guaranteedNone
Stock Index$5K - $500K14 days8% (+/- 15%)Medium
Crypto Fund$1K - $250K7 days15% (+/- 40%)High
Real Estate$25K - $1M56 days6% (+/- 5%)Low

Market Simulation

marketUpdate = {
    frequency = 'daily',
    trendDuration = { 3, 7 },        -- Trends last 3-7 days
    crashChance = 0.02,              -- 2% chance of crash
    crashImpact = { 0.20, 0.40 },    -- 20-40% loss in crash
    boomChance = 0.05,               -- 5% chance of boom
    boomImpact = { 0.15, 0.30 },     -- 15-30% gain in boom
    momentumEnabled = true,          -- Enable momentum carry-over
    momentumFactor = 0.3,            -- 30% of previous day's change carries over
},
SettingDescription
momentumEnabledWhen true, market trends have inertia
momentumFactorPercentage of previous day's movement that affects today

Certificates of Deposit

Config.CertificatesOfDeposit = {
    enabled = true,
    products = {
        ['cd_short'] = {
            label = '7-Day CD',
            termDays = 7,
            interestRate = 0.025,             -- 2.5%
            minDeposit = 5000,
            maxDeposit = 100000,
            earlyWithdrawalPenalty = 0.5,     -- Lose 50% of interest
        },
        ['cd_medium'] = {
            label = '14-Day CD',
            termDays = 14,
            interestRate = 0.035,             -- 3.5%
            minDeposit = 10000,
            maxDeposit = 250000,
            earlyWithdrawalPenalty = 0.3,     -- Lose 30% of interest
        },
        ['cd_long'] = {
            label = '28-Day CD',
            termDays = 28,
            interestRate = 0.05,              -- 5%
            minDeposit = 25000,
            maxDeposit = 500000,
            earlyWithdrawalPenalty = 0.2,     -- Lose 20% of interest
        },
    },
}

fees.lua - Transaction Fees

ATM Fees

atm = {
    ownBank = 0,          -- Using own bank's ATM
    otherBank = 2,        -- Using another bank's ATM
    outOfNetwork = 5,     -- Out of network ATM
},

Note: Premium and Business tiers have ATM fees waived.


Wire Transfer Fees

wireTransfer = {
    domestic = 15,        -- Same city transfers
    international = 50,   -- Different city (RP flavor)
},

External Transfer Fees

externalTransfer = {
    flat = 0,             -- Flat fee per transfer
    percent = 0,          -- Percentage (0 = free)
    minFee = 0,
    maxFee = 0,
},

Maintenance Fees

Charged per in-game week:

maintenance = {
    checkingBelowMinimum = 10,   -- If below minimum balance
    savingsInactivity = 5,       -- No activity for 7+ days
    dormantAccount = 25,         -- No activity for 28+ days
},

Service Fees

services = {
    newCard = 50,                -- New debit card
    replacementCard = 100,       -- Lost/stolen card
    rushCard = 75,               -- Rush delivery
    accountStatement = 5,        -- Paper statement
    checkBook = 25,              -- Order checks
    stopPayment = 35,            -- Stop a payment
    closeAccount = 0,            -- Account closure
    accountUpgrade = 0,          -- Upgrade tier
    accountDowngrade = 50,       -- Downgrade tier
    addUser = 0,                 -- Add shared account user
    removeUser = 0,              -- Remove user
},

Overdraft Fees

overdraft = {
    fee = 35,                    -- Per overdraft
    dailyCap = 3,                -- Max fees per day
    gracePeriod = 1,             -- Days to cover overdraft
    extendedOverdraftDaily = 5,  -- Daily fee after grace
},

Fee Waivers

Certain fees are waived based on tier or balance:

Config.FeeWaivers = {
    premiumTier = {
        'atm.otherBank',
        'atm.outOfNetwork',
        'maintenance.checkingBelowMinimum',
        'services.accountStatement',
    },
    businessTier = {
        'atm.otherBank',
        'atm.outOfNetwork',
        'maintenance.checkingBelowMinimum',
        'maintenance.savingsInactivity',
        'services.accountStatement',
        'services.checkBook',
        'transactions.wireTransfer.domestic',
    },
    highBalance = {
        threshold = 50000,
        waivedFees = {
            'maintenance.checkingBelowMinimum',
            'atm.otherBank',
        },
    },
}

Oxide Banking by Oxide Studios