QuickBooks Accounting (Sandbox/Production Plugin)

Demo to preview the settings

For Sandbox version see plugin setup below:

Introduction

This plugin connects your Quickbooks account with your bubble application, so you will be allowed to create new accounts, grant access privileges, and manage your Quickbooks data, so you and your team can easily log in and work with it directly from your app.

Prerequisites

You will need a developer account with Quickbooks in order to interact with the Plugin: https://developer.intuit.com/app/developer/qbo/docs/get-started
Note: The documentation provides info for both Development and Production setup. Use both plugin versions for both setups in order to make sure that it works correctly, by starting with Sandbox.
💡
To stay in the app for 100 days, please leverage the QuickBooks Oauth 2.0 plugin.

Difference between the plugin’s Production and Sandbox versions

On our plugin portal plugins are separated into Sandbox and Production versions because they have different authentication methods in the sandbox and prod.

Sandbox:

Image without caption

Production:

Image without caption
Note: Therefore, please use only the sandbox version for tests and the prod version for real projects and configure separate workflows for them.
Image without caption

Getting started

  • Once you are logged in, go to Dashboard & then 'Create new app'.
  • Click '+ Create an app' for a new application.
  • Select the platform you want to develop for
  • Insert a name for your new app and select the scopes
Image without caption
  • Navigate to the 'Keys & credentials' tab, in BOTH 'Redirect URI' sections add your app's redirect URL.
Image without caption
Image without caption
  • If you are using the Production plugin, do the same as for the Development keys:
Image without caption

If you already have an application here's how to setup

  • Click the “Dashboard” tab.
  • Select your application from the list.
  • Get the keys “Client ID” and “Client Secret” from your app.
Image without caption
  • Place your “Client ID” and “Client Secret” into the plugin's settings in your app.
Image without caption
If you wish to add the Webhooks & continue with your App Listing on the Quickbooks Marketplace you can do so although it's not required to use the plugin.

Plugin Parameters

The 'realmId'
There are a few concepts that once are known will make your integration much easier to understand. The first is the realmId. As the user is going through the OAuth process and signing into your app they will choose the company they wish to use, Once this process is finished they will arrive back in your app and you will notice that there is now an extra parameter in your URL, eg. realmId=123456789.
Example: https://zeroqode-demo-10.bubbleapps.io/version-test/quickbooks_sandbox?debug_mode=true&realmId=4620816365004256890
It's important you grab this value from and save it to the current user because this will be needed in every action you use in reference to the current user's company. This should be saved as the parameter may not persist in other parts of your app.
The 'Sync Token'
Quickbooks uses a sync token to stop multiple users from corrupting data in the event the same record is altered at the same time. This means you should read the record then alter it, When you for example read a vendor's record - grab the sync token (tokens are numbers that increase by one each record change) & as you edit the record you will be able to provide the token there.
It's good practice to only save the token in states on the page, Saving them in the current user or another section of your database will reduce performance but more importantly can lead to errors.
Complex {Looking: "Actions"}
Quickbooks can achieve a lot, It's why they thrive and continue to grow. As you can imagine this makes the data more complex & in turn what we must provide when making calls / creating records also becomes more complex. To combat the number of actions the plugin would require to accommodate the millions of possible record variations we provide you the JSON so you can drop dynamic statements where you need them. This also means in the cases that you need something where your key & value need defining this is done with ease.
Let's look at one of the records, Here is a Vendor,
javascript
{ "BillAddr":{ "Line1":"Bill's Store", "Line2":"Bill Smith", "Line3":"1 Notreal Ave.", "City":"Notrealie", "Country":"U.S.A", "CountrySubDivisionCode":"TX", "PostalCode":"55555" }, "TaxIdentifier":"12-3456789", "AcctNum":"12345678", "Title":"Mr.", "GivenName":"Bill", "FamilyName":"Smith", "Suffix":"Sr.", "CompanyName":"Bill's Store", "DisplayName":"Bill's Store", "PrintOnCheckName":"Bill's Store", "PrimaryPhone":{ "FreeFormNumber":"(012) 345-6789" }, "Mobile":{ "FreeFormNumber":"(012) 345-6789" }, "PrimaryEmailAddr":{ "Address":"bill@test.com" }, "WebAddr":{ "URI":"http://billsstore.com" } }
When you see JSON properties like this, in most cases we provide ALL the properties. A lot of the time they are all required however sometimes this is not the case - To view the Quickbooks documentation in regards to these objects, you can click here.
Looking at the above example to make something dynamic in the Bubble, we can do the following.
Image without caption
  • In the above example, you can see we have made the 'Line1' property dynamic.
⚠️
It's a good idea to add an 'on unhandled error' action to your app - if a user was to then input something that QuickBooks will return an error from, the error will not transpire to your user's screen.
To learn about the proper use of the Quickbooks logo & to download image/button assets, you can visit here.

Plugin Element

QuickBooks Converter

Element convert response from Report’s API Calls to rows
Image without caption
Title
Description
State Type
Choose “Report Type”

Exposed states

Title
Description
Type
Header Titles
Contain heater titles
List of text
Body Rows
Contain body rows
List of text
Header and Body Rows
Contain heater and body rows
List of text
Error type
API Call’s error type
Text
Error message
API Call’s error messages
Text

Element Actions

  1. Convert to rows - Action converts report API response to rows, that can be used in tables.
    1. Title
      Description
      Type
      Data
      Provide response from any report’s API call.
      API Response

Plugin Data / Action Calls

