Exports

$50 $25 Early Access | Purchase on Tebex

Server and client exports for integrating nc-banking with other resources.

Server Exports

SendBill

Send a bill using server IDs. Designed for external scripts (police, EMS, mechanic, etc.).

local success = exports['nc-banking']:SendBill(
    fromSource,  -- sender server ID
    toSource,    -- recipient server ID
    5000,        -- amount
    'Speeding ticket',  -- reason
    'police'     -- job name (optional — payment auto-deposits to job business account)
)
-- Returns: boolean

Job billing flow: When job is provided, the recipient's payment is credited to the job's business account (e.g. police fines → Police Department business account). If no business account exists for the job, payment falls back to the sender's personal bank account.

SendInvoice

Send an invoice/bill to a player (citizenid-based).

local success = exports['nc-banking']:SendInvoice(
    fromCitizenid,   -- sender
    toCitizenid,     -- recipient
    5000,            -- amount
    'Vehicle repair', -- reason
    'mechanic',      -- job name (optional — if set, payment goes to job business account)
    'Mike\'s Garage'  -- sender display name (optional)
)
-- Returns: boolean

GetCreditScore

Get a player's credit score.

local scoreData = exports['nc-banking']:GetCreditScore(source)
-- Returns: { score, tier, maxLoan, interestMod }

GetBusinessBalance

Get a business account balance by job name. No player source required.

local balance = exports['nc-banking']:GetBusinessBalance('mechanic')
-- Returns: number (0 if account not found)

AddBusinessMoney

Add money to a business account by job name. No player source required — designed for external script integration (mechanic shops, vehicle sales, taxes, etc.).

local success = exports['nc-banking']:AddBusinessMoney(
    'mechanic',         -- job name
    5000,               -- amount
    'Vehicle repair'    -- reason (optional, logged in transaction history)
)
-- Returns: boolean

RemoveBusinessMoney

Remove money from a business account by job name.

local success = exports['nc-banking']:RemoveBusinessMoney(
    'mechanic',         -- job name
    2000,               -- amount
    'Supply purchase'   -- reason (optional, logged in transaction history)
)
-- Returns: boolean (false if insufficient balance or account not found)

Note: Business money exports log transactions as SYSTEM with type business_deposit / business_withdraw. The business account must already exist (via Config.AutoBusinessJobs, Config.BusinessAutoCreate, or manual NPC creation).

Client Exports

Billing App

-- Open the standalone billing app
exports['nc-banking']:OpenBillingApp()

-- Close the billing app
exports['nc-banking']:CloseBillingApp()

-- Toggle the billing app
exports['nc-banking']:ToggleBillingApp()
Last updated 1 month ago