Comment on page
Sync your Stripe customers and their revenue data to Vitally in real time with our Stripe integration
Vitally's Stripe integration can be used to sync the following Stripe data into Vitally in real time:
- Customers - Vitally can import your Stripe customers into Vitally as accounts. When done, we'll add a wealth of new Stripe-defined traits to your Vitally profiles, such as the expiration of the customer's credit card, the plans they are subscribed to, and much more!
- Revenue data - Vitally also imports your historical paid invoices from Stripe so that you have immediate, accurate insight into the purchase history of every account in Vitally.
To enable the Stripe integration, navigate to Integrations -> Stripe in your Account Settings (get there via Quick Jump). When there, first click the Connect to Stripe button. That will redirect you to Stripe, where you'll need to grant Vitally access to your Stripe data. Once you do, you'll be redirected back to Vitally, where you'll be able to configure the integration.
Once you connect us to your Stripe account, the first option in Vitally displays the question "Do your Stripe customers have the primary ID of the account attached in
metadata?" with 2 options - "Yes" or "No":
The "Yes" option (recommended)
The "No" option
As Vitally unifies your customer data from various sources, we need a way to 'link' the data stored by those sources together under the same account in Vitally. The most accurate way of doing that is by using the same "global ID" across all systems (which is usually the ID defined by your database), but different systems have different ways of specifying this ID. For example, in Segment, it is the first option passed when using
analytics.group. In Intercom, it's the
company_idfield supported on their company object.
In Stripe, they have no way of natively specifying this ID. However, Stripe does have support for attaching arbitrary data to your accounts via a
metadatafield, and we recommend using that field to add each account's global ID to your Stripe customers.
If you can attach each account's global ID to your Stripe metadata, selecting "Yes" to the "Do your Stripe customers have the primary ID of the account attached in
metadata?" question lets you select which field in your
metadatacontains that ID.
If you aren't already tracking each account's ID in your Stripe
metadata, it may be a bit difficult to make the technical changes necessary to do so. If that's the case, you can select "No" to the "Do your Stripe customers have the primary ID of the account attached in
Selecting "No" means we'll attempt to import an account's Stripe data using the email of the customer in Stripe. The process is pretty straightforward - once we get the customer from Stripe, we'll use the email attached to the customer to locate a user in Vitally with that email. If we find a user, we'll associate the subscription for that Stripe customer to the user's account in Vitally.
There are a few downsides to this option:
- If you have multiple users in Vitally with the given Stripe email, we'll simply use the account associated to the first user with the email, which may or may not be the 'correct' choice.
- If your Stripe emails aren't the same ones users sign up with (e.g. they are "billing@" emails), then we won't be able to attach the Stripe subscription to the right Vitally account.
- We won't be able to import your Stripe customers and payment history until a user with the Stripe email exists in Vitally.
If your Stripe customers have multiple subscriptions, just choose the "Yes" option to the question below:
Selecting "Yes" here defaults your trial, revenue, and churn tracking to use traits we'll attach to your accounts that identify the number of paying (the
Subscription Paying Counttrait) and trialing (the
Subscription Trialing Counttrait) subscriptions the account has in Stripe. We'll also default your MRR trait to one that totals revenue across all active subscriptions for each account.
- The Stripe integration works by initially importing all your existing customers as well as their past paid invoices.
- Moving forward, we then listen for customer, subscription, and invoice changes using Stripe webhooks. If a customer or subscription is created, updated, or deleted in Stripe, we will handle that appropriately by creating, updating, or deleting (churning) the customer in Vitally. Additionally, if a Stripe invoice is paid, we will update the customer's MRR and renewal dates in Vitally.
- Once you enable the Stripe integration, we will automatically adjust your revenue and churn tracking configuration to sync with Stripe. This means we will override any past configuration you had. If you'd rather that not happen, please reconfigure each after the integration is enabled. Note that if you have an existing trial tracking configuration, we will not override it. We do this because many teams choose to track trials internally, outside of Stripe.
- All Stripe data is also attached to your Vitally customers as traits, giving you the ability to leverage that data in reports and Indicators.
When we import a customer from Stripe, we'll automatically add the below traits to your accounts in Vitally. Keep in mind that you can segment accounts by any traits, so you'll be able to run reports across all these fields below in Vitally 🎉
If you select that customers have multiple subscriptions in Stripe, we’ll automatically transition to exclusively using the following set of traits: