# Snippets

### Create custom invoices

```lua
TriggerServerEvent("okokBilling:CreateCustomInvoice", target, price, reason, invoiceSource, society, societyName, authorIdentifier)
```

#### Variables:

**target**: `xTarget.source`

**price**: `500`

**reason**: `Speeding`

**invoiceSource**: `Highway Radar`

**society**: `police` (you can remove this in case you want no society to receive money)

**societyName:** `LSPD` (you can remove this in case you want no society to receive money)

### Event to open the My Invoices menu (client side)

```lua
TriggerEvent("okokBilling:ToggleMyInvoices")
```

### Event to open the Create Invoice menu (client side)

```lua
TriggerEvent("okokBilling:ToggleCreateInvoice")
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.okokscripts.io/scripts/okokbilling/snippets.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
