01 Exports & APIClient Exports Export Description IsPhoneOpen() Returns true if the phone UI is currently open. IsPhonePoweredOn() Returns true if the phone is powered on (false when player turned it off). GetPhoneData() Returns the full client-side PhoneData table (open state, meta, etc.). GetPhonePropEntity() Returns the entity handle of the held phone prop, or 0 if not visible. IsPhoneExpanded() Alias of IsPhoneOpen() kept for backward compatibility. HasCarrierContract() Returns true when the player has an active carrier data plan. GetPhoneState() Returns table { isOpen, poweredOn, syncEnabled } summarising current phone status. HasPhone() Returns true if the player has the configured phone item in their inventory. RegisterAgencyPayPoint(id, data) Registers a runtime Agency Pay terminal at a coordinate (markers, blip, checkout payload). RemoveAgencyPayPoint(id) Removes a previously registered Agency Pay terminal by id. StartAgencyPayCheckout(data) Opens the phone (if needed) and launches an Agency Pay checkout flow with the given payment payload. StartCall(contactData) Starts an outgoing phone call to the supplied contact ({ name, number, ... }). PhoneNotification(title, text, icon, color, timeout, acceptIcon, denyIcon) Shows an action notification with accept/deny buttons; blocks until the user responds and returns true/false.
Server Exports Export Description SendMail(identifier, mailData) Sends a mail to the player's primary mailbox by identifier (returns success). AddChirp(chirpData) Inserts a Chirper post on behalf of the script ({ identifier, firstName, lastName, message, postId }). usePhone(event, item, inventory, slot, data) ox_inventory hook registered when ESX+ox_inventory is detected; opens the phone for the inventory holder.
Client Events Event Description agency-phone:client:notify Shows a phone notification (title, text, icon, color, timeout, silent). agency-phone:client:usePhoneItem Triggers the phone open flow when the phone inventory item is used. agency-phone:client:openApp Asks the phone to navigate to a custom app by id (used by app modules). agency-phone:client:newMailNotify Notifies the client of a freshly received mail.
Server Events Event Description agency-phone:server:requestPhoneData Requests a fresh phone data sync for the calling player. agency-phone:server:cancelCall Cancels or ends an active call. agency-phone:server:sendMessage Sends an SMS message (newMsg, targetNumber). agency-phone:server:saveSetting Persists a single phone setting key/value for the player. agency-phone:server:airdropPay Performs an Agency Airdrop pay-to-nearby-player transfer. agency-phone:server:buyDataPlan Buys a carrier data plan for the player (price, planName). agency-phone:dispatch:create Creates a phone dispatch from an emergency call/SMS.
Example: Agency Pay checkout
exports['agency-phone']:StartAgencyPayCheckout({
merchant = 'Agency Corner',
title = 'Agency Pay',
subtitle = 'Checkout ready',
label = 'Premium Coffee',
amount = 24.50,
icon = 'fa-solid fa-mug-hot',
accent = '#ff9f0a',
clientEvent = 'my-resource:client:agencyPayResult',
serverEvent = 'my-resource:server:agencyPayResult',
metadata = { orderId = 'order_2048', item = 'premium_coffee' }
})
-- Result: status, requestId, amount, cardId, balance, metadata
Need help? Join our Discord community for support!
Join Discord