Exports
ARS Banking exposes a small server-side integration surface for account management, money operations, POS workflows, and qb compatibility.
Server Exports
Section titled “Server Exports”Account Management
Section titled “Account Management”GetAccount
Section titled “GetAccount”Side:serverDoes:Returns a copy of a cached account record.Parameters:accountName stringReturns:table|nil
local account = exports['ars_banking']:GetAccount('police')if account then print(account.account_name, account.account_number)endGetAccountBalance
Section titled “GetAccountBalance”Side:serverDoes:Returns the current balance for an account.Parameters:accountName stringReturns:number
local balance = exports['ars_banking']:GetAccountBalance('police')print(balance)CreatePlayerAccount
Section titled “CreatePlayerAccount”Side:serverDoes:Creates a player-owned shared account.Parameters:playerId number,accountName string,accountBalance number,accountUsers stringReturns:boolean
local ok = exports['ars_banking']:CreatePlayerAccount(source, 'shop_savings', 0, '[]')CreateJobAccount
Section titled “CreateJobAccount”Side:serverDoes:Creates a job society account.Parameters:accountName string,accountBalance numberReturns:boolean
local ok = exports['ars_banking']:CreateJobAccount('police', 5000)CreateGangAccount
Section titled “CreateGangAccount”Side:serverDoes:Creates a gang society account.Parameters:accountName string,accountBalance numberReturns:boolean
local ok = exports['ars_banking']:CreateGangAccount('ballas', 2000)AddAccountMoney
Section titled “AddAccountMoney”Side:serverDoes:Adds money to any bank account and writes a statement.Parameters:accountName string,amount number,reason string,transactionData table|nil,skipLock boolean|nilReturns:table
local result = exports['ars_banking']:AddAccountMoney('police', 5000, 'Budget increase')if result.success then print(result.newBalance)endRemoveAccountMoney
Section titled “RemoveAccountMoney”Side:serverDoes:Removes money from any bank account and writes a statement.Parameters:accountName string,amount number,reason string,transactionData table|nil,skipLock boolean|nilReturns:table
local result = exports['ars_banking']:RemoveAccountMoney('police', 1000, 'Equipment purchase')POS Integration
Section titled “POS Integration”RequestPOSPayment
Section titled “RequestPOSPayment”Side:serverDoes:Starts a POS payment session for a customer and waits for the result.Parameters:customerSource number,payload tableReturns:boolean,string
local success, message = exports['ars_banking']:RequestPOSPayment(source, { amount = 250, recipientAccount = 'burgershot', merchantLabel = 'Burger Shot', businessName = 'Burger Shot', description = 'Meal order #1024',})ChargePlayerCard
Section titled “ChargePlayerCard”Side:serverDoes:Charges a player’s card without depositing the funds into an ars_banking account.Parameters:customerSource number,amount number,options tableReturns:boolean,string
local success, message = exports['ars_banking']:ChargePlayerCard(source, 500, { merchantLabel = '24/7 Store', description = 'Bread x5'})RefundPosTransaction
Section titled “RefundPosTransaction”Side:serverDoes:Refunds a completed POS transaction.Parameters:source number,transactionId string,reason string|nilReturns:boolean,string
local success, message = exports['ars_banking']:RefundPosTransaction(source, 'INV-123456-1001', 'Customer return')UnregisterPosTerminal
Section titled “UnregisterPosTerminal”Side:serverDoes:Removes a registered POS terminal.Parameters:source number,posId stringReturns:boolean,string
local success, message = exports['ars_banking']:UnregisterPosTerminal(source, 'POS-001')QB Compatibility Exports
Section titled “QB Compatibility Exports”Note: These exports are available when
Config.CompatibilityLayer.Enabled = true.
QB-Banking Compatibility
Section titled “QB-Banking Compatibility”| Export | Parameters | Returns | Purpose |
|---|---|---|---|
AddMoney | account, amount, reason | boolean | Adds money to an account. |
RemoveMoney | account, amount, reason | boolean | Removes money from an account. |
GetAccountBalance | account | number | Gets the current account balance. |
GetAccount | accountIdentifier | `table | nil` |
TransferMoney | fromAccount, toAccount, amount, reason | boolean | Transfers money between accounts. |
Example:
exports['ars_banking']:AddMoney('police', 10000, 'Salary payment')exports['ars_banking']:TransferMoney('police', 'ambulance', 500, 'Shared costs')QB-Management Compatibility
Section titled “QB-Management Compatibility”| Export | Parameters | Returns | Purpose |
|---|---|---|---|
AddMoneyJob | job, amount | boolean | Adds money to a job account. |
RemoveMoneyJob | job, amount | boolean | Removes money from a job account. |
AddGangMoney | gang, amount | boolean | Adds money to a gang account. |
RemoveGangMoney | gang, amount | boolean | Removes money from a gang account. |
GetAccountJob | job | `table | nil` |
Example:
exports['ars_banking']:AddMoneyJob('police', 5000)exports['ars_banking']:RemoveGangMoney('ballas', 1000)Client Events
Section titled “Client Events”ars_banking:showNotification
Section titled “ars_banking:showNotification”Side:clientUsage:listen or triggerDoes:Shows the banking notification UI used by the script.
TriggerEvent('ars_banking:showNotification', 'success', 'Deposit complete', 5000)Note: This guide is written by a third party. If you find any incorrect or outdated information, please contact us on Discord so we can update it for you.