T3 // Economy & Business

coe_banking

Banking System

Branches, card-and-PIN ATMs, credit, loans and business accounts

TERMINAL BANCÁRIO // CONCILIAÇÃO ACID
PACIFIC STANDARD BANK // CIDADÃO #1001
$ 148.250,00
CONCILIADO
EXTRATO DO LIVRO-RAZÃO (LEDGER)
Salário Mecânica LS
TX-904812 · coe_jobs
+$ 2.400,00
Compra de Peças
TX-904799 · coe_shops
-$ 850,00
HASH: 8f2b..41c9 ACID: ATOMIC
01 // OVERVIEW

Banking on top of coe_economy: branches, ATMs with a card (card_bank) and PIN, cash, cards with expiry, a virtual card in the phone Wallet, tiered credit with points, installment loans and business accounts with cards and loan requests. Replaces the basic bank (coe_bank) keeping the same balance and statement reasons.

On FiveM Enhanced

The balance stays in the coe_economy ledger: swapping the basic bank for the advanced one moves or converts no money.

02 // FEATURES

What the module delivers

01

Cards with PIN

Physical with expiry and virtual in the Wallet.

02

Credit & Loans

Tiers, points, installments and late interest.

03

Business Accounts

Business cash with cards and per-operator statements.

04

Seamless Upgrade

Same balance and statements as coe_bank.

ARCHITECTURAL LAYERS // CLEAN ARCHITECTURE

4-Layer Isolation with 0.00 ms Idle

Every COE Framework script strictly follows the principle of separation of concerns. Interact with the 3D stack below:

L4
Presentation & NUI
HTML5 · CSS tokens · CoE UI
CEF DX12
L3
Application & Server
Atomic locks · Rate limiting
Auth Server
L2
Platform & HAL
Core.Platform · Mock natives
Gen9 HAL
L1
Domain & ACID Database
Prepared SQL · MariaDB pool
ACID Pool
LAYER 04 // PRESENTATION & NUI

Responsive NUI & CoE UI Design System

Built with vanilla HTML5, CSS3 tokens, and modern JavaScript. No heavyweight frameworks (React/Vue/Electron). Rendered directly in FiveM DX12's Chromium Embedded Framework at 0.00 ms while closed.

Five themes supported in real time through CSS variables (--coe-accent, --coe-surface)
Fully keyboard-navigable (Tab, Esc, Enter) and ARIA-accessible
Secure asynchronous communication with the FiveM client via fetch("https://...")
ADMIN POWERS // OPERATION & MANAGEMENT

What this script delivers to Server Owners

Manage your city without relying on developers. Runtime parameters, auditing, and ACE-protected commands:

🔁
Hand over to a full bank
A full bank pack takes over branches, ATMs and blips with the coe.bank.yield ACE.
exports.coe_bank:Yield()
🔍
Basic bank status
Checks whether the basic bank is serving and which resource took over.
exports.coe_bank:Status()
📒
Per-character ledger
Balance and statement come from coe_economy, with every movement recorded.
exports.coe_economy:Ledger(characterId, limit)
03 // EXPORTS

Public API 28

Typed contracts to call from other resources. Full types live in types.lua and in the docs reference.

exports['coe_banking']:AdminAccount(characterId) → any

Export server AdminAccount (server/main.lua).

ParameterType
characterIdany
LUA
local result = exports['coe_banking']:AdminAccount(characterId)
exports['coe_banking']:AdminBusinessAccount(businessId, filter) → any

Export server AdminBusinessAccount (server/business.lua).

ParameterType
businessIdany
filterany
LUA
local result = exports['coe_banking']:AdminBusinessAccount(businessId, filter)
exports['coe_banking']:AdminBusinessAccounts() → any

Export server AdminBusinessAccounts (server/business.lua).

No parameters.

LUA
local result = exports['coe_banking']:AdminBusinessAccounts()
exports['coe_banking']:AdminBusinessAdjust(businessId, delta, note) → any

Staff cash adjustment: a positive delta credits the business cash balance; a negative delta debits it. Uses the admin_adjustment reason and the supplied note.

ParameterType
businessIdany
deltaany
noteany
LUA
local result = exports['coe_banking']:AdminBusinessAdjust(businessId, delta, note)
exports['coe_banking']:AdminBusinessCardLimit(cardId, value) → any

Set op to limit (value is the daily limit; 0 means no limit). Blocking, unblocking, and expiration are handled by AdminCard.

ParameterType
cardIdany
valueany
LUA
local result = exports['coe_banking']:AdminBusinessCardLimit(cardId, value)
exports['coe_banking']:AdminCard(cardId, action) → any

action: block, unblock, or extend (sets a new expiration date starting now).

ParameterType
cardIdany
actionany
LUA
local result = exports['coe_banking']:AdminCard(cardId, action)
exports['coe_banking']:AdminDecideRequest(requestId, decision) → any

decision is { approve = bool, rate, installments, reason }. On approval, funds go into the business cash balance and the current owner and partners assume the debt; installments are withdrawn from the business balance, and any shortfall makes all of them delinquent.

ParameterType
requestIdany
decisionany
LUA
local result = exports['coe_banking']:AdminDecideRequest(requestId, decision)
exports['coe_banking']:AdminForgiveLoan(loanId) → any

Export server AdminForgiveLoan (server/main.lua).

