# Integrating with Invoiced

[Prerequisites](#prerequisites)

[Invoiced Setup](#invoiced-setup)\
[Add Webhook URL](#step-1-add-webhook-url)\
[Create an API Key](#step-2-create-an-api-key)

### Prerequisites <a href="#prerequisites" id="prerequisites"></a>

To connect Invoiced to Drivetrain, you need:

* An active Invoiced production account
* Admin privileges on Invoiced

### Invoiced Setup <a href="#invoiced-setup" id="invoiced-setup"></a>

Drivetrain uses Fivetran to integrate with Invoiced, you have to add a webhook URL and create an API key to complete this Integration. In this guide, you will find detailed steps on how to add both items.

### Step 1: Add Webhook URL

1. Log in to your [Invoiced account](https://app.invoiced.com/login) account and on the navigation menu click on **Settings**
2. On the Integrations tile, click on **Developers**

<figure><img src="https://4220329029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBZR0D9lq6jrI895OuOU%2Fuploads%2FMx2sd5cwsg93PKaC7ppm%2FInvoiced-1.avif?alt=media&#x26;token=3b958a62-0c39-48ed-b53f-6f0bca2d24d6" alt=""><figcaption></figcaption></figure>

3. Click **Integrations** > **New Webhook**.
4. Reach out to Drivetrain's Data Integration Manager or Customer Success Manager for webhook URL.
5. Set the **Enabled** toggle to **ON**
6. In the Enabled Events section, select **Select events**.
7. Select the following events:
   * **credit\_note.deleted**
   * **customer.deleted**
   * **estimate.deleted**
   * **invoice.deleted**
   * **note.deleted**
   * **payment.deleted**
   * **subscription.deleted**
   * **task.deleted**
8. Click **Save**.

<figure><img src="https://4220329029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBZR0D9lq6jrI895OuOU%2Fuploads%2FcLHMr8lcyzVV68rRX8J5%2FInvoiced-2.png?alt=media&#x26;token=5f6cc0c5-5c57-42ee-a885-6a48d0aaa186" alt=""><figcaption></figcaption></figure>

#### Step 2: Create an API key <a href="#step-2-create-an-api-key" id="step-2-create-an-api-key"></a>

1. Go back to Invoiced home page, and on the navigation menu, click **Settings**.
2. On the Integrations tile, click on **Developers**
3. Click **API Keys** > **New API Key**.
4. Make a note of the API Key.

{% hint style="info" %}
That’s it! Share the API key with your data integrations manager or customer success manager so they can get started!
{% endhint %}
