Quickbooks POS
Connecting to QuickBooks
The provider makes requests to QuickBooks POS through the QuickBooks Gateway. The QuickBooks Gateway runs on the same machine as QuickBooks POS and accepts connections through a lightweight, embedded Web server. The server supports SSL/TLS, enabling users to connect securely from remote machines. The first time you connect, you will need to authorize the provider with QuickBooks POS. For more information, refer to our Using the QuickBooks Gateway section below.
To work with your data in practice mode, set QBPOSPractice. Additionally, set QBPOSVersion.
Connecting to a Local Company File
Follow the steps below to authorize with QuickBooks POS and connect to a company file when both QuickBooks POS and the provider are running on your local machine.
Open QuickBooks POS as an administrator and open the company file you want to connect to.
Connect to QuickBooks POS. A dialog will appear in QuickBooks POS prompting you to authorize the provider. After granting access to the provider, you can now execute commands to QuickBooks POS.
If you want to connect to the company file when QuickBooks POS is closed, set the CompanyFile connection option when you execute commands. QuickBooks POS will open automatically in the background with the file specified.
Note that if QuickBooks POS is open through the application UI, only that CompanyFile can be used.
Connection Troubleshooting
If you receive a connection error (such as "Internal error 160002") you may need to switch QuickBooks POS to multiuser mode. This is done by selecting the "Switch Company File to Multi User Mode" option in the File Menu. You should then be able to connect to the company file.
If a CompanyFile is not specified in the connection string, QuickBooks POS may present an "Enter Company Name" window the first time you connect. In this window, you must specify the company file and the computer name where the company file is located.
QuickBooks Gateway
The QuickBooks Desktop Gateway can be used to read and write to QuickBooks POS in situations where direct COM access to QuickBooks POS is not available (e.g., ASP.NET, Java, or QuickBooks POS on a remote machine). Follow the procedure below to connect to QuickBooks POS for the first time through the Desktop Gateway:
If you have not already done so, download the QuickBooks Desktop Gateway from here and install it.
Open the company file you want to connect to in QuickBooks POS using an administrator account in single-user mode.
Open the QuickBooks Desktop Gateway from the system tray and add a user on the Users tab. Enter a User and Password and select the level of access in the Data Access menu.
Note: The QuickBooks Desktop Gateway does not use the User and Password properties to access QuickBooks POS; the User and Password properties authenticate the user. Authentication to QuickBooks POS is handled by the ApplicationName property.
When you first connect, a dialog appears in QuickBooks POS prompting you to authorize the application. After authorizing, you can execute commands to QuickBooks POS. Specify the URL of the Desktop Gateway and the User and Password. By default, the Gateway connects to the currently open company file.
If you want to access QuickBooks POS when QuickBooks POS is not running, save the company file information for the user. The Desktop Gateway automatically opens QuickBooks POS in the background with the company file for that user.
NOTE: that if the QuickBooks POS UI is open, you can only connect to that company file. Additionally, the user permissions you specify for the Desktop Gateway must match the user permissions you used for QuickBooks POS. The Desktop Gateway installs as a service in the current user account.
How do I Connect to QuickBooks POS over SSL/TLS?
You can enable SSL/TLS on the Advanced tab.
You will also need to send your public key certificate to the provider. You can do so by setting the SSLServerCert property.
Last updated