> For the complete documentation index, see [llms.txt](https://codestudio5m.gitbook.io/codestudio/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://codestudio5m.gitbook.io/codestudio/our-scripts/billing-invoice-system/setup.md).

# Setup

This is a detailed setup guide for Billing/Invoice System. If you have any questions before making a purchase, you can contact us on Discord

### Create Custom Invoice    <mark style="color:yellow;">**(CLIENT & SERVER SIDE)**</mark>

* Export To Create Custom Invoice/Bill<br>

  ```lua
  exports['cs_billing']:createBill({
      playerID = source, --Player's ID to whom you want to send an invoice
      society = 'police', --Invoice Society Name
      society_name = 'LSPD', --Invoice Society Label
      amount = 100, --Invoice Amount

      senderID = source,         --[OPTIONAL] Invoice Sender's ID
      title = 'Police Invoice',  --[OPTIONAL] Invoice Title
      notes = 'Please Pay ASAP', --[OPTIONAL] Invoice Notes
  })

  ```

### Fetch Bills    <mark style="color:yellow;">**(SERVER SIDE ONLY)**</mark>

* Export to Fetch All Society Bills

  ```lua
  local allBills = exports["cs_billing"]:fetchSocietyBills(job)
  ```

* Export to Fetch All Bills of a Player with an Identifier

  ```lua
  local allBills = exports["cs_billing"]:fetchBills(identifier)
  ```

### Export to Force Pay Bill Overdue By PlayerID    <mark style="color:yellow;">**(SERVER SIDE ONLY)**</mark>

```lua
TriggerEvent('cs:billing:overDueCheck', player_id)
```
