PHPackages                             murrion/bullethq - 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. murrion/bullethq

ActiveLibrary

murrion/bullethq
================

A wrapper class for the BulletHQ API

271

Since Jan 26Pushed 12y agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

A PHP wrapper for BulletHQ's API
================================

[](#a-php-wrapper-for-bullethqs-api)

BulletHQ is an online Invoicing and payroll application, for more information visit

BulletHQ have a great API and it's already quite easy to work with. The class file in src/bullethq.php was created to learn the API and perhaps make it a tiny bit easier for other PHP developers to use it.

\##Usage##

First, add your username and API key to credentials.inc.php and then in your PHP file(s) use the following:

Add the following at the top of your PHP page

```
require_once('src/bullethq.php');
require_once('credentials.inc.php');
$bullet = new \bullethq\bullethq($username, $password);

```

\####Retrieve Client data####

```
$clients = $bullet->get('clients'); // to receive a list of all existing clients

$client = $bullet->get('clients', '12345'); // to receive the details attached to a specific client, where 12345 is a client ID taken from the initial list of clients

```

\####Retrieve Invoice data####

```
$invoices = $bullet->get('invoices'); // to receive all existing invoices

$invoice = $bullet->get('invoices', '12345'); // to receive a specific invoice

```

\####Retrieve Supplier data####

```
$suppliers = $bullet->get('suppliers'); // to receive all existing suppliers

$supplier = $bullet->get('suppliers', '12345'); // to receive a specific supplier

```

\####Retrieve Client payment data####

```
$client_payments = $bullet->get('clientPayments'); // to retrieve all client payments

$client_payment = $bullet->get('clientPayments', '28854'); // to retrieve a client payment

```

\####Submit new Client####

```
$new_client_data = array(
    "name" => "New Client name",
    "addressLine1" => "address 1",
    "addressLine2" => "address 2",
    "email" => "example@domain.com",
    "phoneNumber" => "123456789",
    "vatNumber" => "ei23456",
    "country" => "Ireland"
);

$new_client = $bullet->post('clients', $new_client_data);

```

\####Submit new Invoice####

```
$new_invoice_data = array(
    "clientName" => "Sample Client Name",
    "currency" => "EUR",
    "invoiceNumber" => 100,
    "issueDate" => "2014-01-01",
    "dueDate" => "2014-01-01",
    "draft" => true,
    "invoiceLines" => array(array(
        "quantity" => 1,
        "rate" => "500",
        "vatRate" => 0.23,
        "description" => "Testing",
        "item" => "Day"
    ))
);

$new_invoice = $bullet->post('invoices', $new_invoice_data);

```

\####Submit new Supplier####

```
$new_supplier_data = array(
    "name" => "New Supplier 1",
    "addressLine1" => "address 1",
    "addressLine2" => "address 2",
    "phoneNumber" => "123456789",
    "vatNumber" => "ei23456",
    "country" => "Ireland"
);

$new_supplier = $bullet->post('suppliers', $new_supplier_data);

```

\####Submit new client payment data####

```
$new_payment_data = array(
    'amount' => '100', // The Euro amount that the client has paid
    'dateReceived' => '2014-01-01',
    'currency' => 'EUR',
    'bankAccountId' => 1234, // Your Bank account ID in Bullet HQ
    'clientId' => 12345, // The client that has made a payment
    'invoiceIds' => array(array('1234')) // An existing Invoice ID that a client is paying
);

$new_payment = $bullet->post('clientPayments', $new_payment_data);

```

\####Delete Invoice data####

```
$bullet->delete('invoices', '12345'); // delete an invoice  (note: this is not YOUR invoice ID, it is BulletHQ's ID for the record)

$results = $bullet->delete_all('invoices'); // delete all invoices (lists all invoices first then deletes them individually)

```

\####Delete Client data####

```
$bullet->delete('clients', '12345'); // delete a client (note: all payment data attached to the client must be deleted first

$results = $bullet->delete_all('clients'); // delete all invoices (lists all invoices first then deletes them individually)

```

\####Delete Supplier data####

```
$bullet->delete('suppliers', '12345'); // delete a supplier (note: all payment data attached to the client must be deleted first

$results = $bullet->delete_all('suppliers'); // delete all suppliers (lists all suppliers first then deletes them individually)

```

\####Delete Client Payment data####

```
$bullet->delete('clientPayments', '12345'); // delete a client payment

$results = $bullet->delete_all('clientPayments'); // delete all client payments

```

\##Test status##

[![Alt text](https://camo.githubusercontent.com/799370c49d381b96e33892a7dd78e94d3c2a415474b5586aada4998fabcebb47/68747470733a2f2f7777772e636f6465736869702e696f2f70726f6a656374732f65363234343430302d363832332d303133312d653734352d3465306266383434306231652f737461747573 "Codeship Status")](https://camo.githubusercontent.com/799370c49d381b96e33892a7dd78e94d3c2a415474b5586aada4998fabcebb47/68747470733a2f2f7777772e636f6465736869702e696f2f70726f6a656374732f65363234343430302d363832332d303133312d653734352d3465306266383434306231652f737461747573)

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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://www.gravatar.com/avatar/02fb8be4d2648054ce6b64c8c4ff8e678b649eec50d176f612b13addedb9b4f8?d=identicon)[murrion](/maintainers/murrion)

---

Top Contributors

[![gordonmurray](https://avatars.githubusercontent.com/u/56556?v=4)](https://github.com/gordonmurray "gordonmurray (9 commits)")

### Embed Badge

![Health badge](/badges/murrion-bullethq/health.svg)

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

PHPackages © 2026

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