Regenerate PDF when customer pays an invoice

Hi,

I am running V 14.0.5.

I am looking to find a way to automatically regenerate an invoice pdf once the customer has paid it. (Payment via Stripe and/or Paypal, so it is automatic). The reason is that the invoice download link on the invoice email will then point to the receipt on headed paper once the invoice is marked paid. (It is a healthcare practice, so clients need ‘formal’ paid invoices on headed paper for health insurance claims).

Has anyone already done similar? If so, what way worked best?

If not, what would the advice be? Here are my current thoughts…

  • Use a CRON job. (But I think that would cause unneeded server load as it would need to run every few minutes to appear ‘instant’ to the user).
  • Setup a Notification, so that a website gets emailed when an invoice is marked paid, then that in turn runs a script (or even a CRON job as above with the appropriate direct link?)

Am I on the right track?

Any help is appreciated.
Thank you,
Joe

Hello :slight_smile:

you can manage this behaviour using triggers within a new plugin that you can develop
using the trigger named BILL_PAYED

Good continuation