# Quickbooks

First, you need to set an Quickbooks key and endpoint through the Backoffice in order to provide the Quickbooks components to your customers.\
go to the <https://developer.intuit.com/app/developer/dashboard> to create a new app

<figure><img src="https://content.gitbook.com/content/cfhstxIZQWZNvWjV2O6F/blobs/sHwgGdbUaQxg8TEiCV4C/quickbooks-1.png" alt=""><figcaption></figcaption></figure>

Select the name and scope: \\

<figure><img src="https://content.gitbook.com/content/cfhstxIZQWZNvWjV2O6F/blobs/rS5xPAiM4FoYZlqZQPxP/quickbooks-2.png" alt=""><figcaption></figcaption></figure>

Then you receive your *clientID* and *clientSecret*. Also add the redirect URL (<https://api.appmixer.com/auth/quickbooks/callback>) \\

<figure><img src="https://content.gitbook.com/content/cfhstxIZQWZNvWjV2O6F/blobs/IEaAs4WToyOVPXVfzfmR/quickbooks-3.png" alt=""><figcaption></figcaption></figure>

go the Appmixer BackOffice -> Configuration. Add new configuration: `appmixer:quickbooks` Add your *clientId* and *clientSecret* keys

## Webhooks

All trigger components (for example `NewInvoice`) use QuickBooks webhooks. In order to use this component(s) in Appmixer, you have to register Appmixer's QuickBooks URI in QuickBooks first and set the webhook key in the Appmixer BackOffice.

Go to <https://developer.intuit.com/app/developer/dashboard> then choose your Appmixer app. Navigate to the "Webhooks" section either for the sandbox or production environment and add a new webhook.

<figure><img src="https://content.gitbook.com/content/cfhstxIZQWZNvWjV2O6F/blobs/IDg6lYjBvHta3S4Jkb2w/quickbooks-4.png" alt=""><figcaption><p>QuickBooks Webhooks configuration</p></figcaption></figure>

Fill the field **Endpoint URL** with `https://api.acme.appmixer.cloud/plugins/quickbooks/webhooks` (replace `acme` with your subdomain) and select the events you want to listen to. Configure the event triggers you want to listen to.

<figure><img src="https://content.gitbook.com/content/cfhstxIZQWZNvWjV2O6F/blobs/J6xH3sQExuw0ZkYdtwmT/quickbooks-5.png" alt=""><figcaption><p>QuickBooks Webhooks event triggers</p></figcaption></figure>

For detailed steps, see [QuickBooks documentation](https://developer.intuit.com/app/developer/qbo/docs/develop/webhooks#endpoints).

Make sure to copy the **Verifier Token** and paste it to the Appmixer BackOffice -> Configuration -> `appmixer:quickbooks` -> `webhookKey` field.

<figure><img src="https://content.gitbook.com/content/cfhstxIZQWZNvWjV2O6F/blobs/Dh3UmfiH6Q3dieuB3iBH/quickbooks-6.png" alt=""><figcaption><p>Appmixer BackOffice configuration for QuickBooks Webhooks</p></figcaption></figure>
