Configuration ​
Everything is in shared/config.lua. The file is shared (client and server), so keep secrets out of it. Amounts are
whole currency units (integers), times are in seconds unless a key says ms.
General ​
| Option | Default | Description |
|---|---|---|
Config.Framework |
'auto' |
'qbx', 'qb', 'esx', 'standalone', or auto-detect (qbx_core → qb-core → es_extended → standalone) |
Config.Inventory |
'auto' |
'ox' (also np_inventory), 'qb', 'esx', 'none', or auto-detect |
Config.Banking |
'auto' |
'np_banking', 'renewed', 'qb', 'okok', 'esx', 'framework', or auto-detect (np_banking first). See Bridges and np_banking |
Config.Locale |
'en' |
'en' or 'de', for server messages and the UI |
Config.Debug |
false |
Debug log, and /paytest for everyone (otherwise only with the node np_payments.admin) |
Config.AutoCreateTables |
true |
Run the statements of sql/np_payments.sql at start |
Config.Material |
nil |
nil follows the server theme from np_admin. 'frosted' or 'liquid' (Liquid Glass) wins over it |
Config.Scale |
nil |
UI scale override. nil scales with the screen |
Config.Currency / Config.Thousands |
'$' / ',' |
Currency symbol and thousands separator in server messages |
Config.RefPrefix |
'PX' |
Prefix of payment references (PX-20481) |
Config.ZIndex |
1000 |
NUI z-index while the sheet is open, so it sits above the caller's NUI |
Config.MaxAmount |
10000000 |
Hard cap per request |
Config.MaxTimeout |
170 |
Hard cap for opts.timeout. Callers wait at most about 180 s |
Config.StandaloneMoney |
{ cash = 500, bank = 5000 } |
Standalone only: starting wallet per character, kept in memory |
Config.RateLimit |
{ perSecond = 10, burst = 20, maxPayload = 16384 } |
Global token bucket over every RPC and the payload size limit |
Sheet and hold ​
Config.Hold = { minMs = 700, maxMs = 1800, bigAmount = 5000 }
Config.Expiry = 60
Config.CloseDelay = 1600
Config.HideBalances = false
Config.Keys = { hold = 'E', cancel = 'ESC', quickPay = 38, quickMore = 37 }
| Option | Description |
|---|---|
Hold |
Hold-to-pay time. It scales from minMs to maxMs and reaches maxMs at bigAmount ($5,000) |
Expiry |
Seconds a checkout stays open. opts.timeout overrides it, clamped to 10..MaxTimeout |
CloseDelay |
Ms the accepted state stays visible before the sheet closes |
HideBalances |
Streamer mode for everyone: balances show as ••••. Players can also turn it on in the Pay app |
Keys.hold / cancel |
Keys the sheet reacts to |
Keys.quickPay / quickMore |
Control ids for the quick pill: 38 = E, 37 = TAB |
Categories ​
Categories drive default methods, faction rules and auto-pay. Every request has one (unknown ids become other).
Config.Categories = {
shop = { label = 'Shops', icon = 'bag-shopping', order = 1 },
food = { label = 'Food', icon = 'burger', order = 2 },
fuel = { label = 'Fuel', icon = 'gas-pump', order = 3 },
repair = { label = 'Repairs', icon = 'wrench', order = 4 },
toll = { label = 'Tolls', icon = 'road', order = 5 },
parking = { label = 'Parking', icon = 'square-parking', order = 6 },
vending = { label = 'Vending', icon = 'cookie-bite', order = 7 },
medical = { label = 'Medical', icon = 'kit-medical', order = 8 },
fine = { label = 'Fines', icon = 'gavel', order = 9 },
service = { label = 'Services', icon = 'handshake', order = 10 },
other = { label = 'Other', icon = 'receipt', order = 11 },
}
icon is a Font Awesome name without the fa- prefix. order sorts the list in the Pay app. np_fuel
charges every fill-up, charge and jerry can in fuel, so a player's default method and faction rules for fuel
apply at the pump.
Accounts, factions and businesses ​
Config.Accounts = { cash = true, savings = true, shared = true, business = true, faction = true, cards = true }
Config.Factions = {
police = { label = 'LSPD Expenses', icon = 'shield-halved', tint = 'blue', onDutyOnly = true,
categories = { 'fuel', 'repair', 'food' }, blocked = {} },
ambulance = { label = 'EMS Expenses', icon = 'truck-medical', tint = 'red', onDutyOnly = true,
categories = { 'fuel', 'repair', 'food', 'medical' }, blocked = {} },
}
Config.Businesses = {
mechanic = { label = 'Hayes Autos', icon = 'car-wrench', tint = 'orange', categories = nil, blocked = {} },
}
| Option | Description |
|---|---|
Accounts |
Which method kinds exist at all. false removes that kind from every sheet. The personal bank account always exists |
Factions[job] |
The job's society account shows as a faction account. onDutyOnly = usable only on duty, categories = only these categories (nil = all), blocked = never these |
Businesses[job] |
The job's society account shows as a business account members may spend from. Same categories / blocked fields. Every job in Config.Terminal.businesses is a business too |
Members spend under the rules below. tint is one of neutral, red, orange, rust,
pink, olive, lilac, green, blue, aqua.
Rules and approvals ​
Config.Rules = { bossGrade = 4, defaultLimit = 250, approvals = true, dayOffset = 0 }
Config.Approvals = { timeout = 60 }
| Option | Description |
|---|---|
Rules.bossGrade |
Grade at or above which a member is a boss (the framework isboss flag counts too). Bosses have no limit, edit rules and approve |
Rules.defaultLimit |
Daily limit per member without an own rule. 0 = members can't spend |
Rules.approvals |
Over-limit spends can ask a boss instead of declining |
Rules.dayOffset |
Hours added to UTC for the daily reset |
Approvals.timeout |
Seconds a boss has to decide. It never runs past the request's own expiry |
Split, tip and pay later ​
Config.Split = { enabled = true, distance = 5.0, timeout = 45, maxParts = 4 }
Config.Tip = { presets = { 0, 10, 15, 20 }, maxPct = 100 }
Config.Later = {
invoice = { enabled = true, days = 3, lateFee = 10, mirrorPhone = false },
instalments = { enabled = true, count = 4, fee = 4, min = 500, intervalDays = 7 },
qr = { enabled = true, days = 1 },
tick = 60,
}
| Option | Description |
|---|---|
Split.distance / timeout / maxParts |
Players within 5 m can take a part, they have 45 s to pay it, at most 4 parts per checkout |
Tip.presets / maxPct |
Tip presets in % and the highest custom tip in % of the amount |
Later.invoice |
Due in days, then lateFee % of the open amount is added once. mirrorPhone also puts invoices and instalments into the np_phone Wallet (off by default) |
Later.instalments |
count invoices every intervalDays days, fee % added once, only for amounts of at least min |
Later.qr |
A 6-character code anyone can pay in the Pay app, valid for days |
Later.tick |
Seconds between late-fee checks |
Wallet mirror
With mirrorPhone = true, turn off np_phone's Config.City.invoicePayout. Otherwise np_phone and np_payments both credit the payee.
Split, tip and pay later only show when the caller allows them. See Split, tip & pay later.
Terminal ​
Config.Terminal = {
enabled = true,
distance = 3.0,
requestTimeout = 30,
cooldown = 5,
command = 'terminal',
businesses = {
mechanic = {
label = 'Hayes Autos', sub = 'Strawberry', icon = 'car-wrench', tint = 'orange', category = 'repair',
commission = 10, onDuty = true,
catalogue = {
{ id = 'repair', label = 'Engine repair', price = 450, icon = 'wrench', tint = 'orange' },
{ id = 'body', label = 'Body work', price = 300, icon = 'car-burst', tint = 'rust' },
{ id = 'tyres', label = 'Tyre change', price = 120, icon = 'circle-dot', tint = 'neutral' },
{ id = 'tow', label = 'Towing', price = 200, icon = 'truck-pickup', tint = 'olive' },
},
},
},
}
See Player terminal for every business field.
Quick pay, PIN, cards, receipts ​
Config.Quick = { enabled = true, autoMax = 25, timeout = 30 }
Config.Pin = { over = 100, tries = 3, length = 4 }
Config.Cards = { items = { 'bank_card', 'credit_card' } }
Config.Receipt = { enabled = true, item = 'receipt' }
| Option | Description |
|---|---|
Quick.enabled |
The quick pill. Off = QuickPay opens the full sheet |
Quick.autoMax |
Largest amount auto-pay charges without asking |
Quick.timeout |
Seconds the pill stays up |
Pin.over |
Bank charges above this ask for the PIN. Cards always ask. Only on providers that support PINs (np_banking) |
Pin.tries / length |
Wrong PINs before the card is blocked, PIN length (4..6) |
Cards.items |
Inventory items that count as bank cards. Needs a card-capable provider (np_banking, whose card item is bank_card) |
Receipt |
Give a receipt item after a payment. The item carries reference, merchant, amount, tip, method, date and the line items |
Phone, notifications, integrations ​
Config.Phone = { enabled = 'auto', id = 'np_payments', label = 'Pay', icon = 'fa-solid fa-wallet', tint = 'green',
ui = 'web/dist/phone.html' }
Config.Notify = { sharedMembers = true, duration = 5000 }
Config.UseNpHud = 'auto'
Config.UseNpMenu = 'auto'
Config.UseNpInventory = 'auto'
| Option | Description |
|---|---|
Phone |
The np_phone Pay app. 'auto' = when np_phone runs. See Pay app |
Notify.sharedMembers |
Members of a shared account get a toast "X paid $Y" |
Notify.duration |
Toast duration in ms |
UseNpHud |
Toasts, boss approval toasts and HUD zone claims through np_hud |
UseNpMenu |
"Charge (terminal)" and "Give cash" context options on players |
UseNpInventory |
Lock np_inventory while the sheet is open, and register the receipt item at runtime |
Every 'auto' integration is used only while that resource is started, and every call goes through pcall.
Client merchants ​
Client code can open a checkout only for merchants listed here. Label, category, methods, payee and the maximum amount come from this table, never from the client.
Config.ClientMerchants = {
vending = { label = 'Vending machine', icon = 'cookie-bite', tint = 'neutral', category = 'vending', maxAmount = 20,
methods = { 'cash', 'personal' }, payee = { type = 'none' } },
}
See Charging from your resource → From the client.
Give cash and admin ​
Config.GiveCash = { enabled = true, command = 'givecash', distance = 3.0, max = 10000, step = 10 }
Config.Admin = { command = 'paytest' }
| Option | Description |
|---|---|
GiveCash |
Hand cash to a player within 3 m, up to $10,000 in steps of $10. See Quick pay & give cash |
Admin.command |
Command name for /paytest. Who may use it is the permission node np_payments.admin (Permissions); the old Admin.ace key is gone |
Editable in np_admin ​
While np_admin runs, staff can change part of the config live under Resource settings →
Payments (shared/np_admin_settings.lua). shared/config.lua stays the default and np_admin stores only the
overrides. Without np_admin the config file is all there is.
| Category | Fields |
|---|---|
| General | Default language, material, debug (+ /paytest for everyone), currency symbol, max amount per payment, checkout expiry, hide balances |
| Hold to pay | Shortest hold, longest hold, amount for the longest hold |
| Member rules | Boss grade, default daily limit, over-limit approvals, daily reset offset, approval timeout |
| Split & tip | Split on / off, split distance, answer timeout, max parts, tip presets, max tip |
| Pay later | Invoices (due days, late fee), instalments (count, fee, minimum amount), QR pay later |
| Terminal | Player terminals on / off, distance, customer answer timeout, cooldown per customer |
| Quick pay & PIN | Quick pay pill, auto-pay limit, bank PIN threshold, PIN tries |
| Receipts & cash | Receipt items, give cash on / off, give cash max |
Most fields apply live. Language, material, currency symbol, hold times, split on / off and tip presets reach a client when its NUI initialises (next connect). Turning terminals or give cash on / off updates the player menu entry on the next connect.