Bridge Overview
What is the Bridge System?
The Bridge System is a framework-agnostic layer that allows the Billing System to work with any FiveM framework. It provides a unified API for all core functions, regardless of which framework you're using.
Supported Frameworks
Out of the box, the bridge supports:
QBox (qbx_core)
✅ Fully Supported
✅ Yes
QBCore (qb-core)
✅ Fully Supported
✅ Yes
ESX (es_extended)
✅ Fully Supported
✅ Yes
Custom
🔧 Easy to Add
⚙️ Manual
How It Works
The bridge automatically detects your framework and routes all function calls to the correct implementation.
File Structure
Key Features
✅ Automatic Detection
The bridge automatically detects your framework:
✅ Manual Override
Force a specific framework if needed:
✅ Easy to Extend
Adding support for a custom framework is straightforward:
Bridge Functions
Client-Side Functions
GetPlayerData()
Get player data
table
GetPlayerJob()
Get player's job
table
GetPlayerName()
Get character name
string
GetPlayerIdentifier()
Get unique ID
string
HasAllowedJob()
Check if job allowed
boolean
GetNearbyPlayers()
Get nearby players
table
Notify(msg, type)
Show notification
void
Server-Side Functions
GetPlayer(source)
Get player object
table
GetIdentifier(source)
Get player ID
string
GetPlayerNameServer(source)
Get name
string
GetPlayerJobServer(source)
Get job
table
GetPlayerBank(source)
Get bank balance
number
GetPlayerCash(source)
Get cash balance
number
RemoveMoney(source, amount, type)
Remove money
boolean
AddMoney(source, amount, type)
Add money
boolean
GetAllPlayers()
Get all players
table
IsJobBossServer(source, job)
Check if boss
boolean
Quick Start
Using the Bridge
Adding Custom Framework
See the detailed guides:
https://github.com/dollar-src/docs/tree/main/billing/gitbook-custom-framework.mdCritical Functions
⚠️ Money Handling
The money functions are CRITICAL and must be implemented correctly:
IMPORTANT: Incorrect money handling can lead to:
Money duplication exploits
Money loss bugs
Transaction failures
Always test money functions thoroughly!
Testing Your Bridge
Basic Test
Money Test
Create invoice for $100
Pay with cash
Verify money was removed
Pay with bank
Verify money was removed
Full Test Checklist
Troubleshooting
Framework Not Detected
Money Functions Not Working
Verify player object is valid
Check money type ('cash' or 'bank')
Add debug prints
Check framework documentation
Next Steps
https://github.com/dollar-src/docs/tree/main/billing/gitbook-client-functions.mdhttps://github.com/dollar-src/docs/tree/main/billing/gitbook-server-functions.mdhttps://github.com/dollar-src/docs/tree/main/billing/gitbook-custom-framework.mdLast updated

