Browse docs
Billing
Action hooks for the medical billing system.
Actions
| Action | Side | Description |
|---|---|---|
billing:sent | server | A medical bill was sent to a patient. |
Context
| Field | Type | Description |
|---|---|---|
medicId | number | Server ID of the medic who sent the bill. |
targetId | number | Server ID of the billed patient. |
amount | number | Final amount charged (after insurance co-pay). |
originalAmount | number | Original bill amount before insurance. |
reason | string | Billing reason text. |
account | string | Society account used (e.g. society_ambulance). |
insuranceId | string? | Insurance provider ID, or nil if uninsured. |
copayPercent | number | Co-pay percentage (100 if uninsured). |
Example
server.lua
exports["sky_ambulancejob"]:onAction("billing:sent", function(ctx)
print(("Medic %d billed patient %d: $%d (original: $%d, copay: %d%%)"):format(
ctx.medicId, ctx.targetId, ctx.amount, ctx.originalAmount, ctx.copayPercent
))
end)
Support
Need help? Our support team is always ready to assist
Join Discord