> For the complete documentation index, see [llms.txt](https://alt0.gitbook.io/alt0-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://alt0.gitbook.io/alt0-docs/alt0-bank/developers.md).

# For developers

Bill players and move money from your scripts with ALT0 Bank's exports.

## Server exports

```lua
-- send an invoice
exports['alt0-bank']:CreateBillExternal(senderCid, senderName, targetCid, amount, reason, societyJob)

-- read accounts and history
exports['alt0-bank']:GetAccountsByCitizen(citizenid)
exports['alt0-bank']:GetRecentTransactions(citizenid, limit)
exports['alt0-bank']:AddTransaction(citizenid, 'outbound', amount, label, sender, receiver) -- also LogTransaction

-- job / society accounts
exports['alt0-bank']:GetJobAccountBalance(job)          -- also getAccountMoney / GetAccountBalance
exports['alt0-bank']:AddJobAccountMoney(job, amount)     -- also AddMoney / addAccountMoney
exports['alt0-bank']:RemoveJobAccountMoney(job, amount)  -- also RemoveMoney / removeAccountMoney
exports['alt0-bank']:SetJobAccountMoney(job, amount)
exports['alt0-bank']:GetJobAccount(job)
exports['alt0-bank']:CreateJobAccount(job, label, startBalance)

-- police records (used by ALT0 MDT)
exports['alt0-bank']:GetFinancialRecords(citizenid, days)
exports['alt0-bank']:SetFrozen(citizenid, frozen, { cid = officerCid, name = officerName, reason = reason, warrant = warrantId })
```

The aliases (`AddMoney`, `addAccountMoney`, `getAccountMoney`...) match the exports other banking scripts use, so scripts that pay into job accounts keep working after you switch.

## Client exports

```lua
exports['alt0-bank']:useBankTablet()          -- open online banking
exports['alt0-bank']:OpenDiegeticATM(atmEntity) -- open the ATM screen for that ATM prop
exports['alt0-bank']:CloseDiegeticATM()
exports['alt0-bank']:IsDiegeticATMActive()    -- true while a player is at an ATM
exports['alt0-bank']:GetCurrentATMId()
```

## Notifications from your scripts

Show a bank notification from a server script:

```lua
TriggerEvent('alt0-bank:server:notify', playerId, 'Bank', 'Message', 'success')
```
