GetAccountDataByAccountNumber

exports['kartik-banking']:GetAccountDataByAccountNumber(accountNumber)

🔹 Description

Retrieves detailed information about a bank account using its account number. This includes balance, account metadata, and associated debit card number (if available). Special handling is applied for personal Fleeca accounts.


🔧 Parameters

Name
Type
Required
Description

accountNumber

string

The account number to fetch details for.


📤 Returns

Returns a table with the following fields if found, or false if the account does not exist.

Return Structure:

Key
Type
Description

accountType

string

Account type ("personal", "business", etc.).

bankType

string

Bank type ("fleeca", "swiss", etc.).

owner

string

Citizen ID of the account owner.

status

string

Account status ("active", "frozen", etc.).

accountName

string

Custom display name of the account.

members

table

A decoded JSON table of account members (for company/shared accounts).

balance

number

The current account balance. If Fleeca personal, fetched from player data.

income

number

Total income logged on the account.

expenses

number

Total expenses logged on the account.

transfer

number

Total amount transferred from the account.

debitCardNumber

string

Debit card number (if any).


🧠 Example Usage

local accountData = exports['kartik-banking']:GetAccountDataByAccountNumber("FLEECA12345")

if accountData then
    print("Account Name:", accountData.accountName)
    print("Balance:", accountData.balance)
else
    print("Account not found.")
end

❌ Returns false If:

  • The account is not found in kartik_banking_accounts.


Last updated