Use hubspot's API to add existing invoice to a deal.
+1 to this feature request. As far as we can find in the CRM>Objects>Deals and the API for Accounting Extensions, there's no endpoint to "add an existing invoice" to a Deal, as the user can do from the hubspot UI in the Invoices widget in right sidebar. This is important for automations where invoices are issued automatically when a deal reaches a certain stage, e.g. by zapier or integromat, or some other api service. Then, once the invoice is paid, the sales rep has no way of seeing it on the deal unless they manually search all of the invoices and find the right one to associate using the "add existing invoice" ui.