Skip to content

Bank

Bank

Transfer money between players using their phone numbers. Records transaction history and integrates with the framework's bank account system (GetMoney / RemoveMoney / AddMoney).

Database Tables

TablePurpose
phone_wallet_transactionsStores all bank transfer records (amount, type in/out, title, target phone)
phone_contactsRead-only -- used to resolve contacts for transfer

Server Callbacks

CallbackPurpose
gcphone:getBankBalanceReturns the player's framework bank balance
gcphone:getBankTransactionsReturns the last 50 wallet transactions for the player
gcphone:transferMoneyTransfers money from the caller to a target phone number (validates amount, balance, fee)
gcphone:getContactsForTransferReturns the player's contacts that have valid identifiers (usable as transfer targets)

Config Options

lua
Config.Bank = {
    TransferFee    = 0,         -- percentage fee applied on transfers (0 = none)
    MaxTransferAmount = 1000000 -- max single transfer
}

Exports

None.

Client Events

EventDirectionPurpose
gcphone:bankTransferReceivedServer -> ClientNotifies the receiver that they received a transfer

Released under GPL-3.0 License