# Integrating with Recurly

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

[Prerequisites](#prerequisites)

[Integrations Steps](#integrations-steps)\
&#x20;  [Step 1: Obtain an API Key](#step-1-obtain-an-api-key)\
&#x20;  [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%2F2nIckLvwLk26mP3vXek4%2FRecurly-1.jpeg?alt=media&#x26;token=69962edf-e5e0-411a-b4c3-faddf6412ef7" 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%2FE9hGIIkyGqdIaEC4d8ox%2Frecurly-2.avif?alt=media&#x26;token=8f71647d-746b-4eaa-852f-c84f1951f78f" 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%2FBdlwBmeQhnTjoVmy3Wv6%2Frecurly-3.webp?alt=media&#x26;token=62215cfc-6118-4e04-9574-32ff0268e63c" 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%2FLAO777YbDrF4syqVBuVn%2Frecurly-4.avif?alt=media&#x26;token=18fbfa43-2ab1-4fea-9691-ca2ab682651f" 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 %}
