Short Version:
How do I connect to my company's QuickBooks Online subscription via a PHP script to retrieve some relatively simple information like a list of Customers or a list of Invoices?
Long Version:
Okay, so I've spent all day trying to figure out how to connect to QuickBooks Online via PHP, and I'm still stuck. Either I'm an idiot, or this whole thing is more complicated than trying to make my wife happy. It looks like the QuickBooks API changes every couple years, any many of the posts from the recent past are now incorrect.
Basically, I am simply trying to write a php script which connects to my company's QuickBooks Online account. I need to do very simple things like retrieve a list of customers, retrieve a list of invoices, and so on. While researching, I found this post from June 2013:
https://stackoverflow.com/a/17226869/3195596
The post says to use qbXML, download the QuickBooks PHP Dev Kit, and look at the example in "docs/example_online_edition.php":
So, I downloaded the QuickBooks PHP Dev Kit (from here: http://consolibyte.com/downloads/quickbooks-php-devkit/) and went into "docs/example_online_edition.php". This php file now says "DO NOT USE THIS FILE ANYMORE!" It also says that "All QuickBooks Online implementations should now be using the v3 REST APIs.".
Therefore, my understanding at this point is this: Before I even connect to my company's QuickBooks Online account, I first have to create a developer account at developer.intuit.com (aka Intuit Partner Platform aka IPP).
So, I registered with IPP, and now I'm just stuck with nowhere to go. My IPP account is not connected to my company's QuickBooks Online account - am I supposed to connect these somehow?
Can anyone explain to me in somewhat plain English how I would connect to my company's QuickBooks Online account via PHP?
I am written extensively on the basics of connecting to QuickBooks. The articles are Rails based but a user of any programming environment can benefit from them.
Get started integrating Rails 4 and QuickBooks Online (QBO)
I simplified my own question here.
And the nice guys at Intuit responded fairly quickly. Their answer, as I understand it, is that I need to build an application under my QuickBooks IPP account, then use OAuth to tie it to my QuickBooks Online account.
Related
I have the QuickBooks desktop app as well as a Zoho CRM subscription. The thing is I am new to QuickBooks and would like to have my data in sync across both of these. I use node.js most of the time but PHP is also an option.
Remember, I need to do it bidirectionally.
I looked up the web connector thing and yet I have no idea where to start.
Please provide a few pointers and libraries I could use.
All development for the desktop will need to be done through the QBXML SDK.
https://developer.intuit.com/v2/docs/0250_qb
To connect to a web application, you will need to use the QB Web Connector (QBWC) included with QB desktop. There is a QBWC server sample included in the SDK along with programmer guides for QBXML and QBWC.
If you are using PHP, there is an open source project available that has the server built and sample requests.
http://consolibyte.com/quickbooks-open-source/
I have more of a conceptual question here, but I think there should be a clear answer. I have a client who sells products using the "Fullfillment by Amazon" service. I am creating a Wordpress site for him to sell his products - and I am wondering what the easiest way to gain direct access to the Fulfillment by Amazon MySQL database would be. I know PHP/MySQL well...but I have never set up a retail site like this using Amazon services.
I did some googling - and found an old project called tarzan-aws, which has just turned into the AWS SDK now. But it looks like if I wanted to use that (if that is what I want to use), I would need to have a database hosted by Amazon AWS...and I already have a hosting service that I like (inmotionhosting.com). Is there a PHP API I could use to link the site to Fullfillment by Amazon? Maybe a Wordpress plugin? I logged into my clients FBA account and it doesn't seem like there is anyway to get the info I would need to set up a working automated PHP/Wordpress backend.
You need to use the Amazon MWS API. They provide a guide, Amazon MWS For FBA Sellers, along with client libraries in PHP, C# and Java. You will not interact with a "database" as you have described; you will interact with a web service.
Very shortly I will be required to do an integration between Quickbooks Desktop and a PHP website. I'm aware that there exists a PHP QuickBooks class that helps with integrating, but to my knowledge that only works when the PHP site is the one to initiate contact with the Desktop application. It's required of me that when a Purchase Order and/or Product is created on QuickBooks, it will automatically (and instantaneously) send the information over to my website using a REST API. Considering there will be multiple instances of QuickBooks Desktop that will be connected (we will allow customers to use a QuickBooks application that we will build), it is not practical to have to constantly check if ALL of those QuickBooks Desktop instances have any new Purchase Orders or Products that have been created since the last time we checked.
Is there a way to somehow add code to QuickBooks to send Purchase Orders and Products (upon creation) to my website using a REST API?
Thank you
QuickBooks itself doesn't really have any reliable method of catching events like you're talking about, and also doesn't have any way to then relay those events to an external REST API. So, you're not going to find exactly what you're looking for - it isn't possible.
With that said, you CAN get close by having an external application that polls QuickBooks periodically (as often as every few seconds) to grab new data from it, and then relays that data up to your REST API.
The easiest way to do this is via the Web Connector. It can poll as frequently as 1 minute, and is very capable of doing exactly what you're talking about. If you want to go with the Web Connector, your best bet is probably this open-source QuickBooks PHP DevKit (disclaimer: I'm the author). You could start with the Web Connector quick-start guide.
The harder way, but more flexible way is to write a custom QuickBooks SDK application that sits alongside QuickBooks, polls QuickBooks periodically, and relays that data up to your app. If you want to do this, you should check out the QuickBooks SDK - it has some C# and VB.NET examples in it which should prove useful.
Some specific notes:
but to my knowledge that only works when the PHP site is the one to initiate contact with the Desktop application.
Actually no - it only works when the Web Connector (which runs alongside QuickBooks) initiates the communication. But you can set it to run every 1 minute, which makes it pretty much constantly run and push data up to your app.
it will automatically
This is easily do-able with either the Web Connector or a custom SDK app.
(and instantaneously)
This isn't do-able. QuickBooks isn't even fast-enough performing to instantaneously relay data. You will never get instant data transfers from QuickBooks, so just forget about it now. (This is especially the case when you realize that there are lots of things in QuickBooks that can completely lock integrated applications out of even connecting to the data file - single-user mode, QuickBooks automatic updates, QuickBooks not being running, too many users in QuickBooks, etc.)
send the information over to my website using a REST API.
If using the Web Connector, your website receives the data, and you can then transform it and send it to your REST API.
If using a custom SDK app, you can write custom code to do that no problem.
it is not practical to have to constantly check if ALL of those QuickBooks Desktop instances have any new Purchase Orders or Products that have been created since the last time we checked.
Are you sure? We do this every day for thousands and thousands of people on ridiculously under-powered hardware.
I try integrate my web applacation with Intuit QuickBooks Merchant Service.
I found this https://idnforums.intuit.com/messageview.aspx?catid=50&threadid=11829
But I don't understand what is it $connection_ticket, where I can get it?
Thanks.
A "connection ticket" is a token you get from Intuit, which allows you charge credit cards through their API. It's sort of like a username/password, or an OAuth token if you're familiar with that.
If you read the documentation included in the example scripts, you'll find the documentation says...:
IMPORTANT * In order to use this example, you'll need to go through the Intuit application registration process first! This is documented
here:
http://wiki.consolibyte.com/wiki/doku.php/quickbooks_qbms_integration
If you then follow that URL, you'll find instructions to get your connection ticket.
The easiest way to get a connection ticket is to use DESKTOP mode. HOSTED mode will work too, but it's much more difficult to get a connection ticket in HOSTED mode.
Here's a direct link:
QuickBooks Merchant Services - get your connection ticket in DESKTOP mode
I went through the same hazzle a few years ago. It is not an obvious issue. A connection ticket is actually an approval from the Intuit Payment underwriting to allow your app integtration with the Payment gateway. In my particular situation, I was a merchant account holder which allowed me to accept credit card using sent QuickBooks Online invoices and the use of a virtual terminal at the Intuit Merchant Solution website.
But to my surprise, this does not mean that you get automatic authority to develop apps to do the same thing. In my particular scenario, I want to link my website shopping cart to Intuit Payments. But at the end of hundreds of hours invested in this development work, I was decnied a connection ticket.
Again, this happened about 4 years ago. I am not sure if now days there are flexible about these things or have finally come to trust their own SKD or API tools issue to developers.
Looking at the Quickbooks API I only see options to sync users. I may just need to export the fields I need directly from the database? Just hoping someone had some scripts/templates to work with this already. I am not too worried about sync as long as the client could manually import web transactions at the beginning of the day
The QuickBooks SDK has the ability to import and export inventory items, including quantity on hand and cost information. Just to be clear, I speaking here about the classic SDK and not the Partner Platform. Using the SDK it is possible to connect to a QuickBooks online company using XML over SSL, or to a desktop company file (still the most popular option for most users) using XML or Intuit's QBFC framework, which is compatible with .NET.
There is no way to access the QuickBooks "database" directly. QODBC give you the ability to run SQL against QuickBooks company file data via ODBC, but it is implemented using the SDK. QODBC is the best way to get up and running fast with QuickBooks, and it's also great for custom reporting. But for most sync applications, the actual data access is a minor part of the overall scope, and the control that you get from going directly to the SDK and bypassing QODBC is worth it.
Most developers who have experience with QuickBooks have a library to help with common SDK tasks. There are also some offerings at code.intuit.com. In addition to library code, it also helps to understand the behavior of both QuickBooks and the SDK. The SDK is well documented and if you haven't visited the SDK section of the Intuit Developer site I would highly recommend it.