Events
Events exposed by wasabi_billing for integration hooks.
The resource folder must be named wasabi_billing.
Client eventsβ
wasabi_billing:uiStateβ
Fired when the billing UI opens or closes. Useful for HUDs and other resources that should hide while billing is open.
AddEventHandler('wasabi_billing:uiState', function(state)
if state then
print('Billing UI is now open')
else
print('Billing UI is now closed')
end
end)
state: true when open, false when closed.
wasabi_billing:openUIβ
Opens the billing UI in a specific view. Optionally pass a modal as the second argument: 'create', 'payref', or 'inspect'.
TriggerEvent('wasabi_billing:openUI', 'overview') -- 'overview' | 'personal' | 'society' | 'admin'
Usually triggered from the server:
TriggerClientEvent('wasabi_billing:openUI', source, 'admin')
wasabi_billing:closeUIβ
Closes the billing UI.
TriggerEvent('wasabi_billing:closeUI')
-- or
TriggerClientEvent('wasabi_billing:closeUI', source)
wasabi_billing:refreshβ
Refreshes the open billing UI payload from the server.
TriggerClientEvent('wasabi_billing:refresh', source)
wasabi_billing:openInvoiceβ
Opens the invoice receipt UI pre-seeded with a single invoice (physical invoice item flow). The payload is an invoice DTO prepared by the server.
AddEventHandler('wasabi_billing:openInvoice', function(invoice)
-- Invoice receipt UI opens with this invoice seeded
end)
Prefer listening to wasabi_billing:uiState for HUD integrations. openUI, closeUI, refresh, and openInvoice are intended for controlled integrations. Triggering them from unrelated resources can put the NUI focus and local state out of sync.