Only events that form a stable integration surface are listed here. Internal protocol events (ATM session handshake, PIN flow, heartbeat, invoice list refresh, IK sync) are intentionally undocumented, since their shape is subject to change.
Server events#
nx_realbanking:server:openBank#
Opens the bank app for the calling player. Use this to wire your own
bank peds, ox_target zones, or custom entry points.
-- From a client scriptTriggerServerEvent('nx_realbanking:server:openBank')The server validates the player, fetches their pending invoice summary, and sends the bank NUI state down to the client. No payload is needed.
nx_realbanking:server:bankEvent#
Fires once for every event the bank logs in a category that is switched on
in Config.Logging, whether or not a webhook is set for it. Listen to this
instead of watching a Discord channel or patching the resource. Events below
a category's minSeverity do not fire it, and neither does anything while
Config.Logging.enabled is off.
AddEventHandler('nx_realbanking:server:bankEvent', function(entry) if entry.event == 'credit_collections_seizure' then -- entry.category, entry.severity, entry.source, entry.citizenId endend)The payload carries event, category, severity, and whichever of source
and citizenId applies. Background work such as auto-payments and debt
collection runs with no player connected, so treat source as optional.
nx_realbanking:server:invoiceStateChanged#
A server-local event fired on every invoice status change, for every invoice type: created, paid, cancelled and overdue. Use it to keep your own records in step, for example to clear a ticket once its fine is paid.
AddEventHandler('nx_realbanking:server:invoiceStateChanged', function(data) -- data.refId : string -- data.type : 'personal' | 'society' | 'fine' -- data.status : 'pending' | 'paid' | 'cancelled' | 'overdue' -- data.amount : number (total including VAT) -- data.receiverIdentifier : string ('society:<job>' for a company invoice) -- data.paymentMethod : 'bank' | 'cash' | 'auto' | nil (set once paid)end)Listen with AddEventHandler. It is not a net event, so
RegisterNetEvent is not needed and clients cannot trigger it.
nx_realbanking:societiesReady#
A server-local event fired each time nx_realbanking starts. Societies added with
RegisterSociety live in memory, so register yours from here:
AddEventHandler('nx_realbanking:societiesReady', function() exports.nx_realbanking:RegisterSociety('mechanic', { label = 'Hayes Autos', canBill = true })end)Register once at your own start as well, for the case where nx_realbanking was already running when your resource started.
Client events#
These are broadcast to the player and are safe to listen to from your own client-side resources.
Every invoice event carries its reference under both refId and
ref_id, so either spelling works.
nx_realbanking:client:invoiceReceived#
Fired when a new invoice is delivered to the player.
RegisterNetEvent('nx_realbanking:client:invoiceReceived', function(data) -- data.refId : string -- data.amount : number (total including VAT) -- data.sender : string -- data.label : string -- data.requiresAcceptance : boolean -- data.company : string|nil (set when the invoice is addressed to the player's company) print(('New invoice from %s for $%.2f'):format(data.sender, data.amount))end)For an invoice addressed to a company, this fires on every online member who
may pay it, with data.company set to the company's label.
nx_realbanking:client:invoicePaid#
Fired on the sender when one of their invoices has been settled.
RegisterNetEvent('nx_realbanking:client:invoicePaid', function(data) -- data.refId : string -- data.amount : number (total including VAT)end)nx_realbanking:client:invoiceOverdue#
Fired when one of the player's invoices transitions to overdue.
RegisterNetEvent('nx_realbanking:client:invoiceOverdue', function(data) -- data.refId : string -- data.amount : numberend)nx_realbanking:client:invoiceDueSoon#
Fired on the receiver shortly before auto-payment collects an overdue
invoice. Requires Config.Autopay.notifyBefore.enabled.
RegisterNetEvent('nx_realbanking:client:invoiceDueSoon', function(data) -- data.refId : string -- data.amount : number -- data.daysBefore : numberend)nx_realbanking:client:invoiceAutopaid#
Fired on the receiver when auto-payment has collected an invoice from their account.
RegisterNetEvent('nx_realbanking:client:invoiceAutopaid', function(data) -- data.refId : string -- data.amount : numberend)nx_realbanking:client:creditUpdated#
Fired when the player's credit-card state changes (new card, limit change, tier change, card frozen). Carries no payload, so call the appropriate export to re-read state.
RegisterNetEvent('nx_realbanking:client:creditUpdated', function() -- Re-query credit stateend)