Thanks for your message and apologies for the delayed response!
Absolutely, everything you’ve described should be achievable using the FreeAgent API.
You can create an invoice with the appropriate line item(s) and sales tax rate(s) and FreeAgent will compute the total value for you. Here’s the documentation for invoice creation.
It sounds like, upon receipt of the funds via 3rd party (Stripe, PayPal, Dwolla), you’ll want to do more than simply mark the invoice as sent, as the invoice would still show as outstanding in FreeAgent.
Instead, I suspect you’ll also want to create a manual invoice receipt, to clear off the outstanding balance and have the invoice shown as “Paid”?
To add a payment to the invoice, you’ll need to create a bank transaction explanation with the
paid_invoice_id set to the database ID of the invoice being paid off.
I hope this helps get you up and running.