Search

Index

Revindex Storefront

Xero

Xero is an online accounting and bookkeeping software that helps small businesses keep track of their invoices and payments. The following fields are required. Please read below for information on how to obtain the certificate file and register your application with Xero first.

  1. Consumer Key - the consumer key from Xero API.
  2. Consumer Secret - the consumer secret from Xero API.
  3. 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

  1. Download and install free OpenSSL utility.
  2. From the command prompt, go to the OpenSSL \bin folder where you installed or extracted the software.
  3. Run the following command to set your OpenSSL configuration path:

    set OPENSSL_CONF=c:\<OpenSSL folder path>\bin\openssl.cfg
  4. Run the following command to generate the private key:

    openssl genrsa -out privatekey.pem 1024
  5. 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
  6. 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

  1. ‚ÄčLogin to Xero API
  2. Under My Applications tab, add a new application.
  3. Select "Private". Give your application a name.
  4. Paste the content of your public key that you generated earlier (publickey.cer file).
  5. Agree to the terms and Save.
  6. 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

Limitations

  • 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.

 

Comments


Powered by Revindex Wiki