Skip to main content
The Wallet and Billing components handle player cash operations and billing. Wallet manages on-hand cash, while Billing handles pending bills, government fines, and direct account charges.

Overview

  • Wallet - Access via the Wallet component (server-side only)
  • Billing - Access via the Billing component (server-side only)
Server-Side Only: All payment operations must be performed on the server. Use Wallet methods instead of directly calling char:SetData('Cash', ...) — the Wallet component handles balance validation and player notifications automatically.

Wallet

Wallet:Get

Get a player’s current cash balance.
number
required
Player server ID
number
Current cash balance (defaults to 0 if no character found)
Example:

Wallet:Has

Check if a player has at least a specified amount of cash.
number
required
Player server ID
number
required
Amount to check (must be > 0)
boolean
true if player’s cash >= amount
Example:

Wallet:Modify

Add or remove cash from a player’s balance. Handles notifications automatically.
number
required
Player server ID
number
required
Amount to add (positive) or remove (negative)
boolean
Skip sending the player a notification (default: false)
number|boolean
New cash balance on success, false if insufficient funds or no character found
Examples:

Billing

Billing:Create

Creates a pending bill for a player. The bill appears on their phone and they can accept or dismiss it.
number
required
Player server ID to bill
string
required
Bill title/sender name
number
required
Bill amount in dollars
string
required
Bill description
function
Callback when bill is paid or dismissed: function(wasPaid, withAccount)
Example:

Billing:Accept

Player accepts and pays a pending bill from a specified account.
number
required
Player server ID
number
required
Bill identifier
string
Account number to pay from (defaults to personal account). Requires WITHDRAW permission and sufficient balance.
boolean
true if payment was processed

Billing:Dismiss

Player dismisses a pending bill without paying.
number
required
Player server ID
number
required
Bill identifier
boolean
true if bill was dismissed

Billing:Fine

Issues a government fine to a player. The fine amount is split between multiple parties.
number
required
Server ID of the officer issuing the fine
number
required
Server ID of the player being fined
number
required
Fine amount in dollars
table|boolean
{amount = number, cut = number} on success, false on failure
Fine Revenue Split: Example:

Billing:Charge

Direct charge against a player’s personal bank account.
number
required
Player server ID
number
required
Amount to charge
string
required
Charge title
string
required
Charge description
number|boolean
Charged amount on success, false if insufficient funds
Example:

Billing:PlayerCreateOrganizationBill

An organization creates a bill for a player. Requires BILL permission on the account.
number
required
Server ID of the employee creating the bill
number
required
Target character State ID
string
required
Organization account number
number
required
Bill amount
string
required
Bill description
boolean
true if bill was created
Example:

Next Steps

Finance - Banking

Account management and balances

Finance - Loans

Loan and credit system

Finance - Crypto

Cryptocurrency system

Jobs API

Job management for permissions