Documentation
  • 📄TeamsGG Documentation
    • Common Errors
  • Paid Scripts
    • 📱Phone
      • 🧠Installation
      • 🦄Unique phones
      • 💿Configure
      • ⏭️Exports
        • Client side
        • Server side
      • 🪛Commands
      • 🍎Custom apps
    • ☎️Boomer Phone
      • 🧠Installation
      • 🦄Unique phones
      • ⏯️Exports
        • Client side
    • 🏠Properties
      • 🧠Installation
      • 💿Configure
      • 🐚Add More Shells
      • ⏭️Exports
        • Client side
          • GetCurrentPropertyId
          • GetCurrentProperty
          • IsPointInsideProperty
          • OpenPropertyMenu
          • AddKey
          • RemoveKey
          • SetWaypointToProperty
          • GetAllProperties
          • GetKeyHolders
          • PoliceRaidDoor
        • Server side
          • GetAllProperties
          • AddKey
          • RemoveKey
          • ToggleDoorlock
          • GetPlayersInProperty
          • GetKeyHolders
          • DeleteProperty
          • AddStarterApartment
      • 👜State bags
    • 🏦Banking
      • 🧠Installation
      • ⏯️Exports
        • Client side
        • Server side
    • 💸Billing
      • 🧠Installation
      • ⏭️Exports
        • Client side
        • Server side
    • 📊Hud
      • 🧠Installation
      • ⏭️Exports
        • Client side
    • 📦Storage Units
      • 🧠Installation
Powered by GitBook
On this page
  • OpenBillingMenu
  • CloseBillingMenu
  • ToggleAvailability
  • PayInvoice
  • CreateInvoice
  1. Paid Scripts
  2. Billing
  3. Exports

Client side

OpenBillingMenu

-- An export to open the billing menu.
exports["tgg-billing"]:OpenBillingMenu()

CloseBillingMenu

-- An export to close the billing menu.
exports["tgg-billing"]:CloseBillingMenu()

ToggleAvailability

---An export to enable/disable the billing menu.
---@param disabled boolean
exports["tgg-billing"]:ToggleAvailability(disabled)

PayInvoice

---An export to pay invoice manually.
---@param invoiceId number
---@return boolean
local success, amountPaid = exports["tgg-billing"]:PayInvoice(invoiceId)

CreateInvoice

local invoiceData = {
    items = {
       {
            key = "speeding",
            label = "Speeding",
            price = 100,
            quantity = 1,
            priceChange = false,
            quantityChange = false
        }
    },
    total = 100,
    notes = "Your notes here", -- Optional
    sender = "Your society here", -- Your society job identifier e.g. 'police' or '__personal'
    senderId = "Your sender Id", -- Usually this is the player's identifier
    senderName = "Your sender name", -- Usually this is the player's name
    recipientId = "The recipient Id", -- The recipient's identifier
    recipientName = "The recipient name", -- The recipient's name
    taxPercentage = 10,
    senderCompanyName = "Your society name", -- If sender is '__personal' might be nil
}

---An export to create an invoice manually.
---@param invoiceData table
---@return table The created invoice
local invoice = exports["tgg-billing"]:CreateInvoice(invoiceData)
PreviousExportsNextServer side

Last updated 8 months ago

💸
⏭️