PHPackages                             isinlor/freshbooks-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. isinlor/freshbooks-php

ActiveLibrary[API Development](/categories/api)

isinlor/freshbooks-php
======================

Freshbook-php package

v1.0(11y ago)128PHP

Since Feb 5Pushed 11y ago1 watchersCompare

[ Source](https://github.com/Isinlor/freshbooks-php)[ Packagist](https://packagist.org/packages/isinlor/freshbooks-php)[ RSS](/packages/isinlor-freshbooks-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

freshbooks-php
==============

[](#freshbooks-php)

Freshbooks PHP Library (forked from: )

Credit to Milan Rukavina () for developing the original library at the above URL.

Warning
-------

[](#warning)

Please note that the library from which this is forked has not been updated or maintained since May 2011. It has A LOT of bugs. It works for some basic tasks well (sending invoices, triggering payments via a payment gateway) but there are lot of "basic" functions that are broken (grabbing invoice details by invoice #, updating invoices as sent, etc.)

This library is only for the brave of heart and for those interested in helping fix up an outdated Freshbooks PHP library.

Initiation
----------

[](#initiation)

To initialize the library, include an initiation block like below.

```
// Include particular file(s) for entity you need (Client, Invoice, Category…)
include_once "library/FreshBooks/Client.php";

// Your API url and token obtained from Freshbooks.com
$url = "your-url-please-replace";
$token = "your-token-please-replace";

// Cnit singleton FreshBooks_HttpClient
FreshBooks_HttpClient::init($url,$token);

```

Get Client Data
---------------

[](#get-client-data)

```
// New Client object
$client = new FreshBooks_Client();

// Try to get client with client_id 3
if (!$client->get(3)){
    // No data – read error
    echo $client->lastError;
}
else {
    // Investigate populated data
    print_r($client);
}

```

New Client
----------

[](#new-client)

```
// new Client object
$client = new FreshBooks_Client();

//populate client’s properties
$client->email = ‘test@test.com’;
$client->firstName = ‘Chad’;
$client->lastName = ‘Smith’;

//all other required properties should be populated

//try to create new client with provided data on FB server
if(!$client->create()){
    //read error
    echo $client->lastError;
}
else {
    //investigate populated data
    print_r($client);
}

```

Lookup Invoice By InvoiceID #00000324301
----------------------------------------

[](#lookup-invoice-by-invoiceid-00000324301)

```
$invoice = new Freshbooks_Invoice();

$invoice->get('00000324301')
	or die("Unable to get Invoice: " . $invoice->lastError);

print_r($invoice);

```

Lookup Invoice(s) for Client #17992
-----------------------------------

[](#lookup-invoices-for-client-17992)

```
$invoice = new Freshbooks_Invoice();

$invoice->listing($rows, $resultInfo, 1, 3, array('clientId' => 17992,
				                              'status' => '',
						                      'dateTo' => '',
						                      'dateFrom' => '',
						                      'recurringId' => ''))
	or die("Unable to grab Invoice listing: " . $invoice->lastError);

if ($invoice) {
	print_r($rows);
	print_r($resultInfo);
}

```

Mark Invoice As Paid
--------------------

[](#mark-invoice-as-paid)

```
$payment = new Freshbooks_Payment();

$payment->invoiceId = '00000324300';

// To mark payment as 'PAID', this amount must be the full amount outstanding on the invoice
$payment->amount    = '2.44';

$payment->type      = 'Bank Transfer';

$payment->create()
	or die("Unable to mark Invoice as paid: " . $payment->lastError);

// Note: this will automatically send the client a payment notification e-mail
// letting them know that their invoice has been paid.

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

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

Unknown

Total

1

Last Release

4120d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/df1a69d8b5d5d226129d5e48898a0be609dbad0c4a44f2e5b6e1ae479da1e383?d=identicon)[Isinlor](/maintainers/Isinlor)

---

Top Contributors

[![jamesspittal](https://avatars.githubusercontent.com/u/4592650?v=4)](https://github.com/jamesspittal "jamesspittal (8 commits)")[![Isinlor](https://avatars.githubusercontent.com/u/528893?v=4)](https://github.com/Isinlor "Isinlor (1 commits)")

### Embed Badge

![Health badge](/badges/isinlor-freshbooks-php/health.svg)

```
[![Health](https://phpackages.com/badges/isinlor-freshbooks-php/health.svg)](https://phpackages.com/packages/isinlor-freshbooks-php)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

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