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

ActiveLibrary

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 6y 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 2mo 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 75% 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

2853d 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

[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[horstoeko/zugferd

A library for creating and reading european electronic invoices

4044.3M18](/packages/horstoeko-zugferd)[thenetworg/oauth2-azure

Azure Active Directory OAuth 2.0 Client Provider for The PHP League OAuth2-Client

2509.6M48](/packages/thenetworg-oauth2-azure)[stevenmaguire/oauth2-keycloak

Keycloak OAuth 2.0 Client Provider for The PHP League OAuth2-Client

2275.9M27](/packages/stevenmaguire-oauth2-keycloak)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k20](/packages/civicrm-civicrm-core)

PHPackages © 2026

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