> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hightouch.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Stripe

> Enrich Stripe with data from your warehouse to create, manage, and drive revenue analysis from your customers, products, prices, subscriptions, and invoices resources.

## Overview

By combining customer data with subscription data from Stripe, you can derive insights into the most common user actions that turn free accounts into paid ones. Additionally, you can figure out which accounts are at risk of churning when you see little to no activity in paid accounts, allowing you to proactively reach out to at-risk customers before the churn.

> [!TIP]
>
> Check out our [playbook](https://hightouch.com/playbooks/automating-usage-based-billing) and [blog post](https://hightouch.com/blog/automated-billing) to learn how to automate usage-based billing to streamline your finance operations.

## Supported syncing

| Object Type | Description | Supported Sync Modes | API Reference |
| - | - | - | - |
| **Customers** | This object represents a customer of your business. It lets you create recurring charges and track payments that belong to the same customer. | Upsert, Update, Insert | [Customer endpoints](https://stripe.com/docs/api/customers) |
| **Products** | Products describe the specific goods or services you offer to your customers. | Upsert, Update, Insert | [Product endpoints](https://stripe.com/docs/api/products) |
| **Prices** | Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. | Upsert, Update, Insert | [Price endpoints](https://stripe.com/docs/api/prices) |
| **Subscriptions** | Subscriptions allow you to charge a customer on a recurring basis. | Upsert, Update, Insert | [Subscription endpoints](https://stripe.com/docs/api/subscriptions) |
| **Invoices** | Invoices are statements of amounts owed by a customer, and are either generated one-off, or generated periodically from a subscription. | Upsert, Update, Insert | [Invoice endpoints](https://stripe.com/docs/api/invoices) |
| **Quotes** | A Quote is a way to model prices that you'd like to provide to a customer. Once accepted, it will automatically create an invoice, subscription or subscription schedule. | Upsert, Update, Insert | [Quote endpoints](https://stripe.com/docs/api/quotes) |
| **Invoice items** | Invoice Items represent the component lines of an invoice. | Upsert, Update, Insert | [Invoice item endpoints](https://stripe.com/docs/api/invoiceitems) |
| **Meter events** | Meter events report customer usage of a [billing meter](https://docs.stripe.com/billing/subscriptions/usage-based) for usage-based billing. They replace the deprecated usage records endpoint. | Insert | [Meter event endpoints](https://docs.stripe.com/api/billing/meter-event) |

For more information about sync modes, refer to the [sync modes](https://docs.hightouch.com/syncs/types-and-modes.md#sync-modes) docs.

## Connect to Stripe

Go to the [**Destinations** overview page](https://app.hightouch.com/destinations?from=docs) and click the **Add destination** button. Select **Stripe** and click **Continue**. You can then authenticate Hightouch to Stripe with an API key.

You can retrieve your an API key by following these steps:

1. Log in to [Stripe](https://dashboard.stripe.com/login).
2. Visit your [Account Dashboard Homepage](https://dashboard.stripe.com/dashboard).
3. Copy your **Secret key**.

![API key on the Stripe dashboard](https://mintcdn.com/hightouch-3c037897/L_vQfA0JQEpeGUUo/images/destinations/destination-stripe-1.png?fit=max\&auto=format\&n=L_vQfA0JQEpeGUUo\&q=85\&s=d735c92817c5e7633260487b36dcd10a)

If you don't see your Secret key on your dashboard homepage, you can also access it under **Developers**.

![API key on the Stripe dashboard](https://mintcdn.com/hightouch-3c037897/L_vQfA0JQEpeGUUo/images/destinations/destination-stripe-2.png?fit=max\&auto=format\&n=L_vQfA0JQEpeGUUo\&q=85\&s=2c24d92a9142fdfc8056b3ba1264abb3)

If you haven't created an API key yet, Stripe requires you to enter your business details on the [Stripe onboarding page](https://dashboard.stripe.com/account/onboarding).

## Sync configuration

Once you've set up your Stripe destination and have a [model](https://docs.hightouch.com/getting-started/concepts.md#models) to pull data from, you can set up your sync configuration to begin syncing data. Go to the [**Syncs** overview page](https://app.hightouch.com/syncs?from=docs) and click the **Add sync** button to begin. Then, select the relevant model and the Stripe destination you want to sync to.

Your sync configuration options depend on the Stripe object you are syncing to:

* [Customers](#customers)
* [Products](#products)
* [Prices](#prices)
* [Subscriptions](#subscriptions)
* [Invoices](#invoices)
* [Invoice items](#invoice-items)
* [Quotes](#quotes)
* [Meter events](#meter-events)

### Customers

#### Record matching

In **Upsert** mode, you can match customer records from your source to your Stripe workspace on the **Customer Email** field.

In **Update** mode, you can match customer records from your source to your Stripe workspace on either **Customer ID** or **Customer Email**.

#### Field mapping

You can sync columns from your source to Stripe default and custom fields. If you send data for a custom field that doesn't exist, Hightouch adds the field and automatically detects its type.

Refer to the [inline mapping docs](https://docs.hightouch.com/syncs/mapping-data.md#inline-mapping) to see an example of how to map nested objects like a customer's shipping address.

#### Delete behavior

The delete behavior defines how the sync behaves when the Hightouch sync engine recognizes that a record has been removed from your source. The Stripe integration only supports deletions in **Upsert** mode.

| Behavior | Description |
| - | - |
| **Do nothing** | Keep the customer in Stripe |
| **Delete the Stripe record** | Remove the customer from Stripe |

### Products

#### Record matching

You can match rows in your model with products in Stripe on the following fields on the **Product ID** field.

#### Field mapping

You can sync columns from your source to Stripe default and custom fields. If you send data for a custom field that doesn't exist, Hightouch adds the field and automatically detects its type.

Refer to the [inline mapping docs](https://docs.hightouch.com/syncs/mapping-data.md#inline-mapping) to see an example of how to map nested objects like a products's metadata.

#### Delete behavior

The delete behavior defines how the sync behaves when the Hightouch sync engine recognizes that a record has been removed from your source. The Stripe integration only supports deletions in **Upsert** mode.

| Behavior | Description |
| - | - |
| **Do nothing** | Keep the product in Stripe |
| **Delete the Stripe record** | Remove the product from Stripe |

### Prices

#### Record matching

You can match rows in your model with prices in Stripe on the following fields on the **Price ID** field.

#### Field mapping

You can sync columns from your source to Stripe default and custom fields. If you send data for a custom field that doesn't exist, Hightouch adds the field and automatically detects its type.

Refer to the [inline mapping docs](https://docs.hightouch.com/syncs/mapping-data.md#inline-mapping) to see an example of how to map nested objects like a price's `recurring` object.

#### Delete behavior

The Stripe integration doesn't suppport deleting prices.

### Subscriptions

#### Record matching

You can match rows in your model with subscriptions in Stripe on the following fields on the **Subscription ID** field.

#### Field mapping

You can sync columns from your source to Stripe default and custom fields. If you send data for a custom field that doesn't exist, Hightouch adds the field and automatically detects its type.

Refer to the [inline mapping docs](https://docs.hightouch.com/syncs/mapping-data.md#inline-mapping) to see an example of how to map nested arrays like a subscription's items.

#### Associations

Hightouch can perform a reference look-up to associate a subscription to a customer. After selecting the **Customer ID** Stripe field to map, a reference input appears. Similar to the [**Customer** sync type](#customers), Hightouch can conduct a look-up using a **Customer Email**. Hightouch then sends the respective **Customer ID** in the request to Stripe.

![With Association Mapping](https://mintcdn.com/hightouch-3c037897/L_vQfA0JQEpeGUUo/images/destinations/destination-stripe-associations-2.png?fit=max\&auto=format\&n=L_vQfA0JQEpeGUUo\&q=85\&s=074b39fbe928593a6bdb93549983fbc3)

If you select **Customer ID**, a look-up is not required.

![No Association Mapping](https://mintcdn.com/hightouch-3c037897/L_vQfA0JQEpeGUUo/images/destinations/destination-stripe-associations-1.png?fit=max\&auto=format\&n=L_vQfA0JQEpeGUUo\&q=85\&s=1ea94e7a75a30d0c9c4a5ede1eef7343)

#### Delete behavior

The delete behavior defines how the sync behaves when the Hightouch sync engine recognizes that a record has been removed from your source. The Stripe integration only supports deletions in **Upsert** mode.

| Behavior | Description |
| - | - |
| **Do nothing** | Keep the price in Stripe |
| **Delete the Stripe record** | Remove the price from Stripe |

### Invoices

#### Record matching

You can match rows in your model with invoices in Stripe on the following fields on the **Invoice ID** field.

#### Field mapping

You can sync columns from your source to Stripe default and custom fields. If you send data for a custom field that doesn't exist, Hightouch adds the field and automatically detects its type.

Refer to the [inline mapping docs](https://docs.hightouch.com/syncs/mapping-data.md#inline-mapping) to see an example of how to map nested objects like an invoice's `customer address` object.

#### Associations

Hightouch can perform a reference look-up to associate an invoice to a customer. After selecting the **Customer ID** Stripe field to map, a reference input appears. Similar to the [**Customer** sync type](#customers), Hightouch can conduct a look-up using a **Customer Email**. Hightouch then sends the respective **Customer ID** in the request to Stripe.

![With Association Mapping](https://mintcdn.com/hightouch-3c037897/L_vQfA0JQEpeGUUo/images/destinations/destination-stripe-associations-2.png?fit=max\&auto=format\&n=L_vQfA0JQEpeGUUo\&q=85\&s=074b39fbe928593a6bdb93549983fbc3)

If you select **Customer ID**, a look-up is not required.

![No Association Mapping](https://mintcdn.com/hightouch-3c037897/L_vQfA0JQEpeGUUo/images/destinations/destination-stripe-associations-1.png?fit=max\&auto=format\&n=L_vQfA0JQEpeGUUo\&q=85\&s=1ea94e7a75a30d0c9c4a5ede1eef7343)

#### Delete behavior

The delete behavior defines how the sync behaves when the Hightouch sync engine recognizes that a record has been removed from your source. The Stripe integration only supports deletions in **Upsert** mode.

| Behavior | Description |
| - | - |
| **Do nothing** | Keep the invoice in Stripe |
| **Delete the Stripe record** | Remove the invoice from Stripe |

### Invoice items

#### Record matching

You can match rows in your model with invoice items in Stripe on the following fields on the **Invoice Item ID** field.

#### Field mapping

You can sync columns from your source to Stripe default and custom fields. If you send data for a custom field that doesn't exist, Hightouch adds the field and automatically detects its type.

Refer to the [inline mapping docs](https://docs.hightouch.com/syncs/mapping-data.md#inline-mapping) to see an example of how to map nested arrays like invoice items.

#### Associations

Hightouch can perform a reference look-up to associate an invoice item to a customer. After selecting the **Customer ID** Stripe field to map, a reference input appears. Similar to the [**Customer** sync type](#customers), Hightouch can conduct a look-up using a **Customer Email**. Hightouch then sends the respective **Customer ID** in the request to Stripe.

![With Association Mapping](https://mintcdn.com/hightouch-3c037897/L_vQfA0JQEpeGUUo/images/destinations/destination-stripe-associations-2.png?fit=max\&auto=format\&n=L_vQfA0JQEpeGUUo\&q=85\&s=074b39fbe928593a6bdb93549983fbc3)

If you select **Customer ID**, a look-up is not required.

![No Association Mapping](https://mintcdn.com/hightouch-3c037897/L_vQfA0JQEpeGUUo/images/destinations/destination-stripe-associations-1.png?fit=max\&auto=format\&n=L_vQfA0JQEpeGUUo\&q=85\&s=1ea94e7a75a30d0c9c4a5ede1eef7343)

#### Delete behavior

The delete behavior defines how the sync behaves when the Hightouch sync engine recognizes that a record has been removed from your source. The Stripe integration only supports deletions in **Upsert** mode.

| Behavior | Description |
| - | - |
| **Do nothing** | Keep the invoice item in Stripe |
| **Delete the Stripe record** | Remove the invoice item from Stripe.\* |

\**Deletion is only supported if the associated invoice item is not attached to an invoice or if it's attached to a draft invoice, otherwise, Hightouch will do nothing to the existing invoice item in Stripe.*

### Quotes

#### Record matching

You can match rows in your model with quotes in Stripe on the following fields on the **Quote ID** field.

#### Field mapping

You can sync columns from your source to Stripe default and custom fields. If you send data for a custom field that doesn't exist, Hightouch adds the field and automatically detects its type.

Refer to the [inline mapping docs](https://docs.hightouch.com/syncs/mapping-data.md#inline-mapping) to see an example of how to map nested objects like a quote's `computed` object.

#### Delete behavior

The delete behavior defines how the sync behaves when the Hightouch sync engine recognizes that a record has been removed from your source. The Stripe integration only supports deletions in **Upsert** mode.

| Behavior | Description |
| - | - |
| **Do nothing** | Keep the quote in Stripe |
| **Delete the Stripe record** | Remove the quote from Stripe |

### Meter events

Meter events report customer usage against a [billing meter](https://docs.stripe.com/billing/subscriptions/usage-based) and are the recommended way to send usage-based billing data now that Stripe has deprecated usage records. Meter events only support **Insert** mode.

#### Field mapping

| Field | Description |
| - | - |
| **event\_name** | Required. The event name of the meter this usage is reported against. |
| **stripe\_customer\_id** | Required. The Stripe customer ID the usage belongs to. This is the default key Stripe reads for customer mapping. |
| **value** | Required. The usage quantity to record for the event. |
| **identifier** | Optional. A unique identifier for the event. Stripe enforces uniqueness over a rolling 24-hour period, so use it to de-duplicate retried rows. If omitted, Stripe generates one. |

If your meter is configured with custom payload keys, map those columns under **custom fields** — they are added to the event payload alongside the customer and value.

#### Event timestamp

You can optionally map a column containing the event timestamp. Provide it in ISO 8601 format or as Unix time in milliseconds; Hightouch converts it to the Unix seconds Stripe expects. Stripe requires the timestamp to fall within the past 35 days and no more than 5 minutes in the future. If left blank, Stripe records the event at the time it arrives.

## Tips and troubleshooting

To see the exact API requests and responses from each sync run, use the [live debugger](https://docs.hightouch.com/syncs/debugger.md). To get notified by Slack, PagerDuty, SMS, or email when a sync fails, set up [sync alerts](https://docs.hightouch.com/syncs/alerting.md). If you run into an issue this page doesn't cover, [contact support](#pylon-chat).

## Common errors

### Mismatched or missing data

Some Stripe object types have conditionally required fields based on other field values. You may receive Stripe API errors if the data you are syncing is incorrectly structured or if expected data is missing. We strongly recommend using [Stripe's API documentation](#supported-syncing) as reference when creating your Hightouch models and sync configurations.

If you run into any issues, [please reach out to us](#pylon-chat). We're here to help.
