Install the PHP SDK

The instructions on this page describe how to install the QuickBooks Online PHP SDK with or without Composer Dependency Manager.

Requirements

  • PHP 5.6 or greater
  • To use the PHP Guzzle handler, install guzzlehttp/guzzle via Composer
  • To use the cURL handler, you must have cURL version 7.19.7 or greater compiled with OpenSSL
Note

QuickBooks Online apps must use TLS 1.1 or higher to align with industry best practices for security and data integrity. Beginning March 31, 2018, the required version will be TLS 1.2 or higher.

Install the SDK with Composer

The recommended way to install the QuickBooks SDK is with Composer. Composer is a dependency management tool for PHP that allows you to declare the dependencies your project needs and installs them into your project. If you are not familiar with Composer Dependency Manager for PHP, see the Getting started page on the Composer website. To install Composer:

curl -sS https://getcomposer.org/installer | php

To add the QuickBooks SDK as a dependency using the composer.phar CLI:

composer require quickbooks/v3-php-sdk

Alternatively, you can specify the QuickBooks SDK as a dependency in your project's existing composer.json file:

{
    "require": {
        "quickbooks/v3-php-sdk": ">=4.0.1"
    }
}

After installing, require Composer's autoloader:

require 'vendor/autoload.php';

For more on how to install Composer, configure autoloading, and other best practices for defining dependencies, go to getcomposer.org.

Install the SDK without Composer

If you are not familiar with Composer, or Composer is not compatible with your environment, you can download the zip file either from the PHP page or form the Releases tab of the PHP SDK repository. For example scripts, go to _Samples for how to make QuickBooks Online API calls without Composer. You will need to include the necessary autoloader:

include('../config.php');

Develop your app

For the next steps after installing the PHP SDK, see Develop an app using the PHP SDK.


Did you find this page helpful?
Your feedback helps us make our docs better. Please let us know if this page helped you, or if it needs improvement.

 Got Questions? Get Answers in our developer forums.