Log Bank Transaction
exports['kartik-banking']:LogBankTransaction(data)πΉ Description
Records a banking transaction (deposit, withdraw, paycheck, or transfer) for an account. It stores the transaction in the database, updates relevant stats, and optionally sends webhook logs for audit and monitoring.
π§Ύ Parameters
data
table
β
A table containing transaction information (see details below).
Expected Structure of data
account_number
string
β
Account number involved in the transaction.
type
string
β
Type of transaction: "deposit", "withdraw", "paycheck", or "transfer".
amount
number
β
The transaction amount.
memo
string
β
A short description or note for the transaction.
bankType
string
β
(Optional) The bank type. If not provided, it is fetched using the account number.
extra_info
table
β
(For transfers) Additional data like transfer_to and transfer_from account numbers.
π§ Example Usage
exports['kartik-banking']:LogBankTransaction({
account_number = "SWISS12345",
type = "deposit",
amount = 1000,
memo = "Salary Deposit",
bankType = "swiss"
})For a transfer:
π¦ Related Exports / Functions
GetAccountDataByAccountNumber(accountNumber)
Last updated