PHPackages                             omcrn/yii2-quickbooks - 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. omcrn/yii2-quickbooks

ActiveYii2-extension[API Development](/categories/api)

omcrn/yii2-quickbooks
=====================

quickbooks online oauth2 and API wrapper for Yii2

0.0.3(8y ago)2228[2 issues](https://github.com/omcrn/yii2-quickbooks/issues)MITPHP

Since Nov 13Pushed 7y ago1 watchersCompare

[ Source](https://github.com/omcrn/yii2-quickbooks)[ Packagist](https://packagist.org/packages/omcrn/yii2-quickbooks)[ RSS](/packages/omcrn-yii2-quickbooks/feed)WikiDiscussions master Synced yesterday

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

Yii2 Extension for Quickbooks
=============================

[](#yii2-extension-for-quickbooks)

quickbooks online oauth2 and API wrapper for Yii2

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist omcrn/yii2-quickbooks "*"

```

or add

```
"omcrn/yii2-quickbooks": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

Save the following values in .env file:

```
QB_BASE_URL                 = https://quickbooks.api.intuit.com/
QB_DISCOVERY_DOCUMENT       = https://developer.intuit.com/.well-known/openid_sandbox_configuration/
QB_CLIENT_ID                = ****************************************
QB_CLIENT_SECRET            = ****************************************
QB_OAUTH_SCOPE              = com.intuit.quickbooks.accounting
QB_REALM_ID                 = ****************************************
```

You must have `Yii::$app->keyStorage` configured, because the extension uses KeyStorage to save quickbooks authorization tokens. Also you need to save your redirect-url in KeyStorage as a key `quickbooks.redirect-url`

Now you can initialize the extensions like this:

```
$qb = new Quickbooks([
   'authMode' => "oauth2",
   'clientId' => getenv("QB_CLIENT_ID"),
   'clientSecret' => getenv("QB_CLIENT_SECRET"),
   'baseUrl' => getenv("QB_BASE_URL"),
   'realmId' => getenv("QB_REALM_ID"),
   'discoveryDocumentUrl' => getenv("QB_DISCOVERY_DOCUMENT"),
   'oauthScope' => getenv("QB_OAUTH_SCOPE")
]);
```

Implement the 'Connect to Quickbooks' button as in Intuit's Docs:

```
https://developer.intuit.com/docs/00_quickbooks_online/2_build/10_authentication_and_authorization/40_oauth_1.0a/widgets
```

Basically you need to include their .js file and run the following script:

```
intuit.ipp.anywhere.setup({
    grantUrl: '/redirect-url', //the one you saved in KeyStorage
    datasources: {
        quickbooks : true,
        payments : true
    },
    paymentOptions:{
        intuitReferred : true
    }
});
```

You need to implement your redirect-url handler action, initialize Quickbooks extension there and call the connect method:

```
$qb->connect();
```

Now you need to click that button, to obtain auth tokens. Tokens are automatically refreshed each request, so this is one time operation.

When the configuration is done, you can create your custom action, initialize the extension there and call required methods, e.g. for creating a customer you can do the following in your action:

```
$newCustomer = $qb->createCustomer([
   "BillAddr" => [
       "Line1" => $address->address,
       "Line2" => $address->address2,
       "City" => $address->town,
       "Country" => $address->country->name,
       "CountrySubDivisionCode" => $address->country->iso_code_2,
       "PostalCode" => $address->postcode
   ],
   "Notes" => $notes,
   "Title" => $title,
   "GivenName" => $name,
   "MiddleName" => "",
   "FamilyName" => $surname,
   "Suffix" => $suffix,
   "FullyQualifiedName" => $this->name . " " . $this->surname,
   "CompanyName" => $companyName,
   "DisplayName" => $displayName,
   "PrimaryPhone" => [
       "FreeFormNumber" => $mobile
   ],
   "PrimaryEmailAddr" => [
       "Address" => $email
   ]
]);
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93.3% 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 ~14 days

Total

3

Last Release

3075d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/47417401?v=4)[Zura Sekhniashvili](/maintainers/arboshiki)[@arboshiki](https://github.com/arboshiki)

---

Top Contributors

[![zura2](https://avatars.githubusercontent.com/u/9324934?v=4)](https://github.com/zura2 "zura2 (14 commits)")[![beqakapanadze](https://avatars.githubusercontent.com/u/14079102?v=4)](https://github.com/beqakapanadze "beqakapanadze (1 commits)")

---

Tags

yii2extensionquickbooks

### Embed Badge

![Health badge](/badges/omcrn-yii2-quickbooks/health.svg)

```
[![Health](https://phpackages.com/badges/omcrn-yii2-quickbooks/health.svg)](https://phpackages.com/packages/omcrn-yii2-quickbooks)
```

###  Alternatives

[dotzero/yii2-amocrm

Расширение для Yii Framework 2 реализующее клиент для работы с API amoCRM

1639.7k](/packages/dotzero-yii2-amocrm)[conquer/services

Yii2 soap wsdl web services

1632.5k](/packages/conquer-services)[apexwire/yii2-restclient

Tools to use API as ActiveRecord for Yii2

143.5k](/packages/apexwire-yii2-restclient)

PHPackages © 2026

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