PHPackages                             picqer/xero-php-client - 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. picqer/xero-php-client

Abandoned → [calcinai/xero-php](/?search=calcinai%2Fxero-php)ArchivedLibrary[API Development](/categories/api)

picqer/xero-php-client
======================

PHP Client library for the Xero oAuth API, only for private applications

v0.1.14(7y ago)57.3k3MITPHP

Since Apr 15Pushed 7y ago2 watchersCompare

[ Source](https://github.com/picqer/xero-php-client)[ Packagist](https://packagist.org/packages/picqer/xero-php-client)[ Docs](http://github.com/picqer/xero-php-client)[ RSS](/packages/picqer-xero-php-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (16)Used By (0)

xero-php-client
===============

[](#xero-php-client)

PHP Client library for the Xero oAuth API, only for private applications

**This package is not maintained anymore, we recommend this excellent alternative: **

Composer install
----------------

[](#composer-install)

Installing this Xero API client for PHP can be done through Composer.

```
composer require picqer/xero-php-client

```

Usage
-----

[](#usage)

Create a new Private Application in your Xero account:

Create a private key and certificate, and upload your certificate.

Start a Xero client:

```
$xero = new Picqer\Xero\Xero('--api key--', '--api secret--', '--path to private key file--');
```

Provide your API key, API secret and the path to your private key file.

Now retrieve your invoices:

```
$invoices = $xero->getInvoices();
```

Create a new contact
--------------------

[](#create-a-new-contact)

```
$contact = new Picqer\Xero\Entities\Contact();
$contact->Name = 'Casper Bakker Demo';

$address = new Picqer\Xero\Entities\ContactAddress();
$address->City = 'Doesburg';
$contact->Addresses = [ $address ];

$response = $xero->create($contact);
```

Create a new invoice
--------------------

[](#create-a-new-invoice)

```
$invoice = new Picqer\Xero\Entities\Invoice();
$invoice->Type = 'ACCREC';
$invoice->LineAmountTypes = 'Exclusive';
$invoice->Date = new DateTime();
$invoice->DueDate = new DateTime('+2 weeks');

$lineitem = new Picqer\Xero\Entities\InvoiceLineItem();
$lineitem->Description = 'Subscription';
$lineitem->UnitAmount = 12.95;
$lineitem->AccountCode = '8100';
$lineitem->Quantity = 2;

$invoice->addLineItem($lineitem);

$invoice->Contact = $xero->getContact('--existing customer id--');

$response = $xero->create($invoice);
```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 80.6% 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.

###  Release Activity

Cadence

Every ~99 days

Recently: every ~264 days

Total

15

Last Release

2666d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7e81564faf640cc39dc0a13fd619ee761e6e99e7bae96ca258fcd2e7d9f8cbd5?d=identicon)[cbakker](/maintainers/cbakker)

---

Top Contributors

[![casperbakker](https://avatars.githubusercontent.com/u/886975?v=4)](https://github.com/casperbakker "casperbakker (29 commits)")[![stephangroen](https://avatars.githubusercontent.com/u/1607643?v=4)](https://github.com/stephangroen "stephangroen (7 commits)")

---

Tags

xero

### Embed Badge

![Health badge](/badges/picqer-xero-php-client/health.svg)

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

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[dcblogdev/laravel-xero

A Laravel Xero package

53129.1k1](/packages/dcblogdev-laravel-xero)

PHPackages © 2026

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