> ## 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.

# Business & shared accounts

> Shared job/gang accounts, who can reach the money, and how the bank stands in for your framework's boss menus.

A **business account** is a shared pot of money owned by a **job or gang** instead of one character - police funds, a mechanic's till, a gang stash. Awoken Banking calls these **society accounts** and keeps one per job and one per gang automatically. You control who can reach the money and how they hook into your server. Everything here is in `config/accounts.lua`.

<Info>
  A business account is owned by a job/gang. A **shared account** is a personal account one player opens and invites others onto. Both use the same three roles below - only the owner differs.
</Info>

## The three roles

Every shared account hands each member one of three roles (the same roles used on any [account](/resources/awoken-banking/configuration/accounts)). On a business account, a member's **rank** decides which they get.

<CardGroup cols={3}>
  <Card title="Owner" icon="crown">
    Full control. Moves money **and** manages members.
  </Card>

  <Card title="Contributor" icon="right-left">
    Moves money in and out. **Can't** manage members.
  </Card>

  <Card title="Viewer" icon="eye">
    Read only. Sees balance and history, moves nothing.
  </Card>
</CardGroup>

## Who can access the money

Set access **per rank** from inside the bank app: the boss opens the business account, opens its members, and grants each rank a role. This always wins.

`Config.Society` is only a **legacy fallback**, ignored for any job or gang with in-app per-rank permissions (or a grade `bankAuth` flag) set. Used only when neither is set: members **at or above** `minGrade` get money access, and the boss is always an admin.

```lua config/accounts.lua theme={"dark"}
Config.Society = {
    defaultJobMinGrade  = 0,   -- lowest job rank that gets money access (fallback)
    defaultGangMinGrade = 0,   -- lowest gang rank that gets money access (fallback)

    -- Optional per-job / per-gang overrides:
    jobAccess  = {
        -- police = { minGrade = 2 },
    },
    gangAccess = {
        -- ballas = { minGrade = 1 },
    },
}
```

| Option                | What it does                                                          | Default |
| --------------------- | --------------------------------------------------------------------- | ------- |
| `defaultJobMinGrade`  | Lowest **job** rank with money access, when no in-app perms are set.  | `0`     |
| `defaultGangMinGrade` | Lowest **gang** rank with money access, when no in-app perms are set. | `0`     |
| `jobAccess`           | Per-job `minGrade` overrides, e.g. `police = { minGrade = 2 }`.       | empty   |
| `gangAccess`          | Per-gang `minGrade` overrides.                                        | empty   |

## Creating society accounts on start

By default the bank pre-seeds an account for **every** job and gang on server start, so the money exists before anyone logs in.

```lua config/accounts.lua theme={"dark"}
Config.Society = {
    preCreateOnStart   = true,   -- pre-seed a society account for every job/gang on start
    autoCreateOnAccess = true,   -- fallback: also create on first access if not pre-seeded
    excludeJobs  = { 'unemployed' },   -- never get a society account
    excludeGangs = { 'none' },
}
```

| Option               | What it does                                              | Default            |
| -------------------- | --------------------------------------------------------- | ------------------ |
| `preCreateOnStart`   | Create an account for every job and gang on server start. | `true`             |
| `autoCreateOnAccess` | If one wasn't pre-seeded, create it on first access.      | `true`             |
| `excludeJobs`        | Jobs that never get a business account.                   | `{ 'unemployed' }` |
| `excludeGangs`       | Gangs that never get a business account.                  | `{ 'none' }`       |

## The society bridge

Your framework has its own society-account store behind boss menus and paychecks (`qb-management` on QBox/QBCore, `esx_society` on ESX). With the **society bridge** on, Awoken Banking **becomes** that store, so boss menus and wages route through the bank. One balance, everywhere.

```lua config/accounts.lua theme={"dark"}
Config.SocietyBridge = true
```

Leave this **on** unless another resource manages society accounts. Awoken Banking answers under the `qb-management` and `esx_society` names (declared with `provide` lines in its manifest), which lets other scripts find it - see [Installation](/resources/awoken-banking/installation).

<Info>
  The bridge is only about **money**. Hiring, firing, and setting ranks stay with your framework (qbx\_core / qb-core / es\_extended) - Awoken Banking never touches them.
</Info>

<Warning>
  If you turn the bridge **off**, you **must also delete** the matching `provide 'qb-management'` and `provide 'esx_society'` lines in `fxmanifest.lua`. `provide` is static, so without that step other scripts still detect Awoken Banking as `qb-management` / `esx_society`, but with the bridge off those exports won't answer and you'll get errors.
</Warning>
