Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Xero API

Security covered Under active development 57 sites

This module integrates with the Xero accounting software, allowing other Drupal modules to create invoices and payments or retrieve data. It uses Xero's OAuth 2.0 for authentication and provides services for querying and interacting with the Xero API.

Provides methods to integrate with the Xero Account SaaS that allows modules to create invoices and payments or read in data from Xero.

This uses Xero's OAuth 2.0 application. You will need to follow their instructions to setup your application for your organization.

Drupal 8 or greater

Xero API uses the xeroclient library.

Getting Started

Please review the README for the most up-to-date instructions.

API

  • Typed Data integration for Xero types including custom "view" method to print out a render array for a data type.
  • xero.query service to get, post, and put to Xero API.
  • Xero reference field to store references to Xero objects by GUID.
  • Form builder service to dynamically create forms based on Typed Data data types.
  • Templates for Xero types.
  • PHPUnit tests running off of qa.drupal.org.

Drupal 7.x-2.x

Experimental OAuth2 support is available in 7.x-2.x branch of this module.

Drupal 6, Drupal 7 1.x

Xero API uses the PHP-Xero library, and is not compatible with oauth module because of the way in which the OAuth class is included in both the module and the PHP-Xero library.

API

  • Methods: Query data, cache data, and build forms around data.
  • Make API: Create array structures for various Xero data types.
  • Theme API: Theme functions and templates for basic data types.
  • Field API: Xero reference field stores Contact, Payment, BankTransaction, Account, and Invoice Xero types (7.x-1.0-beta2 or greater)
  • Tests: Connection test and validation assertions using SimpleTest.
  • Example: See included Ubercart Xero example.

Modules that use Xero API

Xero API provides methods as described in API.txt to let you develop modules. As an example, I have used the Xero API to create addhours and addhours_xero modules (private), which post hour entries as Invoice line items to Xero. You can make any GET or POST query as defined in the Xero Developer Documentation.

As such this module actually has no visible effect other than providing methods for a module developer to use and to test their own application. I found that there is no one way that Accounting is setup per organization.

Version information

Module Version Drupal Compatibility Library Compatibility 3.1.x 10, 11, 12 xeroclient >= 0.5.1, < 11.2 only supported until 3.1.0-alpha3 3.0.x 10 xeroclient >= 0.4 8.x-2.x 8, 9 xeroclient < 0.4 >= 0.3 7.x-2.x 7 xeroclient (included) 7.x-1.x 7 No longer compatible with Xero API

Ask your assistant about Xero API

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
10
Tracked since
Apr 2023
Latest release
3 months ago
Releases (12 mo)
2
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
3.1.0-alpha4 Pre-release 11 Jul 13, 2026
3.1.0-alpha3 Pre-release 10–11 Jul 3, 2026
3.1.0-alpha2 Pre-release 10–11 Aug 15, 2025
3.1.0-alpha1 Pre-release 10–11 Dec 20, 2024
3.1.x-dev Dev 11 Jun 14, 2024
3.0.0-alpha4 Pre-release 9–11 Jun 14, 2024
3.0.0-alpha3 Pre-release 9–11 Apr 17, 2024
3.0.0-alpha2 Pre-release 9–10 Jan 19, 2024
3.0.0-alpha1 Pre-release 9–10 Oct 12, 2023
3.0.x-dev Dev 9–11 Apr 22, 2023