execute php script on payment (and overdue)

Hello,
I’d like to execute a custom php script if a client paid the invoice or if it became overdue. How to do it (without Zapier)?

Thanks for an answer.

You can use a subscription to run a script when a payment is entered.

http://docs.invoiceninja.com/en/latest/api.html#subscriptions

So ‘Invoice Update’ event would be the case if an invoice becomes overdue?

The invoice update event is when the invoice is changed, we don’t support subscriptions for when the invoice is overdue.

Any updates on this? I’d really appreciate if there’s a feature to call a script when someone didn’t pay their invoice on time.

Have you considered using the API or SDK to run a daily script to check for overdue invoices?