Good morning,
The code/service ... for creating the invoices must have access the databases to read the amounts, the client name/surname, identifier, email. Once the data is obtained, the invoices must be generated (html?, pdf?, ...).
Let me know your requirements.
Thanks,
Jorge Dávila.