Kartik Scripts

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

NameTypeRequiredDescription
datatable✅A table containing transaction information (see details below).

Expected Structure of data

KeyTypeRequiredDescription
account_numberstring✅Account number involved in the transaction.
typestring✅Type of transaction: "deposit", "withdraw", "paycheck", or "transfer".
amountnumber✅The transaction amount.
memostring✅A short description or note for the transaction.
bankTypestring❌(Optional) The bank type. If not provided, it is fetched using the account number.
extra_infotable❌(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:

exports['kartik-banking']:LogBankTransaction({
    account_number = "FLEECA123",
    type = "transfer",
    amount = 500,
    memo = "Rent Payment",
    extra_info = {
        transfer_to = "SWISS456",
        transfer_from = "FLEECA123"
    }
})

  • GetAccountDataByAccountNumber(accountNumber)

On this page