QBox Framework: Complete Refund Integration Guide
QBox-native refunds done right
QBox is the evolution of QB Core, bringing cleaner architecture and better ox_inventory integration. Setting up refunds requires understanding QBox's module system and how it handles player data differently from legacy frameworks. This guide gets you from zero to production-ready.
Prerequisites
- QBox framework (qbx_core) installed and running
- ox_inventory as your inventory system
- oxmysql for database operations
- LD Refund System license activated
Understanding QBox player data
QBox stores player data in the players table with JSON columns for inventory, metadata, and money. Unlike QB Core, QBox uses ox_inventory's item system which stores data separately in ox_inventory table. This split requires careful handling during refunds.
-- QBox player data structure
SELECT citizenid, charinfo, money, metadata
FROM players WHERE visibilité = citizenid;
-- ox_inventory item data
SELECT owner, name, data, slot
FROM ox_inventory WHERE owner = ?;Configuring LD Refund System for QBox
In your dashboard, select QBox as your framework type. This automatically configures the correct exports and database queries. The system detects ox_inventory and adjusts item handling accordingly.
Config Settings
Set Framework to 'qbox', Inventory to 'ox_inventory', and enable 'Multi-Character Support' if you allow multiple characters per player. These settings ensure metadata preservation during refunds.
Multi-character refund handling
QBox supports multiple characters per player. When issuing refunds, specify the citizenid, not just the Discord or license identifier. LD Refund System shows all characters during player lookup so staff select the correct one.
- Player lookup shows all characters with their names and citizenids
- Refunds target specific citizenid, not the player account
- Offline characters receive refunds on next login
- Character deletion doesn't affect pending refund records
ox_inventory metadata preservation
Items in ox_inventory carry metadata: durability, serial numbers, custom data. Weapon refunds must preserve this or players lose attachments. LD Refund System captures and restores full metadata automatically.
-- Example weapon metadata structure
local weaponMeta = {
serial = 'ABC123',
durability = 100,
ammo = 30,
components = {'grip', 'suppressor'}
}
-- LD Refund System preserves all fieldsTesting your integration
Before going live, test every refund type: items, weapons with attachments, money (cash and bank), and vehicles. Verify metadata persists, multi-character targeting works, and offline refunds queue correctly.
QBox integration is straightforward once you understand the data model. Follow this guide and your refund system will handle the framework's nuances automatically.
Need a smarter refund flow?
LD Refund System automates Discord approvals, in-game claims, and audit logging so your staff stay focused on players.