> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aps-store.com/llms.txt
> Use this file to discover all available pages before exploring further.

# loans.lua

> Loan settings of aps_banking: loan tiers, missed payment limit, early payoff, cancelling and all credit score values.

`config/loans.lua` holds these settings. Every option is explained in the comments below.

> [!NOTE]
>
> Runs on: **shared**. This file stays editable when the resource is escrow-protected. Restart the resource after a change.

```lua theme={null}
Config = Config or {}

Config.Loans = {
    -- ─────────────────────────────────────────
    --  Loan tiers (the UI shows them as side-by-side plans)
    --    amount         paid out to the personal account
    --    interest       percent added once on top of the amount
    --    termDays       how long the loan runs
    --    intervalHours  time between payments (24 = daily)
    --    minCredit      lowest credit score that can request it
    -- ─────────────────────────────────────────
    tiers = {
        { id = 'starter',  label = 'Starter Loan',  amount = 5000,  interest = 5,  termDays = 30, intervalHours = 24, minCredit = 200 },
        { id = 'advance',  label = 'Advance Loan',  amount = 10000, interest = 10, termDays = 45, intervalHours = 24, minCredit = 350 },
        { id = 'business', label = 'Business Loan', amount = 20000, interest = 15, termDays = 60, intervalHours = 24, minCredit = 500 },
        { id = 'capital',  label = 'Capital Loan',  amount = 50000, interest = 20, termDays = 80, intervalHours = 24, minCredit = 650 },
    },

    -- Payments in a row that may fail before the loan defaults
    defaultAfterMissed = 3,

    -- Paying everything off before the end waives this share of the
    -- interest that is still open
    earlyPayoffDiscount = 50,

    -- Cancel within this time by paying back the amount, without interest
    -- (plus cancelFeePercent of the amount). 0 turns cancelling off.
    cancelMinutes    = 60,
    cancelFeePercent = 1,

    -- ─────────────────────────────────────────
    --  Credit score
    --    Every player starts at `start`. Bands name the score in the UI.
    -- ─────────────────────────────────────────
    credit = {
        start = 300,
        min   = 0,
        max   = 1000,
        bands = {
            { from = 0,   key = 'poor' },
            { from = 250, key = 'normal' },
            { from = 500, key = 'good' },
            { from = 750, key = 'excellent' },
        },
        changes = {
            paymentOnTime = 2,
            paymentMissed = -15,
            loanPaidOff   = 25,
            earlyPayoff   = 10,
            loanDefault   = -100,
            -- aps_cityhall link, checked once a day (Config.Features.cityhall)
            unpaidBill    = -3,
            overdueTax    = -5,
            dailyCityHallLimit = -20,
        },
    },
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.