Xero is an online accounting and bookkeeping software that helps small businesses keep track of their invoices and payments. The following fields are required.
The Storefront supports exporting invoices suitable for importing into Xero manually. In addition, a sync software is available at extra charge to automatically sync invoices periodically on a scheduled basis.
To export invoices, simply go to the Sales > Orders screen. Xero recommends importing 500 invoices at a time. Therefore, it's a good practice to export out a subset of of your invoices regularly instead of accumulating for the entire year.
- Select the date range to export for the desired period.
- Choose the appropriate Order status. Typically, you want the "Ordered" or "Completed" orders.
- Once you have set your filter, click Search to list the qualified orders.
- Click Export view.
- In the Export dropdown, select "Xero invoice".
- Click the Export button to download the CSV file.
- Login to Xero and go to Business > Invoices.
- Click on Import.
- Browse the previously exported file.
- Select "No, ignore all address details" for the Would you like to update contact address details? question.
- Select "Tax Exclusive" for the Is the UnitAmount field tax inclusive or exclusive? question.
- Click Import to begin the import process.
The automatic sync requires the use of a Task Scheduler (sold separately) to automatically schedule the synchronization of invoices to Xero on a periodic basis.
Please read below for information on how to obtain the certificate file and register your application with Xero first.
- Consumer Key - the consumer key from Xero API.
- Consumer Secret - the consumer secret from Xero API.
- Certificate file - Enter the full physical path to the pfx certificate file on your system. The file path should be readable by the calling application (e.g. C:\Temp\public_privatekey.pfx file).
Generate private/public key pair
- Download and install free OpenSSL utility.
- From the command prompt, go to the OpenSSL \bin folder where you installed or extracted the software.
- Run the following command to set your OpenSSL configuration path:
set OPENSSL_CONF=c:\<OpenSSL folder path>\bin\openssl.cfg
- Run the following command to generate the private key:
openssl genrsa -out privatekey.pem 1024
- Run the following command to generate the public key using the previously generated private key. Enter a large number of days if you want to avoid changing keys frequently:
openssl req -newkey rsa:1024 -x509 -key privatekey.pem -out publickey.cer -days 3650
- Run the following command to export your public and private key into a single pfx file. Leave the password field blank when prompted.
openssl pkcs12 -export -out public_privatekey.pfx -inkey privatekey.pem -in publickey.cer
Set up a private application in Xero
- Login to Xero API
- Under My Applications tab, add a new application.
- Select "Private". Give your application a name.
- Paste the content of your public key that you generated earlier (publickey.cer file).
- Agree to the terms and Save.
- Copy the Consumer Key and Consumer Secret tokens.
Chart of Account
Like most accounting software, Xero allows you to create different accounts to track various activities. Orders and payments sent to Xero need to be associated with accounts in your Xero's Chart of Accounts. It's very important that the tax rate associated with the Xero account needs to match the tax rate setup in the Storefront unless you allow the sync to override the tax.
- Handling account - Used to track handling amount
- Payment account - Used to track payments made to an order
- Sales account - Used to track sales order details
- Shipping account - Used to track shipping amount
- Xero API is limited to 60 requests/sec and a maximum of 1000 requests/day.
- One-way sync of Completed orders from Storefront to Xero.
- After initial sync, changes made to an order will not be synced to Xero. Only order cancellations will be updated once to Xero. You cannot undo a cancellation.
- Xero base currency should match primary currency in Storefront.
- If OverrideTax is false, the tax rate set per account must accurately match the tax calculation in the Storefront.
- No product inventory sync.