This tool will bulk void invoices in Xero. All you need is to export the invoices you want gone to a .csv and the code will save you clicking the void drop down menu countless times.
This uses a Custom Connection, Xero Partners and Advisors can add them to client orgs. To learn more about them see this page
Organisations based in NZ, AU and UK at the time of writing but subject to change. Please refer to this link to the Xero docs which displays all the options and costs involved here
If you are outside those regions please email Xero and ask them to add your region. My old bulk voiding app + your developer could solve the problem as well.
Note: If you aren't a techy person don't worry, this may seem daunting but it's really easy and I believe you can do it! Learning code is fashionable for kids at school nowadays so you'll likely know someone who can help if you do get stuck though.
- Python
- Text file editor (Notepad or similar, Visual Studio Code preferred)
- A terminal (Command prompt on Windows, Terminal on Mac, the built in terminal in VS Code, or similar)
Please refer to my YouTube video here or follow the step by step instructions below:
They might have their own steps online somewhere, but here's what I did anyway
- Rename the file in this project named
config.ini_example
toconfig.ini
- Login to the Developer Portal at
developer.xero.com
then navigate tohttps://developer.xero.com/app/manage/
- Click
New app
in the top right corner - Name your app and choose
Custom connection
for the URL just enter any URL... clickCreate app
- In the
Scopes
drop down menu selectaccounting.transactions
- Select your authorised user - I'm going to pick
Current user
- Press
Save and connect
in the top right - Check your email (or the authorised users' email) and the subject will be
Xero Custom Connection authorization request
- Click
Connect
in the email - Select your organisation you wish to bulk void in. If it's grey, you need to buy a Custom Connection add-on from Xero
- Done! You should now see your Custom app connected!
- Go back to your app at
developer.xero.com
and generate a secret
-
Copy paste your client id and client secret from Xero into
config.ini
it should look like this (Note: I've deleted my app so you won't be able to use the example ID or Secret below) -
Run this command in your terminal
pip install requests
or for those on Macbook it may bepip3 install requests
.
Now the tool is ready to Run!
Other config options:
DRY_RUN
when set toEnabled
nothing will be voided. Set toDisable
and voiding will happenCSV_FILENAME
needs to match your downloaded .csv file nameVOID_TYPE
can be one ofInvoices
,CreditNotes
. UseInvoices
when voiding bills and/or invoices in Xero
- Login to Xero and use the search menu to filter down to the invoices you want to void
- Click
export
and rename the downloaded .csv file to beinvoices.csv
(if you choose a different name, editconfig.ini
so the names match) - Put the file in the same folder as this
README.md
file - Run the tool by going:
python3 app.py
orpython app.py
depending on your system
Due to heavy usage I constantly hit the 25 user limit which prevented others from using the app. The application process immediately froze when I requested my app remained free. Since partnered apps follow a cost model I decided to make this instead, for free!
If you preferred the old app that's fine, you can fork the GitHub repo and find someone who can set up a client and get you voiding in house. For now I have decided to stop developing that app because this one is much less code, more simple and achieves the same outcome.
This app was solely developed as I am no longer able to progress my certification for the old bulk voiding tool. After writing deprecated on the project and stepping away from it, I couldn't rest well. So I made this. It's not developed or associated with Xero at all.
Voided invoices CANNOT be restored (only copied to a new invoice).
Xero has API rate limits, please respect them. Xero Limits