Kartik Scripts

Server Events

kartik-banking fires these events on the server so your scripts (logging, audit webhooks, economy tools) can react to money moving. Listen with AddEventHandler in any server script. Players cannot trigger them.

Each event fires only after the money has moved or the record is saved. Every payload includes timestamp (unix seconds). Fields that do not apply to an action are nil.

AddEventHandler('kartik-banking:server:onDeposit', function(data)
    print(('$%d deposited into account %s'):format(data.amount, data.accountNumber))
end)

onDeposit

kartik-banking:server:onDeposit: a deposit at a bank or ATM, or CreditAccount.

FieldDescription
origin'bank', 'atm' or 'export'
sourcePlayer server id (when a player did it)
accountNumberAccount the money went into
accountType, ownerAccount type and owner (export deposits)
cardNumberCard used (bank / ATM deposits)
bankType'fleeca' or 'swiss'
amountAmount
reasonNote / reason

onWithdraw

kartik-banking:server:onWithdraw: a withdrawal at a bank or ATM, or DebitAccount. Same fields as onDeposit.

onTransfer

kartik-banking:server:onTransfer: any account to account transfer (players, invoices, POS, loans).

FieldDescription
sourcePlayer server id, nil when the system moved it
fromAccount, toAccountAccount numbers
bankType'fleeca' or 'swiss'
amountAmount
reasonNote / reason

onInvoiceCreated

kartik-banking:server:onInvoiceCreated: an invoice / bill is created.

FieldDescription
invoiceIdNew invoice id
accountNumber, accountType, ownerWho is billed
issuerAccountNumberWho gets paid (if set)
senderNameSender
amountAmount (per installment for EMI)
titleTitle
billType'one-time', 'subscription' or 'emi'
frequency, nextDueBilling schedule

onInvoicePaid

kartik-banking:server:onInvoicePaid: an invoice payment succeeds (manual or autopay).

FieldDescription
invoiceIdInvoice id
accountNumber, ownerWho paid
issuerAccountNumberWho got paid (if set)
amountAmount paid
titleTitle
billType'one-time', 'subscription' or 'emi'

onInvoiceCancelled

kartik-banking:server:onInvoiceCancelled: an invoice is cancelled with CancelInvoice. Fields: invoiceId, accountNumber, issuerAccountNumber, amount, title, reason.

onPosPayment

kartik-banking:server:onPosPayment: a POS terminal payment completes.

FieldDescription
transactionIdPOS transaction id
businessName, businessAccountThe business that was paid
businessSource, customerSourceEmployee and customer server ids
amountAmount charged
fee, netAmountTransaction fee and amount after the fee
paymentMethodHow the customer paid
reasonReason entered on the terminal

On this page