> 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-recurly.md).

# Integrating with Recurly

Sync Recurly subscription billing with Drivetrain to keep MRR and churn metrics current. Covers private API key generation.

Drivetrain can connect with Recurly using an API key and subdomain.

[Prerequisites](#prerequisites)

[Integrations Steps](#integrations-steps)\
[Step 1: Obtain an API Key](#step-1-obtain-an-api-key)\
[Step 2: Get your Recurly subdomain](#step-2-get-your-recurly-subdomain)

## Prerequisites

To connect Recurly to Drivetrain via API, you need:

* An account/user with “Integrations” permissions in Recurly. These permissions are required to create an API key.

### Integrations Steps <a href="#integrations-steps" id="integrations-steps"></a>

#### Step 1: Obtain an API Key <a href="#step-1-obtain-an-api-key" id="step-1-obtain-an-api-key"></a>

**Option A: Obtain Existing API Key**

1. Log in to your [Recurly account](https://app.recurly.com/login).
2. In the navigation bar on the left, select **Integrations > API Credentials**.

<figure><img src="https://4220329029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBZR0D9lq6jrI895OuOU%2Fuploads%2Fgit-blob-7f5d87d9c6a52c65c00a6729e24a8ab5172b9f8b%2FRecurly-1.jpeg?alt=media" alt="" width="188"><figcaption></figcaption></figure>

3. Find your private API key and make a note of it.

<figure><img src="https://4220329029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBZR0D9lq6jrI895OuOU%2Fuploads%2Fgit-blob-aca5b1b545657503823767204a610c41aa15cf0b%2Frecurly-2.avif?alt=media" alt=""><figcaption></figcaption></figure>

**Option B: Generate a Recurly API Key**

1. Navigate to **Integrations > API Credentials**.
2. Scroll to the bottom and select **Add Private API Key**.
3. Assign a name to your API key, jot down its purpose, and specify the third-party application it's intended for.

<figure><img src="https://4220329029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBZR0D9lq6jrI895OuOU%2Fuploads%2Fgit-blob-d028485b2fc1737921b02ec177bd9f67be303da3%2Frecurly-3.webp?alt=media" alt=""><figcaption></figcaption></figure>

4. Confirm by clicking **Save Changes**.

#### Step 2: Get your Recurly subdomain <a href="#step-2-get-your-recurly-subdomain" id="step-2-get-your-recurly-subdomain"></a>

1. While logged into your Recurly account, look at the address bar at the top of your web browser and find your subdomain. Your subdomain is the part of the URL between https\:// and recurly.com. It is usually the same as your company name.

<figure><img src="https://4220329029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBZR0D9lq6jrI895OuOU%2Fuploads%2Fgit-blob-d244c0f8cf099dd1aa2f45f5164f2f824152b6b0%2Frecurly-4.avif?alt=media" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
That’s it! Inform your customer success manager and share the API Key and subdomain with them so that 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-recurly.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.
