Set up the Xero integration

Explore our API integration with Xero.

Before you can access data from your customers who use Xero for their accounting, you need to set up the Xero integration.

You'll need to:

  • Create a Xero app.
  • Retrieve your app's secure keys.
  • Add the app's secure keys to the Codat Portal.

To link more than 25 companies, become a Xero app partner.

Create a Xero app

Create and configure an app in Xero Developer.

  1. Log in to Xero Developer using your Xero credentials, or sign up for a Xero Developer account if you don't already have one.

  2. On the My Apps tab, click New app.

  3. Enter the following information in the Add a new app dialog:

    • App name: Enter a name for your application. This will be displayed to your users when they share their accounting data in Link, so choose a name that clearly identifies your organization.
    • Integration type: Select Web app.
    • Company or application URL: Enter the URL for your company's website prefixed with https://
    • Redirect URI: Enter https://xero.codat.io/oauth2/callback
  4. Select the checkbox to agree to the Xero Developer Platform Terms & Conditions.

  5. Click Create app.

Your new app is displayed on the Apps details page.

If you don't have app partner status with Xero, 25 max connections is displayed next to the app on the My Apps tab. Non app partners can only link a maximum of 25 companies through the integration.

For example:

711711

If you want to apply to become a Xero app partner, you need to provide your privacy policy and terms and conditions for your app.

  1. Open the App details page for your app.
  2. Enter https:// links to your privacy policy and terms and conditions in the relevant boxes.
  3. Click Save.

For details on how to become a Xero app partner, see App partner status with Xero.

Retrieve your app's secure keys

Retrieve the secure keys for the app you created in Xero Developer.

  1. Click My Apps in the top navigation bar, then select your application from the list.

  2. Click Configuration in the left pane.

  3. Click the eye icon to show your app's Client ID in the Client id box.

  4. Click Generate a secret to generate a client secret for your app; the secret appears in the Client secret 1 box.

    Note: Copy the secret and store it in a safe place. If you leave the Configuration page, you won't be able to view the same client secret again; you'll need to generate a new one.

  5. Keep this page open in your browser. You'll need to enter your secure keys in the following procedure.

Add your secure keys to Codat

After you've created and configured a Xero application, add the application's keys to the Xero integration. When you're ready, enable the integration.

Perform these steps in the Codat Portal.

  1. On the navigation bar, select Settings > Accounting.

  2. Find the Xero integration, then select Manage.

  3. Select One-off or Continuous to choose what type of access to company data the integration will have.

  4. Enter the Client id and Client secret from your Xero app, then click Save.

  5. Enable the integration by setting the Xero toggle to Enabled. You can also enable this integration directly from its Integration settings page.

Configure direct bank feeds

To create a direct bank feed using Xero's Bank Feeds API, you push (POST) Bank Transactions via the Codat API. Bank transactions must be pushed in chronological order.

To create direct bank feeds in Xero, you must have app partner status. Additionally, the Bank Feeds API must be enabled by Xero for your registered app. For more information, see the Bank Feeds API Overview in the Xero Developer documentation.

Make sure you enable Bank Feeds in your Codat portal. You can do so by navigating to the Manage section of the portal under the Integrations > Accounting tab, and clicking the toggle. Save the page to validate this configuration.

935935

If you don't have access to direct bank feeds, a 403 error is returned if you try to push bank transactions to Xero. For example:

{
  "type": "invalid-organisation-bank-feeds",
  "title": "Invalid Organisation",
  "status": 403,
  "detail": "The organisation does not support automated bank feeds."
}

App partner status with Xero

To link more than 25 companies (excluding connections to the Xero demo company) you must become a Xero app partner.

🚧

Connection limits for non-partner apps

Xero apps created by non-partners, known as uncertified apps, are limited to a maximum of 25 connections (excluding connections to the Xero demo company).

To remove this connection limit, you must be granted app partner status with Xero. For more information, see App Partner Overview and OAuth 2.0 API limits in the Xero Developer documentation.

Xero have specific requirements about who can gain app partner status and how they must build their integration. Xero app partnership is not possible for all use cases.

❗️

Financial services providers

Financial services providers may be subject to additional commercial terms before being granted app partner status with Xero. If you are a financial services provider, we strongly recommend that you contact Xero before you build your integration. You can also contact your Codat sales or solutions representative to learn more about Xero app partnership.

For detailed information about applying for app partner status with Xero, review the following articles in the Xero Developer documentation:

To start the app partner application process, click Join the Xero App Store on the App details page for your app. You can also contact [email protected] with the details of the application you are building.

912912

Read next

Now you've set up your integration, it's time to test it.