wearepixel/laravel-quickbooks

Laravel Client for QuickBooks.
2,821 1
Install
composer require wearepixel/laravel-quickbooks
Latest Version:2.0.2
PHP:^8.3
License:MIT
Last Updated:Jul 27, 2026
Links: GitHub  ·  Packagist
Maintainer: wearepixel

Laravel QuickBooks Client

Latest Stable Version Total Downloads License PHP Version

A Laravel package wrapping the QuickBooks PHP SDK. Provides OAuth 2.0 authentication, automatic token management, and access to the QuickBooks Online API.

Compatibility

Laravel PHP Package
12.x ^8.3 ^2.0
11.x ^8.3 ^2.0
10.x ^8.3 ^1.0

Installation

  1. Install the package:
composer require wearepixel/laravel-quickbooks
  1. Run the migration to create the quickbooks_tokens table:
php artisan migrate

The package uses Laravel's auto-discovery, so no manual provider registration is needed.

Configuration

1. Add the trait to your User model

use Wearepixel\QuickBooks\HasQuickBooksToken;

class User extends Authenticatable
{
    use HasQuickBooksToken;
}

If your User model is not App\Models\User, publish the config and update the user.model value.

2. Set your environment variables

QUICKBOOKS_CLIENT_ID=<your client id>
QUICKBOOKS_CLIENT_SECRET=<your client secret>

Optional:

QUICKBOOKS_API_URL=<Development|Production>  # Defaults based on APP_ENV
QUICKBOOKS_DEBUG=<true|false>                # Defaults to APP_DEBUG

3. Publish config and views (optional)

php artisan vendor:publish --tag=quickbooks-config
php artisan vendor:publish --tag=quickbooks-views

Usage

First, direct users to /quickbooks/connect to authorize their QuickBooks account. Once connected, you can access the API:

$quickbooks = app(\Wearepixel\QuickBooks\Client::class);

// Get company info
$company = $quickbooks->getDataService()->getCompanyInfo();

// Access reports
$reportService = $quickbooks->getReportService();

You can call any of the resources documented in the QuickBooks PHP SDK.

Middleware

Protect routes that require a QuickBooks connection using the quickbooks middleware. Users without a valid token will be redirected to the connect page.

Route::get('quickbooks/invoices', InvoiceController::class)
     ->middleware('quickbooks');

Testing

./vendor/bin/pest

License

MIT

Related Packages

spinen/laravel-quickbooks-client

SPINEN's Laravel Client for QuickBooks.

46,892 47
devio/pipedrive

Complete Pipedrive API client for PHP and/or Laravel

1,913,393 171
bigperson/laravel-vk-geo

Parse countries, regions and cities from vk.com api

465 14
vinelab/http

An http library developed for the laravel framework. aliases itself as HttpClien...

306,989 57
artesaos/laravel-linkedin

Linkedin API integration for Laravel and Lumen 5

66,934 56

Version History

Version Released PHP Laravel License
2.0.2 ^8.3 ^10.0|^11.0|^12.0 MIT
2.0.1 ^8.3 ^10.0|^11.0|^12.0 MIT
2.0.0 ^8.3 ^10.0|^11.0|^12.0 MIT
1.0.0 ^8.0.2 ^10.0|^11.0 MIT