NEXO DOCSv1 · ENES
docs / scripts / refund-system

Nexo Refunds

Free refund system: automatic inventory backups and one-click refunds of money, items, vehicles and weapons.

v1.1.0ESXQBCoreQBoxStandalone

What's included

A free refund system for ESX, QBCore, Qbox and standalone. Staff create refunds of money, items, vehicles and weapons from a panel, and players claim them with `/refund`.

  • Automatic inventory backups: every X minutes, on disconnect and before a txAdmin restart. After a crash, staff load the backup and create the refund in one click.
  • Refunds to one player (online or offline), several or everyone online. Search by ID, name, license, citizenid or Discord ID.
  • Per-rank limits (optional): money per refund, daily limit, vehicles, weapons, bulk, cancel, edit, backups and stats.
  • Staff stats: refunds created, money given and cancellations per person (today, 7 days, 30 days or all time).
  • Edit and duplicate pending refunds, quick reasons and an optional required ticket.
  • Items with metadata: weapon serials, quality and QBCore marked bills.
  • Per-player history, with a warning if they get many refunds. Anything that doesn't fit stays pending. Optional expiry.
  • Panel with a dark or light theme and configurable accent colour. Its own notifications or your server's. 0.00 ms on the client.

Requirements

ResourceRequired?What for
oxmysqlYesStores refunds, backups and history. Tables are created automatically
FrameworkOptionalESX Legacy, QBCore or Qbox. Standalone works with ox_inventory items only
InventoryYesOne of the supported ones (auto-detected)

Installation

  1. Copy the resource Get it for free from keymaster.fivem.net → Granted Assets and put nexo_refunds in resources. Don't rename it if you use the exports.
  2. Add it to your server.cfg After your framework, inventory and oxmysql.
    ensure nexo_refunds
  3. Give staff permissions Framework groups (admin, mod, superadmin…) and identifier lists in config_server.lua also work.
    add_ace group.admin refunds.admin allow
    add_ace group.mod refunds.mod allow
    add_ace identifier.license:xxxx refunds.owner allow
  4. Start the server Tables are created automatically. If you prefer, import sql/install.sql.

Commands

CommandWhoWhat it does
/refundsStaffOpens the panel
/refundPlayersSee and claim their refunds
/requestrefundPlayersAsk staff for a refund
refunds_give <id|identifier> <tipo> <nombre> <cantidad> [motivo]ConsoleCreates a refund from the console

Command names are changed in Config.Commands.

Refund requests

New in 1.1.0. Players ask for a refund in game and staff review it in the panel.

  1. The player asks Types /requestrefund, picks what happened (crash, inventory bug…), describes what they lost and, optionally, adds proof (ticket or clip).
  2. Staff get an alert The request shows up in the panel's Requests tab.
  3. Review Opens a new refund with the player, reason and proof already filled in, and their inventory backups at hand. Once created, the request is approved and the player is notified.
  4. Deny Leaves an optional note the player sees in their history.

Each player can only have one open request, with a cooldown between requests. The requests permission on each rank decides who handles them, and the request webhook sends logs to Discord.

Config.Requests = {
    Enabled = true,       -- false: no /requestrefund and no Requests tab
    Cooldown = 30,        -- minutes between requests from the same player
    MinLength = 10,
    MaxLength = 500,
    NotifyStaff = true,
    Categories = { 'Server crash', 'Inventory bug', 'Garage bug', 'Bugged death', 'Other' },
}
Updating from 1.0.0Replace the folder and add requests = true to each rank's limits in your config_server.lua (and the request webhook if you want logs). The new table is created automatically.

Configuration

`config.lua` (shared):