ParameterType
loanIdany
LUA
local result = exports['coe_banking']:AdminForgiveLoan(loanId)
exports['coe_banking']:AdminGrantLoan(characterId, input) → any

input: { principal, rate (% total), installments, note }. Funds are credited to the account; installments are debited automatically.

ParameterType
characterIdany
inputany
LUA
local result = exports['coe_banking']:AdminGrantLoan(characterId, input)
exports['coe_banking']:AdminLoanRequests() → any

Returns the business-loan request queue, including pending requests and the latest decisions.

No parameters.

LUA
local result = exports['coe_banking']:AdminLoanRequests()
exports['coe_banking']:AdminPoints(characterId, delta) → any

Export server AdminPoints (server/main.lua).

ParameterType
characterIdany
deltaany
LUA
local result = exports['coe_banking']:AdminPoints(characterId, delta)
exports['coe_banking']:AdminSaveTiers(list) → any

Export server AdminSaveTiers (server/main.lua).

ParameterType
listany
LUA
local result = exports['coe_banking']:AdminSaveTiers(list)
exports['coe_banking']:AdminSetCredit(characterId, data) → any

data is { tier, customLimit (number or false), tierLocked }. Creates the credit account if it does not exist.

ParameterType
characterIdany
dataany
LUA
local result = exports['coe_banking']:AdminSetCredit(characterId, data)
exports['coe_banking']:AdminTiers() → any

Export server AdminTiers (server/main.lua).

No parameters.

LUA
local result = exports['coe_banking']:AdminTiers()
exports['coe_banking']:BusinessTablet(playerId, characterId, businessId, payload) → any

Export server BusinessTablet (server/business.lua).

ParameterType
playerIdany
characterIdany
businessIdany
payloadany
LUA
local result = exports['coe_banking']:BusinessTablet(playerId, characterId, businessId, payload)
exports['coe_banking']:CardPurchase(cardId, amount, description) → any

Returns { ok = true, points, available } or { ok = false, error } (no_card, card_blocked, card_expired, no_credit, credit_late, credit_limit, busy).

ParameterType
cardIdany
amountany
descriptionany
LUA
local result = exports['coe_banking']:CardPurchase(cardId, amount, description)
exports['coe_banking']:CardRefund(cardId, amount, description) → any

Export server CardRefund (server/main.lua).

ParameterType
cardIdany
amountany
descriptionany
LUA
local result = exports['coe_banking']:CardRefund(cardId, amount, description)
exports['coe_banking']:PosCards(playerId) → any

Export server PosCards (server/main.lua).

ParameterType
playerIdany
LUA
local result = exports['coe_banking']:PosCards(playerId)
exports['coe_banking']:PosPurchase(playerId, cardId, pin, amount, description) → any

Export server PosPurchase (server/main.lua).

ParameterType
playerIdany
cardIdany
pinany
amountany
descriptionany
LUA
local result = exports['coe_banking']:PosPurchase(playerId, cardId, pin, amount, description)
exports['coe_banking']:ShopCharge(playerId, payment, amount, description) → any

Export server ShopCharge (server/main.lua).

ParameterType
playerIdany
paymentany
amountany
descriptionany
LUA
local result = exports['coe_banking']:ShopCharge(playerId, payment, amount, description)
exports['coe_banking']:ShopOptions(playerId) → any

Store point-of-sale options (registered with coe_shops:RegisterPaymentMethod, method card): active physical cards held by the player are available, and payment requires the PIN. The caller remains the store (Credit.PurchaseCallers).

ParameterType
playerIdany
LUA
local result = exports['coe_banking']:ShopOptions(playerId)
exports['coe_banking']:ShopRefund(_, ref, amount, description) → any

Export server ShopRefund (server/main.lua).

ParameterType
_any
refany
amountany
descriptionany
LUA
local result = exports['coe_banking']:ShopRefund(_, ref, amount, description)
exports['coe_banking']:TabletCall(playerId, appId, action, payload) → any

Called only by coe_tablet. Every action returns the updated statement in bank.

ParameterType
playerIdany
appIdany
actionany
payloadany
LUA
local result = exports['coe_banking']:TabletCall(playerId, appId, action, payload)
exports['coe_banking']:TabletVisible(playerId, appId) → boolean

Controls whether the Bank app is visible on the device. Only coe_tablet and coe_phone may call it, and the bank must be ready.

ParameterType
playerIdinteger
appIdstring
LUA
local result = exports['coe_banking']:TabletVisible(playerId, appId)
exports['coe_banking']:WalletCards(cardIds) → any

Returns the current status of up to 10 wallet cards by ID: { ok, cards = { [id] = view } }. Cards that do not exist are omitted.

ParameterType
cardIdsany
LUA
local result = exports['coe_banking']:WalletCards(cardIds)
exports['coe_banking']:WalletEligible(playerId) → any

Returns the cards the player can add to the wallet: active physical cards in inventory and the account's active virtual card.

ParameterType
playerIdany
LUA
local result = exports['coe_banking']:WalletEligible(playerId)
exports['coe_banking']:WalletIssueVirtual(playerId) → any

Requests a virtual card through the wallet, using the same rules as a bank branch. Returns the issued card.

ParameterType
playerIdany
LUA
local result = exports['coe_banking']:WalletIssueVirtual(playerId)
04 // COMMANDS

In-game commands 0

This module registers no commands: it is driven by exports and events.