Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

Xero API

62 sites Security covered
View on drupal.org

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

Activity

Total releases
3
First release
Aug 2025
Latest release
4 days ago
Releases (12 mo)
3 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Release date
3.1.0-alpha4 Pre-release Jul 13, 2026
3.1.0-alpha3 Pre-release Jul 3, 2026
3.1.0-alpha2 Pre-release Aug 15, 2025