OptionWhat it does
Config.LocaleLanguage. To add one, copy locales/en.lua
Config.UI.Theme · Config.UI.Accentdark or light, and accent colour in HEX (default #4d8dff)
Config.Notifynui, ox_lib, esx, qb, okok or custom, and position of its own notices
Config.Reasons · Config.RequireTicketQuick reasons in the panel and required ticket
Config.RequestsRequests: on/off, cooldown, text length, staff alert and categories
Config.SnapshotsInterval, backups kept, backup on disconnect and before restart
Config.AccountsMoney accounts per framework (account, item or item with value)
Config.ItemImages · Config.Vehicles · Config.WeaponsItem images, vehicles and weapons
Config.Limits · Config.Bulk · Config.Expiry · Config.HistoryLimits, bulk refunds, expiry and history

`config_server.lua` (server only, never sent to players):

OptionWhat it does
ServerConfig.Staff.UseLimitstrue for per-rank limits, false so any staff member can do everything
ServerConfig.Staff.RanksRanks, permissions and limits
ServerConfig.DiscordWebhooks for created, edited, bulk, claimed, cancelled, expired and requests
ServerConfig.VersionCheckURL to a version.txt to notify about updates

Compatibility

Inventories are auto-detected, or forced in Config.Inventory:

InventoryResource
ox_inventoryox_inventory
Quasar Inventoryqs-inventory
Codem Inventorycodem-inventory
Core Inventorycore_inventory
Origen Inventoryorigen_inventory
Tgiann Inventorytgiann-inventory
AK47 Inventoryak47_inventory / ak47_qb_inventory
Jaksam Inventoryjaksam_inventory
JPR Inventoryjpr-inventory
One Inventoryone_inventory
QB Inventory (old and 2.0)qb-inventory
PS Inventoryps-inventory
LJ Inventorylj-inventory
ESX / QBCore nativeframework

Using another one? Copy an adapter in bridge/inventory.lua, change the resource name and calls, and add it to the DETECT list. Vehicles: owned_vehicles (ESX), player_vehicles (QBCore) and qbx_vehicles (Qbox). Languages: Spanish, English, Portuguese, French, German, Italian, Polish and Turkish.

Exports and events

local ok, ids = exports.nexo_refunds:CreateRefund({
    target  = 12,                     -- server ID or identifier/citizenid
    entries = {
        { type = 'money',   name = 'bank', amount = 5000 },
        { type = 'item',    name = 'phone', amount = 1 },
        { type = 'vehicle', name = 'sultan' },
        { type = 'weapon',  name = 'WEAPON_PISTOL', amount = 60, metadata = { serial = 'ABC123' } },
    },
    reason = 'Crash', ticket = '#123', staff = 'Ticket bot',
})

exports.nexo_refunds:GetPendingRefunds(12)     -- or identifier
exports.nexo_refunds:GetRefund(1042)
exports.nexo_refunds:CancelRefund(1042, 'Name')
exports.nexo_refunds:ClaimRefund(source, 1042)
exports.nexo_refunds:TakeSnapshot(source)       -- saves an inventory backup now
exports.nexo_refunds:IsStaff(source)
exports.nexo_refunds:GetOpenRequests()         -- pending requests

Events (server): nexo_refunds:created, nexo_refunds:updated, nexo_refunds:claimed, nexo_refunds:cancelled, nexo_refunds:expired, nexo_refunds:requestCreated and nexo_refunds:requestClosed.

Security and debugging

  • Everything is validated on the server: permissions, limits, that the item exists, amounts and metadata size.
  • Claiming locks the refund in the database: it can't be claimed twice.
  • Each delivered entry is saved instantly: if the server crashes halfway, nothing is delivered twice.
  • Only pending refunds with nothing delivered can be edited. There's a per-player request limit.
  • Webhooks live in a file only the server loads.
set refunds_debug 1   # extra console messages

FAQ

Is it really free?

Yes. You get it for free from the store and it arrives in Keymaster like any other script. Reselling it isn't allowed.

Can a refund be claimed twice?

No. Claiming locks the refund in the database and every delivered entry is saved instantly, so even a crash halfway never delivers anything twice.

Do I get updates?

Yes, for free. New versions appear in your Keymaster and we announce them on Discord.

What if something doesn't work?

Open a ticket on our Discord with the console error and we'll help you.

Changelog

v1.1.026/11/2026
  • Refund requests: players use /requestrefund, pick what happened, describe what they lost and add proof
  • Requests tab in the panel: Review opens a pre-filled refund and Deny leaves a note for the player
  • Staff alerts and Discord logs for every request
  • One open request per player and a configurable cooldown
  • requests permission per rank
  • New exports and events: OpenRequestMenu, GetOpenRequests, requestCreated and requestClosed
v1.0.0
  • First release