Data Calls

  1. QuickBooks - Company Details
  1. QuickBooks - Get General Ledger
  1. QuickBooks - Read Account
  1. QuickBooks - Read Tax Agency
  1. QuickBooks - Read Tax Code
  1. QuickBooks - Read Tax Rate
  1. QuickBooks - Read Payment
  1. QuickBooks - Read Journal Entry
  1. QuickBooks - Read Changed Data List
  1. QuickBooks - Get Preferences
  1. QuickBooks - Read Transfer
  1. QuickBooks - Read Vendor Credit
  1. QuickBooks - Read Item
  1. QuickBooks - Read Purchase Order
  1. QuickBooks - Read Estimate
  1. QuickBooks - Read a Class
  1. QuickBooks - Read Attachable
  1. QuickBooks - Read Employee
  1. QuickBooks - Read Customer
  1. QuickBooks - Read Deposit
  1. QuickBooks - Query Transfer
  1. QuickBooks - Query Employee
  1. QuickBooks - Query Customer
  1. QuickBooks - Query Attachable
  1. QuickBooks - Query Sales Receipt
  1. QuickBooks - Query Item
  1. QuickBooks - Query Vendor Credit
  1. QuickBooks - Query an account
  1. QuickBooks - Query Estimate
  1. QuickBooks - Query Journal Entry
  1. QuickBooks - Query Payment
  1. QuickBooks - Query Purchase Order
  1. QuickBooks - Query Invoice
  1. QuickBooks - Query Taxcode
  1. QuickBooks - Query Deposit
  1. QuickBooks - Read Payment Method
  1. QuickBooks - Read Accounts
  1. QuickBooks - Get list of Transactions
  1. QuickBooks - Profit and loss detail report
  1. QuickBooks - Sales by customer report
  1. QuickBooks - Profit and loss report
  1. QuickBooks - Ar aging detail report

Action Calls

  1. QuickBooks - Create Account
  1. QuickBooks - Create Attachable
  1. QuickBooks - Create Deposit
  1. QuickBooks - Create Purchase Order
  1. QuickBooks - Create Account Class
  1. QuickBooks - Create Customer
  1. QuickBooks - Create Vendor Credit
  1. QuickBooks - Create Transfer
  1. QuickBooks - Create Payment
  1. QuickBooks - Create Credit Card Account
  1. QuickBooks - Pay Bill
  1. QuickBooks - Create Bill
  1. QuickBooks - Create Tax Agency
  1. QuickBooks - Create Tax Rate
  1. QuickBooks - Create Journal Entry
  1. QuickBooks - Create Item
  1. QuickBooks - Create Employee
  1. QuickBooks - Create Vendor
  1. QuickBooks - Create Estimate
  1. QuickBooks - Read Vendor
  1. QuickBooks - Update Account
  1. QuickBooks - Update Vendor
  1. QuickBooks - Update Transfer
  1. QuickBooks - Update Attachable
  1. QuickBooks - Update Journal Entry
  1. QuickBooks - Update Preferences
  1. QuickBooks - Update Employee
  1. QuickBooks - Update a Class
  1. QuickBooks - Update Vendor Credit
  1. QuickBooks - Update Item
  1. QuickBooks - Update Estimate
  1. QuickBooks - Create Payment Method
  1. QuickBooks - Update Purchase Order
  1. QuickBooks - Update Customer
  1. QuickBooks - Update Deposit
  1. QuickBooks - Update Payment Method
  1. QuickBooks - Delete Something
  1. QuickBooks - Create a purchase
  1. QuickBooks - Delete a purchase
  1. QuickBooks - Read a purchase
  1. QuickBooks - Full update a purchase
  1. QuickBooks - Get an invoice as PDF
  1. QuickBooks - Create sales receipt
  1. Convert to rows a QuickBooks Converter
  1. Refresh Access Token (this)
  1. Initial auth code exchange (this)

Actions

Initial auth code exchange

The action is designed to exchange the authorization code for access tokens.
Image without caption
Fields:
Title
Description
Type
Authorization
Header field in the form of Authorization: Basic <credentials>, where credentials is the Base64 encoding of ID and password joined by a single colon : .
string
Authorization Code
The authorization code your app received from the Intuit OAuth 2.0 response.
string
Redirect URI
The redirect URI listed for your app.
string
Returned values:
Title
Description
Type
error
Error
string
accessToken
The token used to access our API. Max length: 4096 characters.
string
expires_in
The remaining lifetime of the access token. The value begins at 3600. This is in seconds (one hour).
string
refreshToken
The token used for refreshing the access token. Max length: 512 characters.
string
id_token
Token ID
string
error_description
Error description
string
  • To get the Authorization Header field, go to Playground your developer account.
Image without caption
  • Fill in all the required fields and click “Get authorization code”.
Image without caption
  • After you receive the “Authorization code” and “Realm ID”, click “Get tokens”. You will receive Authorization Header field.
Image without caption

Refresh Access Token

Use refresh tokens to “refresh” expired access tokens. You can refresh access tokens without prompting users for permission.
Image without caption
Fields:
Title
Description
Type
Authorization
Header field in the form of Authorization: Basic <credentials>, where credentials is the Base64 encoding of ID and password joined by a single colon : .
string
Refresh Token
The refresh_token value you exchanged the authorization code for.
string
Returned values:
Title
Description
Type
error
Error
string
accessToken
The token used to access our API. Max length: 4096 characters.
string
expires_in
The remaining lifetime of the access token. The value begins at 3600. This is in seconds (one hour).
string
error_description
Error description
string
  • Get a "Refresh Token" in the developer's personal account after clicking the "Get tokens" button in the Playground section.
Image without caption
Image without caption

Changelogs