Browse docs

Billing

Action hooks for the medical billing system.

Actions

ActionSideDescription
billing:sentserverA medical bill was sent to a patient.

Context

FieldTypeDescription
medicIdnumberServer ID of the medic who sent the bill.
targetIdnumberServer ID of the billed patient.
amountnumberFinal amount charged (after insurance co-pay).
originalAmountnumberOriginal bill amount before insurance.
reasonstringBilling reason text.
accountstringSociety account used (e.g. society_ambulance).
insuranceIdstring?Insurance provider ID, or nil if uninsured.
copayPercentnumberCo-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