Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > Getting Started >

Workflow for creating recurring direct debit invoices

Started by Simon Carr -   in Getting Started

We currently integrate our billing app with Xero in order to use Xero's invoicing features. At the moment we send a single (annual) invoice to Xero and the customer pays us via that invoice. What we now want to do is bill customers monthly and use the Go Cardless integration to set up direct debits. Given that the API doesn't seem to support repeating invoices, what is the best way to achieve this?

1. A single invoice for the annual amount, say £900, which we then setup to recur and direct debit at £75?
2. A single invoice for the monthly amount (£75) which we then setup to recur and direct debit?
3. 12 monthly invoices for £75 each, one of which we then setup as direct debit? In this option how does Xero know that these 12 invoices are linked and there is a direct debit covering all of them?

We want this process to be as automatic as possible and the downside of options 1 and 2 is they require additional manual steps. Any advice on how to best proceed would be greatly appreciated.
Hi Simon,

Repeating invoices are a thing and possible; kindly refer to https://developer.xero.com/documentation/api/repeating-invoices. You should possibly be using that in order to get the numbers to tally up correctly.

Jonathan Mifsud  

It is worth noting that the Repeating Invoices endpoint is currently read-only. So any new repeating invoices would need to be created manually through the UI.

Most apps seem to use the last of your suggestions. Essentially replicating the function of our Repeating Invoice feature through their own app.

To answer your query, Xero wouldn't see the Invoices as being linked, however you could be creative with the Invoice numbering to assist. For example INV-001-01, INV-001-02 etc. If created through the API, you could also make use of the URL field to provide a link back to your own app.

You would need to check with GoCardless what the criteria would be for the collection of payment to be automatic.

Robin Blackstone (Community Manager)  

Thanks for the responses. We have actually implemented the solution suggested by Robin for testing purposes. Xero team: it would be great to be able to do this via the API, even if just linking the invoices.

Simon Carr