Billing hooks

12-11-2018
This hooks can be used to intercept billing events: ### onPayment Fires when a payment is made ```typescript function onPayment(sale: billing.Sale, lines: billing.SaleLine[], payments: billing.Payment[]) { ``` ### onPaymentOnAccount Fires when a payment on account is made ```typescript function onPayment(idSale: number, payments: billing.Payment[]) { ``` ### onPaymentCompleted Fires after the payment has been completed ```typescript function onPaymentCompleted(sale: billing.Sale, lines: SaleLine[], payment: billing.Payment) { ``` ### onConfirmLines Fires when one or more sale lines are confirmed. ```typescript function onPayment(lines: billing.SaleLine[]) { ``` ### onCancelingLines Fires before one or more salelines are about to be canceled. ```typescript function onCancelingLines(sale: billing.Sale, lines: billing.SaleLine[], payments: billing.Payment[]) { ``` ### onCancelLines Fires before one or more salelines have been canceled. ```typescript function onCancelLines(sale: billing.Sale, lines: billing.SaleLine[], payments: billing.Payment[]) { ```
Billing Hooks Backend