Overview
- Wallet - Access via the
Walletcomponent (server-side only) - Billing - Access via the
Billingcomponent (server-side only)
Wallet
Wallet:Get
Get a player’s current cash balance.Player server ID
Current cash balance (defaults to
0 if no character found)Wallet:Has
Check if a player has at least a specified amount of cash.Player server ID
Amount to check (must be > 0)
true if player’s cash >= amountWallet:Modify
Add or remove cash from a player’s balance. Handles notifications automatically.Player server ID
Amount to add (positive) or remove (negative)
Skip sending the player a notification (default:
false)New cash balance on success,
false if insufficient funds or no character foundCash Transfer Between Players
Cash Transfer Between Players
Billing
Billing:Create
Creates a pending bill for a player. The bill appears on their phone and they can accept or dismiss it.Player server ID to bill
Bill title/sender name
Bill amount in dollars
Bill description
Callback when bill is paid or dismissed:
function(wasPaid, withAccount)Billing:Accept
Player accepts and pays a pending bill from a specified account.Player server ID
Bill identifier
Account number to pay from (defaults to personal account). Requires WITHDRAW permission and sufficient balance.
true if payment was processedBilling:Dismiss
Player dismisses a pending bill without paying.Player server ID
Bill identifier
true if bill was dismissedBilling:Fine
Issues a government fine to a player. The fine amount is split between multiple parties.Server ID of the officer issuing the fine
Server ID of the player being fined
Fine amount in dollars
{amount = number, cut = number} on success, false on failure| Recipient | Percentage |
|---|---|
| Fining officer | 15% |
| Police department | 25% |
| State (account 100000) | 60% |
Billing:Charge
Direct charge against a player’s personal bank account.Player server ID
Amount to charge
Charge title
Charge description
Charged amount on success,
false if insufficient fundsBilling:PlayerCreateOrganizationBill
An organization creates a bill for a player. Requires BILL permission on the account.Server ID of the employee creating the bill
Target character State ID
Organization account number
Bill amount
Bill description
true if bill was createdNext Steps
Finance - Banking
Account management and balances
Finance - Loans
Loan and credit system
Finance - Crypto
Cryptocurrency system
Jobs API
Job management for permissions