QB / ESX

Agency-Phone

Modern multi-framework phone for FiveM with auto-detection for QBCore and ESX. Full app suite including Dialer with pma-voice calls, Buzz SMS messaging, Snap in-game camera, Pulse social feed, Postbox mail, Wallet with AgencyPay checkout, Gallery, Contacts, and Settings. Supports programmable notifications with accept/deny buttons and integrated payment flows.

v26.4Paid6 Pages
Agency-Phone

01 Exports & API

Client Exports

ExportDescription
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

ExportDescription
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

EventDescription
agency-phone:client:notifyShows a phone notification (title, text, icon, color, timeout, silent).
agency-phone:client:usePhoneItemTriggers the phone open flow when the phone inventory item is used.
agency-phone:client:openAppAsks the phone to navigate to a custom app by id (used by app modules).
agency-phone:client:newMailNotifyNotifies the client of a freshly received mail.

Server Events

EventDescription
agency-phone:server:requestPhoneDataRequests a fresh phone data sync for the calling player.
agency-phone:server:cancelCallCancels or ends an active call.
agency-phone:server:sendMessageSends an SMS message (newMsg, targetNumber).
agency-phone:server:saveSettingPersists a single phone setting key/value for the player.
agency-phone:server:airdropPayPerforms an Agency Airdrop pay-to-nearby-player transfer.
agency-phone:server:buyDataPlanBuys a carrier data plan for the player (price, planName).
agency-phone:dispatch:createCreates 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