Connecting WHMCS with FreeAgent API

Is there any open API that I can use to connect my WHMCS to FreeAgent to resolve the situation whereby WHMCS generates invoices to customers who pay via my payment gateways PayPal and Stripe, which are also connected to my FreeAgent because I can see the transactions on FreeAgent and since the invoices were not generated from FreeAgent, I am confused on how to complete reconciliation or how to allocate the income on FreeAgent? So, I’m wondering whether it’s feasible for FreeAgent to identify invoices created by WHMCS or vice versa, or if there are plugins available that link both WHMCS and FreeAgent to automate the process.