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

# Accounts

> Account types, account numbers, how many accounts each player gets, and how sharing works.

Everything here lives in `config/accounts.lua`: which account types exist, what their numbers look like, how many each player can own, and how accounts are shared.

## Account types

Turn any type on or off in `Config.AccountTypes`. A type set to `false` never appears for players.

```lua config/accounts.lua theme={"dark"}
Config.AccountTypes = {
    personal = true,
    savings  = true,   -- interest-bearing (see config/tiers.lua)
    job      = true,
    gang     = true,
    shared   = true,
}
```

<CardGroup cols={2}>
  <Card title="Personal" icon="user">
    One per character, and it **mirrors the framework wallet** - the same money your framework tracks, so it never drifts out of sync.
  </Card>

  <Card title="Savings" icon="piggy-bank">
    Interest-bearing and grows over time. Rates and tiers are set in [Savings](/resources/awoken-banking/configuration/savings).
  </Card>

  <Card title="Shared" icon="users">
    A personal account you grant other players access to, each as **owner**, **contributor**, or **viewer**. Settings below.
  </Card>

  <Card title="Job & gang" icon="briefcase">
    Business accounts for a job or gang, gated by rank. See [Society accounts](/resources/awoken-banking/configuration/society).
  </Card>
</CardGroup>

## Account numbers

Every account gets a readable number in the format `<PREFIX>-XXXX-XXXX`, for example `AWK-4821-0093`. The prefix shows the type at a glance and can be renamed in `Config.AccountNumber.prefixes`.

| Account type | Prefix | Example         |
| ------------ | ------ | --------------- |
| Personal     | `AWK`  | `AWK-4821-0093` |
| Savings      | `SAV`  | `SAV-1002-7745` |
| Job          | `SOC`  | `SOC-3391-0021` |
| Gang         | `GNG`  | `GNG-8830-4417` |
| Shared       | `SHR`  | `SHR-5567-1120` |

## Account slots

`Config.Slots` sets how many accounts of each type a player can **own**. Personal is always exactly `1`. Savings and shared each have a slot cap players can start small and grow: `starter` is the count they begin with, `max` is the ceiling, and `upgrades` lists the cost to unlock each extra slot in order (some can require a minimum credit score via `minCredit`).

```lua config/accounts.lua theme={"dark"}
Config.Slots = {
    upgradeable = true,   -- false = every player just gets `max` of each type, nothing to buy

    savings = {
        enabled = true,
        starter = 1,
        max     = 3,
        upgrades = {
            { cost = 25000, minCredit = 0   },
            { cost = 75000, minCredit = 400 },
        },
    },

    shared = {
        enabled = true,
        starter = 1,
        max     = 3,
        upgrades = {
            { cost = 20000 },
            { cost = 60000 },
        },
    },
}
```

With the defaults, each type starts at **1** and reaches **3** once both upgrades are bought:

| Type    | Starts with | Ceiling | Slot 2 costs | Slot 3 costs                 |
| ------- | ----------- | ------- | ------------ | ---------------------------- |
| Savings | 1           | 3       | `$25,000`    | `$75,000` (needs credit 400) |
| Shared  | 1           | 3       | `$20,000`    | `$60,000`                    |

The upgrade cost buys only the **slot**. Opening an account costs extra: savings uses its tier price in `config/tiers.lua`, shared uses `Config.Shared.creationFee` below.

## Shared accounts

`Config.Shared` sets the rules for shared accounts, the personal accounts a player opens and invites others into.

```lua config/accounts.lua theme={"dark"}
Config.Shared = {
    enabled     = true,   -- can shared accounts be opened at all
    creationFee = 0,      -- cash cost to open one
    maxMembers  = 10,     -- people allowed on a single account
    slotCountsMemberships = false,
}
```

`slotCountsMemberships` is the one worth thinking about:

* `false` (default) - only accounts you **own** use a slot, so a player can be a contributor or viewer on many accounts for free.
* `true` - **every** shared account you're in uses one of your slots. Once full, you can't be added to more.

## Sharing an account number (bump-to-share)

Separate from shared accounts, **bump-to-share** hands a player's account **number** to a nearby player so they can send money to it. It shares only the number, never any access to the account.

```lua config/accounts.lua theme={"dark"}
Config.Share = {
    enabled     = true,
    distance    = 8.0,    -- metres: who counts as "nearby"
    cooldown    = 5,      -- seconds between shares
    offerExpiry = 30,     -- seconds the recipient has to accept before it lapses
}
```

## Currency

Set the currency shown throughout the app at the top of the file:

```lua config/accounts.lua theme={"dark"}
Config.Currency       = 'USD'   -- ISO code, sent to the UI for formatting
Config.CurrencySymbol = '$'
```

## Moving from another bank

Awoken Banking can do a **one-time import** of another bank's society and shared balances, transactions, loans, and credit. Personal balances always carry over on their own through your framework, so migration focuses on business and shared accounts (plus history where the source keeps it).

### Supported banks

Renewed-Banking, qb-banking, ESX (`esx_addonaccount` / `esx_banking`), DM Banking, Bablo Bank, Snipe Banking, and Nano Banking.

### Automatic, on first start

Set the bank you're leaving and the import runs **once** on the next start, then never again. Leave it `false` if you're starting fresh.

```lua config/accounts.lua theme={"dark"}
Config.AutoImport = false   -- false | 'renewed' | 'qb' | 'esx' | 'dm' | 'bablo' | 'snipe' | 'nano'
```

### Manual, with a dry run

Prefer to preview first? Run it from the **server console**. Without `apply` it's a **dry run** that writes nothing and prints a summary of what it would move; add `apply` to commit.

```
awoken_banking:import <renewed|qb|esx|dm|bablo|snipe|nano>
awoken_banking:import renewed apply
```

You can also trigger it from your own server script with the matching export, e.g. `exports.awoken_banking:migrateFromRenewed(true)` (`true` commits, omit for a dry run).

<Warning>
  One-time migration. Run it once against your old bank's data, then stop - don't keep `AutoImport` switched on or re-run the command.
</Warning>
