Store

Configuration

All configuration options for legacy-billing

All options are set in config.lua.

General#

OptionTypeDefaultDescription
Config.Versionstring'1.0.0'Resource version (used by the automatic version checker)
Config.Localestring'en'Language file from the locales/ folder (e.g. 'en', 'sv')
Config.DebugbooleanfalseEnable 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#

OptionTypeDefaultDescription
Config.AdminGroupstable{'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#

OptionTypeDefaultDescription
Config.MinBillAmountnumber1Minimum bill amount in dollars
Config.MaxBillAmountnumber1000000Maximum bill amount in dollars
Config.MaxDescriptionLengthnumber500Maximum character length for bill descriptions
Config.DefaultDueDaysnumber7Default due date offset in days from bill creation
Config.AllowDisputesbooleantrueWhether players can dispute bills

Billing Targets#

OptionTypeDefaultDescription
Config.MaxBulkTargetsnumber10Maximum number of players selectable for bulk billing
Config.NearbyDistancenumber0Maximum distance (in game units) to show nearby players. 0 shows all online players

Late Fees#

OptionTypeDefaultDescription
Config.LateFeeIntervalnumber60How 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.)
}
EventDescription
BillCreatedSent when a new bill is created, either through the UI or the CreateBill export
BillPaidSent when a payment is made on a bill (includes both full and partial payments)
BillOverdueSent when a bill passes its due date and is marked as overdue
DisputeFiledSent when a player files a dispute against a bill
DisputeResolvedSent when an admin resolves a bill dispute (approve or deny)
AdminActionSent when an admin performs an administrative action such as cancelling a bill or modifying job settings