Cards with PIN
Physical with expiry and virtual in the Wallet.
coe_bankingBanking System
Branches, card-and-PIN ATMs, credit, loans and business accounts
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.
The balance stays in the coe_economy ledger: swapping the basic bank for the advanced one moves or converts no money.
Physical with expiry and virtual in the Wallet.
Tiers, points, installments and late interest.
Business cash with cards and per-operator statements.
Same balance and statements as coe_bank.
Every COE Framework script strictly follows the principle of separation of concerns. Interact with the 3D stack below:
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.
Manage your city without relying on developers. Runtime parameters, auditing, and ACE-protected commands:
exports.coe_bank:Yield()
exports.coe_bank:Status()
exports.coe_economy:Ledger(characterId, limit)
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).
| Parameter | Type |
|---|---|
characterId | any |
local result = exports['coe_banking']:AdminAccount(characterId)exports['coe_banking']:AdminBusinessAccount(businessId, filter)
→ any
Export server AdminBusinessAccount (server/business.lua).
| Parameter | Type |
|---|---|
businessId | any |
filter | any |
local result = exports['coe_banking']:AdminBusinessAccount(businessId, filter)exports['coe_banking']:AdminBusinessAccounts()
→ any
Export server AdminBusinessAccounts (server/business.lua).
No parameters.
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.
| Parameter | Type |
|---|---|
businessId | any |
delta | any |
note | any |
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.
| Parameter | Type |
|---|---|
cardId | any |
value | any |
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).
| Parameter | Type |
|---|---|
cardId | any |
action | any |
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.
| Parameter | Type |
|---|---|
requestId | any |
decision | any |
local result = exports['coe_banking']:AdminDecideRequest(requestId, decision)exports['coe_banking']:AdminForgiveLoan(loanId)
→ any
Export server AdminForgiveLoan (server/main.lua).
| Parameter | Type |
|---|---|
loanId | any |
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.
| Parameter | Type |
|---|---|
characterId | any |
input | any |
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.
local result = exports['coe_banking']:AdminLoanRequests()exports['coe_banking']:AdminPoints(characterId, delta)
→ any
Export server AdminPoints (server/main.lua).
| Parameter | Type |
|---|---|
characterId | any |
delta | any |
local result = exports['coe_banking']:AdminPoints(characterId, delta)exports['coe_banking']:AdminSaveTiers(list)
→ any
Export server AdminSaveTiers (server/main.lua).
| Parameter | Type |
|---|---|
list | any |
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.
| Parameter | Type |
|---|---|
characterId | any |
data | any |
local result = exports['coe_banking']:AdminSetCredit(characterId, data)exports['coe_banking']:AdminTiers()
→ any
Export server AdminTiers (server/main.lua).
No parameters.
local result = exports['coe_banking']:AdminTiers()exports['coe_banking']:BusinessTablet(playerId, characterId, businessId, payload)
→ any
Export server BusinessTablet (server/business.lua).
| Parameter | Type |
|---|---|
playerId | any |
characterId | any |
businessId | any |
payload | any |
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).
| Parameter | Type |
|---|---|
cardId | any |
amount | any |
description | any |
local result = exports['coe_banking']:CardPurchase(cardId, amount, description)exports['coe_banking']:CardRefund(cardId, amount, description)
→ any
Export server CardRefund (server/main.lua).
| Parameter | Type |
|---|---|
cardId | any |
amount | any |
description | any |
local result = exports['coe_banking']:CardRefund(cardId, amount, description)exports['coe_banking']:PosCards(playerId)
→ any
Export server PosCards (server/main.lua).
| Parameter | Type |
|---|---|
playerId | any |
local result = exports['coe_banking']:PosCards(playerId)exports['coe_banking']:PosPurchase(playerId, cardId, pin, amount, description)
→ any
Export server PosPurchase (server/main.lua).
| Parameter | Type |
|---|---|
playerId | any |
cardId | any |
pin | any |
amount | any |
description | any |
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).
| Parameter | Type |
|---|---|
playerId | any |
payment | any |
amount | any |
description | any |
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).
| Parameter | Type |
|---|---|
playerId | any |
local result = exports['coe_banking']:ShopOptions(playerId)exports['coe_banking']:ShopRefund(_, ref, amount, description)
→ any
Export server ShopRefund (server/main.lua).
| Parameter | Type |
|---|---|
_ | any |
ref | any |
amount | any |
description | any |
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.
| Parameter | Type |
|---|---|
playerId | any |
appId | any |
action | any |
payload | any |
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.
| Parameter | Type |
|---|---|
playerId | integer |
appId | string |
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.
| Parameter | Type |
|---|---|
cardIds | any |
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.
| Parameter | Type |
|---|---|
playerId | any |
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.
| Parameter | Type |
|---|---|
playerId | any |
local result = exports['coe_banking']:WalletIssueVirtual(playerId)exports['coe_banking']:WalletLink(playerId, cardId, pin)
→ any
Links a card: the account's virtual card, or a physical card held by the player with its PIN. Errors follow ATM behavior.
| Parameter | Type |
|---|---|
playerId | any |
cardId | any |
pin | any |
local result = exports['coe_banking']:WalletLink(playerId, cardId, pin)This module registers no commands: it is driven by exports and events.