Enrich Stripe with data from your warehouse to create, manage, and drive revenue analysis from your customers, products, prices, subscriptions, and invoices resources.
The Stripe integration allows you to sync data from your warehouse based on models that you define.
Create and schedule syncs to the supported resources to keep your data up-to-date in Stripe to facilitate the creation of records with associations, or fulfill your business requirements.
Stripe offers a multitude of integrations, which comes at the cost of requiring the user to make precise design decisions when choosing one integration over another. The Hightouch Stripe integration
strives to make this process as painless as possible by allowing you to:
Extract and structure data from your warehouse based on models that you define to fit your Stripe integration needs.
Sync to supported core resources that are required for Stripe integrations.
Hightouch sits on top of your data warehouse and can read from Snowflake, Redshift, BigQuery, Databricks, Postgres, MySQL, and many other data sources. You can even fetch data from Google Sheets and Airtable. Hightouch can help activate your data wherever it resides.
We've written dedicated guides for each supported data source. Take your pick:
If you're missing the credentials necessary to connect to your data source,
try inviting your teammates to Hightouch. You can have unlimited collaborators
in your workspace.
Waiting for credentials to your data warehouse? No problem. You can connect to one of our sample databases to get started right away. For the rest of this tutorial, we'll use our demo Postgres database, which contains a users table with names, emails, locations, and other user attributes. This sample source is available when you log in for the first time—no setup required.
Next, we'll write a SQL query to define which users should be synced to our Stripe customers resource. You can follow the same pattern to sync to other support Stripe resources,
In Hightouch, a model represents a query that filters or transforms the records in your data source. Models are used to determine exactly which records to sync between sources and destinations.
When you connect to a data warehouse, your models will probably be written in SQL. You can also import models from tools like dbt and Looker.
In this example, we'll keep it simple. Suppose you want to sync all your customers to Stripe. To accomplish this, you'll want to create a model that looks like this:
SELECT*FROM users;
Click on Models in the left sidebar.
Click on Add model in the top right corner.
Select Demo Database as your source and click Continue to proceed.
Select SQL Editor as your modeling method.
Paste the SQL query from above into the editor on the left side of the page.
Click Preview to execute the query.
Click Continue to proceed.
Give your model a name and unique slug (for example, "All Users" and all-users).
Select ID as the primary key for your model.
Click Finish to create your model.
We just created a model using a SQL query that retrieves all our current users. Next, we'll configure our sync to add these users to the Stripe customers resource.
For some Stripe resources, certain fields are conditionally required based on values of fields in the record that is being synced.
We strongly recommend using Stripe's API documentation as reference while creating your Hightouch configuration form for each of the resources and structure your model accordingly.
For Subscription, Invoice, and Invoice Item resources, Hightouch can perform a reference look-up
for the Customer ID field.
After selecting the Customer ID Stripe field from mappings, a reference input will be rendered. Similar
to the Customer resource, Hightouch can conduct a look-up using a Customer Emailand the respective Customer ID
will be used in the request to Stripe.
If a look-up is not required, the follow configuration will bypass the look-up step.
The delete section allows you to configure how the sync behaves when the Hightouch sync engine recognizes that a record has been removed from your source.
In the Stripe integration, deletes are only supported in Upsert mode.
Delete the associated invoice. Deletion is only supported if the associated invoice is a draft; if the invoice is not a draft, Hightouch will do nothing to the existing record in Stripe.
Delete the associated invoice item. 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.
Common errors that we've noticed are mainly Stripe API errors when data from your model is structured incorrectly or expected data is missing.
For some Stripe resources, certain fields are conditionally required based on values of fields in the record that is being synced, so an error will be thrown if these fields are missing.
We strongly recommend using Stripe's API documentation as reference while creating your Hightouch configuration form for each of the resources and model your data accordingly.
You can use the Hightouch debugger to learn about errors that are thrown.
Reach out to us for assistance. We're here to help.