Ewa here from the Engineering Team at FreeAgent — thanks for your message on our forum and I’ll do my best to help out.
At present, the API allows you to take payments using existing GoCardless Direct Debit Mandate by sending a POST request to the
/v2/invoices/:id/direct_debit endpoint, and you can also update invoices to set the GoCardless payment option if the relevant contact has an active Direct Debit agreement (currency must be GBP), however I’m afraid it’s not yet possible to set up new direct debit mandates via the API — this step still needs to be completed via the web app. To help out, I’ve now logged this as a feature request on our public FreeAgent API Development board here: Ability to send a GoCardless direct debit mandate request for a new contact. Although we do receive a large volume of feature requests, we do make every effort to review these regularly and implement the more popular features based on demand and available resources.
I realise this might not be the answer you were hoping to get, but I hope it clarifies things a little. You might also be interested in this part of our API documentation: Payment Methods Notes