Skip to content
Browse documentation 146 guides

Hooks & events

Addon hooks: complete event directory and delivery rules

Use the five actual queued lifecycle events with their exact payloads and failure/recovery semantics.

About 2 min read

On this page

Actual extension events

Enabled API-1 addons receive onEvent(string $event, array $payload): void. These are queued in-process extension hooks, not public HTTP webhooks or a WHMCS-compatible hook registry.

Event Payload Detailed reference
order.created order_id Order created
invoice.issued invoice_id, renewal_key, order_id Invoice issued
invoice.payment_recorded invoice_id, payment_id, direction Payment recorded
service.cancellation_requested service_id Cancellation requested
system.tick at, renewal_invoices, reminder_candidates, mail_queued Scheduler tick

The first four dispatch after their originating database transaction commits. Tick is emitted after its renewal/reminder/mail queue work. Payload IDs are references, not pre-authorised writable model objects. Nullable invoice linkage fields remain nullable; do not invent an order for a manual invoice.

Loading and failure

The dispatcher loads each enabled addon through publisher/file verification and, for premium addons, current purchase permission. It records load and handler failures separately with safe event/version diagnostics. One failed handler does not authorise changed code or erase other failures. A later matching successful load/handler can clear only its matching recorded failure revision.

The current dispatcher job has one configured attempt and a bounded timeout. Workers, operator recovery and duplicate surrounding jobs still make idempotent handlers necessary. Do not assume exactly-once external execution or automatically replay an irreversible action after a timeout.

Handler design

Ignore unknown events. Validate the expected payload shape, read the exact current owner/seller resource and deduplicate using the durable business identifier relevant to the event. Queue your own reviewed reversible work where appropriate. Event delivery is not permission to alter original invoice totals, bypass main-product licensing, access another customer's data or contact an arbitrary URL.

No general outbound webhook URL registry, public REST event subscription, hook priority system, pre-checkout price interception or automatic compatibility with another billing product's hook names is promised. Add a new contract only through a separately reviewed core feature.

Need a hand?

Tell us your product version, the step you are following and what happened. Our support desk keeps your conversation together.

Contact support →