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

# Integrating with Stripe

Connect Stripe to Drivetrain and sync payment and subscription data into your revenue models. Covers API key creation and required permissions.

[Prerequisites](#prerequisites)

[Stripe setup](#stripe-setup)

[Create API key](#create-api-key)

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

To connect Stripe to Drivetrain, you need:

* An active Stripe account
* Admin privileges on Stripe
* Admin privileges in Drivetrain

## Stripe setup <a href="#stripe-setup" id="stripe-setup"></a>

Drivetrain can connect to Stripe using an API key. To create an API key inside Stripe, follow these steps:

### Create API key <a href="#create-api-key" id="create-api-key"></a>

1. Log in to the [Stripe dashboard](https://dashboard.stripe.com/apikeys).
2. On the **Developers** page, select **API Keys**.
3. Under the **Standard keys** section, click **+ Create secret key**.

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

4. Name the key "**Drivetrain Integration Key**" and click **Create**.
5. Make a note of the standard API key and store it in a secure document.

{% hint style="info" %}
That’s it! Share the API key with your customer success manager 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-stripe.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.
