PHPackages                             6by6/freeagent-php - 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. 6by6/freeagent-php

ActiveLibrary[API Development](/categories/api)

6by6/freeagent-php
==================

A wrapper for the freeagent API

v1.0.3(7y ago)56696[3 PRs](https://github.com/6by6/freeagent-php/pulls)MITPHP

Since Sep 25Pushed 7y ago4 watchersCompare

[ Source](https://github.com/6by6/freeagent-php)[ Packagist](https://packagist.org/packages/6by6/freeagent-php)[ RSS](/packages/6by6-freeagent-php/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (3)Versions (5)Used By (0)

freeagent-php
=============

[](#freeagent-php)

[![Build Status](https://camo.githubusercontent.com/b0472163c251575875e6569626e7eed8ef6756bbf7133fa650e26356ee6634cb/68747470733a2f2f7472617669732d63692e6f72672f366279362f667265656167656e742d7068702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/6by6/freeagent-php)

This is a PHP library that provides a comprehensive wrapper for the [Freeagent v2 API](https://dev.freeagent.com/).

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

[](#installation)

You can install this library via [Composer](https://getcomposer.org/download/):

`composer require 6by6/freeagent-php`

Compatibility
-------------

[](#compatibility)

We are currently testing against the following PHP versions:

- '5.6'
- '7.0'
- hhvm
- nightly

Unit Tests
----------

[](#unit-tests)

Phpunit tests are provided with the library, however, we would **strongly**recommend **NOT** executing these against your live account. The tests require a clean account and part of the process involves deleting any data before starting i.e. everything about your business.

The test suite will attempt to ensure you are not using a live account before executing tests, however, we will not be held responsible for any loss of data.

If you're just getting started we would recommend using a sandbox account (obtainable via the [Freeagent API Quickstart Guide](https://dev.freeagent.com/docs/quick_start)).

Getting Started
---------------

[](#getting-started)

### Get a list of invoices

[](#get-a-list-of-invoices)

```
use SixBySix\Freeagent\OAuth\Api;
use SixBySix\Freeagent\Entity\EntityCollection;
use SixBySix\Freeagent\Entity\Invoice;

/** @var Api $api */
$api = new Api(
  $clientId = getenv('API_CLIENT_ID'),
  $clientSecret = getenv('API_CLIENT_SECRET'),
  $refreshToken = getenv('API_REFRESH_TOKEN'),
  $sandbox = true
);

/** @var EntityCollection $invoiceCollection */
$invoiceCollection = $api->invoice()->query([
  'view' => 'last_3_months',
]);

/** @var Invoice $invoice */
foreach ($invoiceCollection as $invoice) {
  echo "{$invoice->getReference()}\n";
}

```

Bug Reports
-----------

[](#bug-reports)

Please use the [Github Issue Tracker](https://github.com/6by6/freeagent-php/issues) for support.

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 86.7% 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 ~100 days

Total

4

Last Release

2898d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/81b8c5696f1c61f8055a8a784c827614cbf3d67fa13b38fc74a5842b1f4d66e7?d=identicon)[daniel\_ness](/maintainers/daniel_ness)

---

Top Contributors

[![daniel-ness](https://avatars.githubusercontent.com/u/988530?v=4)](https://github.com/daniel-ness "daniel-ness (13 commits)")[![arronwoods](https://avatars.githubusercontent.com/u/778702?v=4)](https://github.com/arronwoods "arronwoods (1 commits)")[![pocketarc](https://avatars.githubusercontent.com/u/5393?v=4)](https://github.com/pocketarc "pocketarc (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/6by6-freeagent-php/health.svg)

```
[![Health](https://phpackages.com/badges/6by6-freeagent-php/health.svg)](https://phpackages.com/packages/6by6-freeagent-php)
```

###  Alternatives

[showdoc/showdoc

ShowDoc is a tool greatly applicable for an IT team to share documents online

12.8k7.0k](/packages/showdoc-showdoc)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[dcblogdev/laravel-microsoft-graph

A Laravel Microsoft Graph API (Office365) package

171312.2k3](/packages/dcblogdev-laravel-microsoft-graph)[typhonius/acquia-php-sdk-v2

A PHP SDK for Acquia CloudAPI v2

222.9M7](/packages/typhonius-acquia-php-sdk-v2)[dcblogdev/laravel-xero

A Laravel Xero package

54141.3k4](/packages/dcblogdev-laravel-xero)[webit/w-firma-api

wFirma.pl API

1821.5k](/packages/webit-w-firma-api)

PHPackages © 2026

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