=== CatCode Accounting Sync with QuickBooks for WooCommerce ===
Contributors: catcodestudio
Tags: quickbooks, accounting, invoices, sales tax, woocommerce
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Sends WooCommerce orders to QuickBooks Online as invoices, with customers, sales tax, automatic retries and no duplicates.

== Description ==

Every order in your shop has to end up in your books. This plugin sends it to QuickBooks Online when the order reaches a status you choose, and keeps trying when the connection is down.

QuickBooks is a trademark of Intuit Inc. This is an independent integration, not affiliated with or endorsed by Intuit.

= What it does =

* Creates an invoice in QuickBooks Online for each order, with products, shipping and fees.
* Finds the customer by e-mail address or creates it, with name, company, phone and billing address. The shipping address of each order goes on its invoice.
* US sales tax: lines WooCommerce taxed are marked taxable, the others non-taxable, and the tax WooCommerce charged goes on the invoice with the sales tax code you choose, so QuickBooks does not calculate it again and the invoice total is the order total. A line taxed at several rates (state and county) stays one line.
* Companies outside the US (UK, Canada, Australia and others): each WooCommerce rate goes to the QuickBooks tax code of the same percentage, or to the one you choose. If there is no certain match, the order stops with a message instead of landing in the wrong box of your tax return. If QuickBooks rounds the tax to a different total, the order note says so.
* No sales tax in QuickBooks, or you prefer it so: the tax can go as a line with a product or service you choose.
* You choose which QuickBooks product or service the product lines, shipping and fees name; its income account decides where the sale is booked.
* Multicurrency: an order in another currency goes out in that currency when Multicurrency is on in QuickBooks, otherwise it stops with a clear message.
* Works through a queue. Network and server errors are retried automatically for up to about two days, and the queue waits by itself when QuickBooks asks to slow down. Problems that need your attention stop with a clear message on the order and in the queue.
* No duplicates. A document exists once per reference in the queue; every document carries the order reference in its memo (and as its number when custom transaction numbers are on), and is looked up there before anything is created. Creating requests also carry a request id, so QuickBooks answers a repeated request with the first result.
* Connects with OAuth 2.0 through your own Intuit app. The client secret and the tokens are stored encrypted, the connection is renewed by itself, and you hear about it on every WooCommerce screen if QuickBooks ends it.
* A box on the order, a bulk action on the orders list, and "Send again" in the queue.
* Works with High-Performance Order Storage and classic order storage.

== Installation ==

1. Install and activate the plugin. WooCommerce has to be active, and the site has to use https.
2. Sign in at developer.intuit.com with the Intuit account of the company and create an app for QuickBooks Online with the Accounting scope.
3. In WooCommerce > Accounting Sync, copy the redirect address shown on the Connection tab into the app's Redirect URIs.
4. Copy the client ID and the client secret into the Connection tab and save. Development keys work with a sandbox company for testing; production keys work with your real company once Intuit has the app details and the compliance answers of your app.
5. Click "Connect to QuickBooks", sign in and pick the company.
6. Open the Mapping tab: choose the product or service for order lines, and how sales tax goes.

== Frequently Asked Questions ==

= Why do I need my own Intuit app? =

QuickBooks Online lets a site connect only through an app registered at Intuit. With your own app the connection belongs to you and to your company alone, and no data passes through anyone else's server.

= What happens to orders that existed before I installed the plugin? =

Nothing, until you send them: select them in the orders list and choose "Send to QuickBooks".

= Does the plugin change prices or the checkout? =

No. It adds nothing to the shop front.

= Is this tax advice? =

No. You stay responsible for your bookkeeping and your sales tax returns. Check the mapping with your accountant.

= An order stopped with a tax message. What now? =

Choose the tax code on the Mapping tab and click "Send again". The invoice is created once.

= QuickBooks says the connection ended. =

Intuit ends a connection that was disconnected in QuickBooks, or not used for 100 days. Click "Connect to QuickBooks" again; orders that waited go out after that, and stopped ones can be sent again from the Queue tab.

== External services ==

This plugin connects to Intuit to sign in to QuickBooks Online (appcenter.intuit.com, oauth.platform.intuit.com, developer.api.intuit.com) and to the QuickBooks Online Accounting API (quickbooks.api.intuit.com, or sandbox-quickbooks.api.intuit.com with development keys) to create customers and invoices in your own company. It only does so after you add the client ID and secret of your Intuit app and connect.

When an order reaches a status you chose, or when you send it by hand, these data go to QuickBooks: the customer's name, company, billing and shipping address, e-mail address, phone number and tax number, and the order's reference, date, lines, amounts and tax. The settings screens also read your company name, country, currency and settings, your products and services, accounts, payment methods and tax codes. Disconnecting, or deleting the plugin, revokes the connection at Intuit.

Intuit [terms of service](https://www.intuit.com/legal/terms/) and [privacy statement](https://www.intuit.com/privacy/statement/).

== Changelog ==

= 1.0.0 =
* First release.

== Upgrade Notice ==

= 1.0.0 =
First release.
