> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aps-store.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Bills & Fines

Any script can send a bill to a player. Players pay it from the PC.

## giveBill export

`server` Uses the same data format as `vms_cityhall`'s `giveBill`. Its argument order `(source, type, data, giveItem, cb)` is accepted too.

```lua theme={null}
exports['aps_cityhall']:giveBill(targetSource, 'traffic-ticket', {
    issuerName          = 'Officer Smith',
    job                 = 'police',
    amount              = 750,
    dateToPay           = 7,            -- days until overdue (-1 = no due date)
    violation           = 'Speeding (45 km/h over the limit)',
    locationOfViolation = 'Great Ocean Hwy',
    vehicle             = { plate = 'ABC 123', model = 'Sultan' },
}, function(billId)
    print('bill created', billId)       -- nil on failure
end)
```

| Type | Amount from |
| - | - |
| `ticket`, `traffic-ticket` | `amount` |
| `invoice` | sum of `invoiceData` rows `{ qty, unitPrice, description }` |
| `receipt` | sum of `receiptData` rows `{ qty, unitPrice, item }` |

Optional fields: `society`, `jobLabel`, `comments`, `taxFromInvoice` / `taxFromReceipt` (percent added on top), `percentageForSociety`.

When the bill is paid, the society share (`percentageForSociety`, default `Config.Society.defaultPercent`) goes to the `society` / `job` account — see [Compatibility](https://docs.aps-store.com/assets/aps_cityhall/compability.md).

Unpaid bills past their due date are marked *overdue* automatically. `Config.OnBillIssued` and `Config.OnBillPaid` let you react.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.