# Events

## Add Custom Invoice

Trigger to add a custom invoice to a player.

```lua
-- CLIENT SIDE
TriggerServerEvent('infin_billing:server:SendCustomBill', targetId, senderId, amount, reason, dueDate)

-- SERVER SIDE
TriggerEvent('infin_billing:server:SendCustomBill', targetId, senderId, amount, reason, dueDate)
```

### targetId

The player you which to send the bill too

### senderId

The player who **sent** the bill

### amount

The bill amount. For example, `100` would be **$100**

### reason (optional)

Reason for the bill, can be nil. For example: "Police Fine"

### dueDate (optional)

The date you wish to have as the due date will have to be in timestamp format, but don't worry you can convert any date easily using the following tool:<https://www.whatsmyip.org/string-timestamp-converter/>

## Update Players Bills

Trigger to manually check for bills

```lua
-- CLIENT SIDE
TriggerEvent('infin_billing:client:updateBills')

-- SERVER SIDE
TriggerClientEvent('infin_billing:client:updateBills', source)
```

### source

Only required on server side, indicated which players bills you want to update, can be `-1` to update everyone's in the server,&#x20;


---

# 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://infiniti-scripts.gitbook.io/home/scripts/advance-billing/events.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.
