Overview

Varix Billing

Varix Billing is a complete billing system for FiveM servers based on the ESX framework. It allows players with specific jobs to create invoices for other players or societies, manage them, and process payments.

Technical Foundation

  • Framework: ESX (es_extended)

  • Database: oxmysql (MySQL)

  • Languages: Lua 5.4 (Client + Server), HTML/CSS/JavaScript (NUI)

  • Dependencies: es_extended, oxmysql

  • Optional integrations: wasabi_banking, okokBanking, crm-banking, ox_lib (Notifications)


User Interface

The UI is displayed as a tablet interface. When a player opens the billing system, the character plays a tablet animation (the character looks at a tablet) and a custom 3D prop (sf_prop_sf_tablet_01a) is attached to the player. The UI appears with animated fade-in/fade-out transitions. When the mouse leaves the tablet display, the UI becomes transparent and becomes visible again when the cursor returns. Closing is possible via ESC, the power button, or the close button.

The design features a modern iOS-style tablet layout with:

  • Status bar (time, signal, battery)

  • Gradient accent colors (fully configurable)

  • Configurable app name (default: "VARIX BILLING")

  • Job badge in the header


Features

Invoices (Tabs: Incoming / Outgoing)

  • Incoming invoices for the player (private + society)

  • Outgoing invoices created by the player

  • Status system: Pending / Paid / Cancelled

  • Pay invoices (from personal bank account or society account)

  • Cancel invoices (issuer only)

  • Real-time updates: A modal notifies players about new invoices


Create New Invoice

  • Select recipients from nearby players (radius configurable)

  • The dropdown displays the ESX character name (not the Steam/FiveM name)

  • Invoice type: Private (to player) or Society (to society account)

  • For society invoices: Select a job template or enter a custom reason

  • Freely configurable invoice amount


Template System

  • Jobs can create invoice templates with label + default amount

  • Templates are job-specific (only templates from the player’s own job are visible)

  • Template tab becomes visible at a configurable minimum rank (configurable per job)

  • Templates only appear for society invoices, not private invoices


Admin Panel

Available for configurable admin groups (e.g. admin, superadmin)

Features:

  • Overview of all invoices from all players (max. 500)

  • Filter invoices by status

  • Cancel or delete invoices

  • Admin command /admininvoice [PlayerID] to create a $1 test invoice


Configuration (config.lua)

  • Language: de or en

  • App name (split into normal + accent part)

  • Accent colors (gradient from/to, fully customizable)

  • Command and keybind (default: /billing, F7)

  • Admin groups

    Society jobs with per-job settings:

  • minGrade — Minimum rank required to view/pay society invoices

  • templateGrade — Minimum rank required to create/delete templates

  • label — Display name

  • NearbyRadius — Search radius for nearby players

  • Banking integration (wasabi / okok / CoreM / false)

  • Society method (esx_society or mysql)

  • Invoice number prefix (default: VC)

  • Currency symbol


Banking Integration

When an invoice is paid, the transaction is automatically logged in the configured banking system:

  • wasabi_banking:
    Transaction(identifier, reason, amount, 'sent', 'personal'/'society')

  • okokBanking:
    AddTransaction(...) with sender/receiver information

  • crm-banking:
    addTransaction(...)


Discord Logging

Optional Discord webhook logging for invoice-related actions via:

server/discord_webhook.lua


Database

Two database tables are automatically created on startup:

  • varix_billing_invoices

    Stores all invoices including author, target, type, status, and timestamps

  • varix_billing_templates

    Stores job invoice templates


Multilanguage Support

Full German and English translation support — all UI texts, labels, placeholders, and notifications switch dynamically depending on Config.Locale.