> For the complete documentation index, see [llms.txt](https://jiffyjrdevelopment.gitbook.io/jiffyjrdevelopmentdocs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jiffyjrdevelopment.gitbook.io/jiffyjrdevelopmentdocs/jiffy-jr-development-docs/jiffy-banking-v1/configuration.md).

# Configuration

All configuration lives in `shared/config.lua`. This file is **not** escrow-protected — you can read and edit it freely.

## General

```lua
Config.Debug         = false     -- enable verbose F8 console logs
Config.Framework     = 'qb'      -- 'qb' | 'qbox' | 'esx'
Config.UseTarget     = true      -- use a target system (ox_target / qb-target)
Config.TargetSystem  = 'ox_target'
Config.Locale        = 'en'
Config.AutoInstall   = true      -- auto-create missing DB tables on start
Config.Notify        = 'qb'      -- 'qb' | 'ox' | 'custom'
```

{% hint style="info" %}
If `Config.UseTarget = false`, jiffy-banking falls back to a proximity text-prompt interaction instead of 3D target zones.
{% endhint %}

## Currency Formatting

```lua
Config.Currency     = '$'        -- fallback symbol
Config.MoneyDecimals = 0         -- 0 = whole numbers (QBCore default)

Config.Intl = {
    locales = 'en-US',
    options = {
        style    = 'currency',
        currency = 'USD',
        minimumFractionDigits = 0,
    },
}
```

Common locale presets:

| Region        | `locales` | `currency` |
| ------------- | --------- | ---------- |
| United States | `en-US`   | `USD`      |
| Brazil        | `pt-BR`   | `BRL`      |
| Europe        | `de-DE`   | `EUR`      |
| Russia        | `ru-RU`   | `RUB`      |

## Commands & Keybinds

```lua
Config.Commands = {
    bank     = 'bank',
    invoices = 'invoices',
    admin    = 'jbankadmin',
    doctor   = 'jbankdoctor',
    banker   = 'banker',
}

Config.Keybinds = {
    Bank     = '',    -- leave empty for no default (player sets it in GTA settings)
    Invoices = '',
}
```

## Feature Toggles

```lua
Config.Banking    = { Enabled = true }
Config.Billing    = { Enabled = true, StandaloneUI = true }
Config.Societies  = { Enabled = true }
Config.Admin      = { Enabled = true }
Config.Loans      = { Enabled = true }
Config.Credit     = { Enabled = true }
```

{% hint style="warning" %}
Setting `Enabled = false` on a feature hides all related UI and disables all related commands. No dead buttons will appear.
{% endhint %}

## Banking Options

```lua
Config.Banking.AllowAnywhere           = false   -- /bank works without being near a bank
Config.Banking.SavingsEnabled          = true
Config.Banking.CreateAccountOnLoad     = true    -- auto-create checking on first join
Config.Banking.SavingsInterestRate     = 0.005   -- 0.5% per interval (0 to disable)
Config.Banking.SavingsInterestInterval = 60      -- minutes

Config.Banking.ATM = {
    AllowDeposit        = true,
    AllowWithdraw       = true,
    AllowTransfer       = true,
    AllowInvoicePayment = true,
    Fee                 = 0.0,         -- percentage ATM withdrawal fee (0.0–1.0)
    MaxWithdraw         = 2500,
}
```

## Bank Card

```lua
Config.BankCard = {
    Enabled             = true,
    ItemName            = 'banking_card',
    RequireForATM       = true,
    UseRadius           = 2.5,
    GiveOnAccountCreate = true,
}
```

## Billing Options

```lua
Config.Billing.AllowPlayerInvoices   = true
Config.Billing.AllowJobInvoices      = true
Config.Billing.AllowOfflineInvoices  = true
Config.Billing.AllowPartialPayments  = true
Config.Billing.AllowDisputes         = true
Config.Billing.AllowPayAll           = true
Config.Billing.DefaultDueDays        = 7
Config.Billing.LateFeePercent        = 0.0
```

## Loan Types

Each loan type is fully configurable:

```lua
Config.Loans.Types = {
    personal = {
        label          = 'Personal Loan',
        maxAmount      = 50000,
        minCreditScore = 580,
        interestRate   = 0.07,    -- 7% simple interest
        termDays       = 30,
        paymentInterval = 7,      -- payment every N days
    },
    -- vehicle, business, medical also included
}
```

## Banker Job

```lua
Config.BankerJob = {
    Enabled        = true,
    JobName        = 'banker',
    OnDutyRequired = false,
    Grades = {
        teller  = 0,    -- minimum grade to open banker desk
        manager = 4,    -- minimum grade to freeze accounts / approve loans
    },
}
```

## Permissions

```lua
Config.Permissions = {
    AcePerms  = { 'command', 'jbank.admin' },
    QbPerms   = { 'god', 'admin' },
    CitizenIdAllowlist = {
        -- 'ABC12345',
    },
}
```

{% hint style="info" %}
Any player matching **any** of the permission checks (Ace, QB permission, or allowlist) is treated as an admin. You only need to configure the method your server already uses.
{% endhint %}
