bocapro/quickbooks-connector

A Filament panel plugin to connect a Filament app with QuickBooks Online and work with invoices, payments, credit notes and customers through a simple facade.

Maintainers

Package info

github.com/siefhesham-boca/quickbooks-connector-plugin

pkg:composer/bocapro/quickbooks-connector

Transparency log

Statistics

Installs: 5

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.1.0 2026-08-20 07:47 UTC

This package is auto-updated.

Last update: 2026-08-20 08:02:22 UTC


README

Latest Version on Packagist Total Downloads

A Filament panel plugin that connects your app to QuickBooks Online. It ships a settings page to configure and OAuth-connect a company, and a Qbo facade to work with invoices, payments, credit notes and customers.

Installation

composer require bocapro/quickbooks-connector

Publish and run the migration:

php artisan vendor:publish --tag="quickbooks-connector-migrations"
php artisan migrate

Optionally publish the config:

php artisan vendor:publish --tag="quickbooks-connector-config"

Register the plugin on your panel:

use Bocapro\QuickbooksConnector\QuickbooksConnectorPlugin;

$panel->plugin(QuickbooksConnectorPlugin::make());

Configuring & connecting

There is nothing to put in .env. Everything is managed from the plugin's settings page in your panel:

  1. Open the QuickBooks Online page under the Integrations navigation group.
  2. Choose the environment (Sandbox or Production) and paste the Client ID and Client secret from your Intuit developer app, then Save. The client secret is stored encrypted at rest.
  3. Copy the Redirect URI shown on the page and register it verbatim on your Intuit app. It is fixed by the package's callback route and is not editable.
  4. Click Connect to QuickBooks. After authorizing on Intuit you'll be redirected back and the company tokens are stored (encrypted). Tokens refresh automatically.

Usage

use Bocapro\QuickbooksConnector\Facades\Qbo;

// Read
$invoice   = Qbo::invoices()->find(130);
$open      = Qbo::invoices()->query("WHERE Balance > '0'");
$customers = Qbo::customers()->all();

// Create
$invoice = Qbo::invoices()->create([
    'Line' => [/* ... */],
    'CustomerRef' => ['value' => '1'],
]);

// Update
$invoice = Qbo::invoices()->find(130);
Qbo::invoices()->update($invoice, ['PrivateNote' => 'Paid in full']);

// Same API for payments and credit notes
Qbo::payments()->all();
Qbo::creditNotes()->find(5);

if (Qbo::isConnected()) {
    // ...
}

Each of invoices, payments, creditNotes, customers exposes find(), query(), all(), create(), update() and delete().

Default mappings

Once a company is connected, the settings page shows a Default mappings section. Pick a default item (used on invoice / credit-note lines), a default income account, and a default deposit-to account (used when recording payments). These are pulled live from the connected company's Chart of Accounts and Items.

When a default is set, it is applied automatically to any create() payload that omits the corresponding reference:

// No ItemRef on the line — the default item is filled in for you.
Qbo::invoices()->create([
    'CustomerRef' => ['value' => '1'],
    'Line' => [[
        'Amount' => 100.00,
        'DetailType' => 'SalesItemLineDetail',
        'SalesItemLineDetail' => ['Qty' => 1, 'UnitPrice' => 100.00],
    ]],
]);

// No DepositToAccountRef — the default deposit account is filled in.
Qbo::payments()->create([
    'CustomerRef' => ['value' => '1'],
    'TotalAmt' => 100.00,
]);

You can also read the reference data yourself for building your own selects:

Qbo::items()->options();               // ['3' => 'Concrete', ...]
Qbo::accounts()->options('Income');    // income accounts only
Qbo::accounts()->options('Bank');      // bank accounts only

Anything you pass explicitly always wins over the configured default.

Testing

composer test

License

The MIT License (MIT). Please see the License File for more information.