PHPackages                             servality/xero - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. servality/xero

ActiveLibrary[API Development](/categories/api)

servality/xero
==============

Xero API wrapper

143PHP

Since Mar 25Pushed 7y ago1 watchersCompare

[ Source](https://github.com/servality/xero)[ Packagist](https://packagist.org/packages/servality/xero)[ RSS](/packages/servality-xero/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

PHP Wrapper for Xero API
------------------------

[](#php-wrapper-for-xero-api)

[![Latest Stable Version](https://camo.githubusercontent.com/daac82e477696adb78e55e7daba33ea0e8b6dc9840dfbba6b22a50f2c693b3d8/68747470733a2f2f706f7365722e707567782e6f72672f73657276616c6974792f7865726f2f762f737461626c65)](https://packagist.org/packages/servality/xero)[![License](https://camo.githubusercontent.com/80896e805ccb32c8f759f83dded84a1212c90517ed16c2d8bc9c34ace6f0e90a/68747470733a2f2f706f7365722e707567782e6f72672f73657276616c6974792f7865726f2f6c6963656e7365)](https://packagist.org/packages/servality/xero)

Requirements
------------

[](#requirements)

- PHP 7+
- guzzlehttp/guzzle
- guzzlehttp/oauth-subscriber

Introduction
------------

[](#introduction)

This application was written as a simple Xero API wrapper for use in a laravel application. At this stage, support is only available for **private** applications.

Installation
------------

[](#installation)

Recommended installation is through Composer.

console:

```
composer require servality/xero:dev-master
```

or add to composer.json:

```
  {
    "require": {
    "servality/xero": "dev-master"
    }
  }
```

Prerequisites
-------------

[](#prerequisites)

A Xero organisation is required to use the API. It's recommended a [demo company](https://my.xero.com/!xkcD/Action/OrganisationLogin/!zkmCt) is created for testing. Follow the steps at [Xero Developer](https://developer.xero.com/) to create a private application.

Usage
-----

[](#usage)

### Basic usage

[](#basic-usage)

```
   $config = [
       'oauth' => [
           'consumer_key' => 'appication_consumer_key',
           'consumer_secret' => 'appication_consumer_secret',
           'private_key_file' => 'path/to/private_key.pem',
           'private_key_passphrase' => 'passphrase'
       ],
       'response' => 'json', //json or xml
       'user_agent' => 'application_name'
   ]

   $xero = new XeroApplication($config);

   $xero->invoices()->get();
```

### Filtering

[](#filtering)

```
   $xero->contacts()->where('name.contains("Mark")')->get();
```

### Xml Helper

[](#xml-helper)

This package included and XML Helper class for converting an array to xml.

See [wiki Page](https://github.com/servality/xero/wiki/Xml-Helper) for details.

License
-------

[](#license)

Open-sourced software licensed under the MIT license.

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/9757701?v=4)[Michael Newman](/maintainers/servality)[@servality](https://github.com/servality)

---

Top Contributors

[![servality](https://avatars.githubusercontent.com/u/9757701?v=4)](https://github.com/servality "servality (50 commits)")

---

Tags

guzzlehttpxeroxero-api

### Embed Badge

![Health badge](/badges/servality-xero/health.svg)

```
[![Health](https://phpackages.com/badges/servality-xero/health.svg)](https://phpackages.com/packages/servality-xero)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

94452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
