Configuration
All configuration options for legacy-billing
All options are set in config.lua.
General#
| Option | Type | Default | Description |
|---|---|---|---|
Config.Version | string | '1.0.0' | Resource version (used by the automatic version checker) |
Config.Locale | string | 'en' | Language file from the locales/ folder (e.g. 'en', 'sv') |
Config.Debug | boolean | false | Enable debug logging in the server console |
Info
The UI accent color is now configured globally in legacy-lib. See the Legacy Lib Configuration page.
Permissions#
| Option | Type | Default | Description |
|---|---|---|---|
Config.AdminGroups | table | {'god', 'admin', 'superadmin'} | ACE permission groups with admin access to the billing panel |
Admin access is also granted to anyone who passes the framework's built-in admin check via legacy-lib.
Bill Settings#
| Option | Type | Default | Description |
|---|---|---|---|
Config.MinBillAmount | number | 1 | Minimum bill amount in dollars |
Config.MaxBillAmount | number | 1000000 | Maximum bill amount in dollars |
Config.MaxDescriptionLength | number | 500 | Maximum character length for bill descriptions |
Config.DefaultDueDays | number | 7 | Default due date offset in days from bill creation |
Config.AllowDisputes | boolean | true | Whether players can dispute bills |
Billing Targets#
| Option | Type | Default | Description |
|---|---|---|---|
Config.MaxBulkTargets | number | 10 | Maximum number of players selectable for bulk billing |
Config.NearbyDistance | number | 0 | Maximum distance (in game units) to show nearby players. 0 shows all online players |
Late Fees#
| Option | Type | Default | Description |
|---|---|---|---|
Config.LateFeeInterval | number | 60 | How often to check for overdue bills (in minutes). 0 disables late fee checks |
Late fee percentages are configured per-job through the admin panel or directly in the legacy_billing_jobs database table.
Statuses#
Bill statuses can be customized with different labels and colors. Do not change the id values as they are used internally.
Config.Statuses = {
{ id = 'unpaid', label = 'Unpaid', color = '#F97316' },
{ id = 'partial', label = 'Partial', color = '#EAB308' },
{ id = 'paid', label = 'Paid', color = '#22C55E' },
{ id = 'overdue', label = 'Overdue', color = '#EF4444' },
{ id = 'disputed', label = 'Disputed', color = '#8B5CF6' },
{ id = 'cancelled', label = 'Cancelled', color = '#6B7280' },
}
Payment Methods#
Config.PaymentMethods = {
{ id = 'bank', label = 'Bank' },
{ id = 'cash', label = 'Cash' },
}
Webhooks#
Discord webhook URLs for receiving notifications about billing events. Leave a value as an empty string ('') to disable that webhook.
Config.Webhooks = {
BillCreated = '', -- Fires when a new bill is created
BillPaid = '', -- Fires when a bill is paid (full or partial payment)
BillOverdue = '', -- Fires when a bill becomes overdue
DisputeFiled = '', -- Fires when a player disputes a bill
DisputeResolved = '', -- Fires when an admin resolves a dispute
AdminAction = '', -- Fires when an admin performs an action (cancel, delete, etc.)
}
| Event | Description |
|---|---|
BillCreated | Sent when a new bill is created, either through the UI or the CreateBill export |
BillPaid | Sent when a payment is made on a bill (includes both full and partial payments) |
BillOverdue | Sent when a bill passes its due date and is marked as overdue |
DisputeFiled | Sent when a player files a dispute against a bill |
DisputeResolved | Sent when an admin resolves a bill dispute (approve or deny) |
AdminAction | Sent when an admin performs an administrative action such as cancelling a bill or modifying job settings |