> ## 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 & Credit Score

> Loan tiers, scheduled payments, missed payments, defaults, early payoff, cancelling and the credit score that decides who can borrow in aps_banking.

Loan settings live in `config/loans.lua`. Players borrow from configurable tiers, pay on a schedule, and build a credit score that decides which tiers they can request.

## Loan tiers

```lua theme={null}
tiers = {
    { id = 'starter', label = 'Starter Loan', amount = 5000, interest = 5, termDays = 30, intervalHours = 24, minCredit = 200 },
},
```

The interest is added once. A $5,000 loan at 5% over 30 days is $5,250 in 30 payments of \$175. A player can have one running loan.

## Payments

Payments are taken from the personal account when due, for offline players too. After downtime they run in order.

| Situation | Result |
| - | - |
| Enough money | Payment made, score rises |
| Not enough money | Payment missed, score falls |
| `defaultAfterMissed` misses in a row | Loan defaults, score falls hard |

The total stays open after a missed payment, and payments continue past the planned end until it is paid or the loan defaults.

Pay Loan offers the next payment ahead of time, or everything at once. Paying everything waives `earlyPayoffDiscount` percent of the open interest and gives a score bonus.

Cancel Loan works for `cancelMinutes` after taking the loan, if nothing was paid yet: the player returns the amount plus `cancelFeePercent`. Set `cancelMinutes = 0` to turn it off.

## Credit score

```lua theme={null}
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 },
},
```

Each tier's `minCredit` decides who can request it. Unpaid City Hall bills and taxes can lower the score too: see [City Hall](https://docs.aps-store.com/assets/aps_banking/guides/city-hall.md).


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