> For the complete documentation index, see [llms.txt](https://integrations.drivetrain.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://integrations.drivetrain.ai/integration-guide/readme/billing-and-invoicing/integrating-with-invoiced.md).

# Integrating with Invoiced

Connect Invoiced to Drivetrain and sync billing and accounts receivable into revenue models. Covers creating an API key and adding a webhook URL.

[Prerequisites](#prerequisites)

[Invoiced setup](#invoiced-setup)

[Step 1: Add webhook URL](#step-1-add-webhook-url)

[Step 2: 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. To complete this integration, add a webhook URL and create an API key. In this guide, you will find detailed steps on how to add both items.

### Step 1: Add webhook URL <a href="#step-1-add-webhook-url" id="step-1-add-webhook-url"></a>

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

![](https://4220329029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBZR0D9lq6jrI895OuOU%2Fuploads%2Fgit-blob-018762294fa42b5fc040d2d1f775713244f1d4cf%2FInvoiced-1.avif?alt=media)

3. Click **Integrations** > **New Webhook**.
4. Reach out to your Drivetrain Data Integration Manager or Customer Success Manager for the 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**.

![](https://4220329029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBZR0D9lq6jrI895OuOU%2Fuploads%2Fgit-blob-b2f979328d5ff130e149d24b2758186aebdbf3f6%2FInvoiced-2.png?alt=media)

### 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 the Invoiced home page, and on the navigation menu, click **Settings**.
2. On the **Integrations** tile, click **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 Integration Manager or Customer Success Manager so they can get started!
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://integrations.drivetrain.ai/integration-guide/readme/billing-and-invoicing/integrating-with-invoiced.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
