You will learn

Learn how to integrate Stripe with Klaviyo in order to personalize and target emails based on invoice and payment data from your customers.

You'll set up the Stripe integration in 2 steps. First, connect your Stripe account to Klaviyo. Then, set up webhooks in Stripe and complete setup in Klaviyo to sync invoice and payment data in real time.

Here's an overview of the data we sync from Stripe:

  • When an invoice is issued, and the items included in each invoice
  • Payment information for when a user fails payment, is refunded, or successfully pays

Connect your Stripe account

Before you begin, make sure you have a live Stripe account and permission to manage integrations in Klaviyo.

  1. In Klaviyo, select the Integrations tab.
  2. Select Explore apps, search for Stripe, then click the card.
  3. Then, click Install.
  4. Click Connect to Stripe. This will bring you to Stripe's website - log in if needed.
  5. Select the Stripe account you'd like to connect to Klaviyo and click Connect.
  1. Copy the Webhook URL under Webhook setup. Keep this page open while you create the webhook in Stripe.
The stripe integration configuration page.
The stripe integration configuration page.

Set up Stripe webhooks

Now we'll set up your Stripe webhooks, which will enable you to sync your Stripe data in real-time.

  1. Open Stripe in a new tab. Use Stripe's instructions to create a webhook endpoint with the settings below.
  2. Select Your account and choose the Snapshot payload format.
Webhooks tab in Stripe showing endpoints section with add endpoint button
Webhooks tab in Stripe showing endpoints section with add endpoint button
  1. Use the following settings for the endpoint:
    • Endpoint URL
      Paste the URL you just copied from Klaviyo.
    • API version
      Select the latest API version.
    • Events
      Select all charge and invoice events for this endpoint. You can optionally omit all charge.dispute events. Include the following events:
      • charge.captured
      • charge.expired
      • charge.failed
      • charge.pending
      • charge.refunded
      • charge.succeeded
      • charge.updated
      • invoice.created
      • invoice.deleted
      • invoice.finalized
      • invoice.marked_uncollectible
      • invoice.payment_action_required
      • invoice.payment_failed
      • invoice.payment_succeeded
      • invoice.sent
      • invoice.upcoming
      • invoice.updated
      • invoice.voided
  2. Finish creating and enabling the endpoint in Stripe.
Add a webhook endpoint with full list of events and Add endpoint with purple background
Add a webhook endpoint with full list of events and Add endpoint with purple background
  1. Confirm that the endpoint is enabled in Stripe.
Stripe webhook page with status Enabled highlighted in green
Stripe webhook page with status Enabled highlighted in green
  1. To verify Stripe webhooks (recommended), copy the signing secret for the endpoint you just created in Stripe. Return to Klaviyo and paste it into Signing secret under Verify Stripe webhooks (Recommended). This adds an extra level of security to your integration.
  2. Click Complete setup.

Your Stripe integration is now enabled, and historical data will start syncing.

View data synced from Stripe

Klaviyo imports up to 5 years of invoice and payment history. To check its progress, open Stripe from Integrations and select Data. Wait for the historical sync to finish before comparing totals.

To check on your enabled integration:

  1. Click the Analytics dropdown in Klaviyo and select Metrics.
  2. Find and select Stripe's Successfully Paid metric, then select Activity feed.
Activity feed for Stripe Successfully Paid metric in Klaviyo
Activity feed for Stripe Successfully Paid metric in Klaviyo
  1. Check that successful payment events appear in the feed. Only payments with a valid email address sync to Klaviyo.
  2. For instance, click the Chart heading for the Successfully Paid metric. This chart shows the last 30 days of data by default. Either mouse over yesterday's data point or look in the table of data below the chart to see how many payments you had yesterday. Compare that number with Stripe for the same date and time zone, allowing for payments that do not have valid email addresses.
  3. If the totals differ, check that the historical sync has finished and that the payments have valid email addresses. Also compare the time zones used in Klaviyo and Stripe. To check your time zone setting in Klaviyo:
    • Click your account name in the lower left.
    • Select Settings, then General > Account.
    • Scroll down to Time zone.

The Stripe metrics

Stripe syncs the following metrics to Klaviyo:

  • Failed Payment
  • Issued Invoice
  • Refunded Payment
  • Successfully Paid
Metrics tab in Klaviyo filtered by Stripe with metrics including failed payment and issued invoice
Metrics tab in Klaviyo filtered by Stripe with metrics including failed payment and issued invoice

Failed Payment

This metric is recorded every time a payment made through Stripe is marked as failed. Use this metric to target customers with failing payments to let them know they have an overdue balance. You can filter and target Failed Payment events using details such as Currency and Reason. These events include the following information:

  • AttemptCount
    The number of payment attempts for the associated invoice. Included when the payment is linked to an invoice.
  • Currency
    The currency of the failed payment, e.g., USD, GBP.
  • Invoice
    The invoice this failed payment is tied to in Stripe, when present.
  • Reason
    The reason in Stripe this payment failed, e.g., Your card has expired, Your card was declined.

Issued Invoice

This metric is recorded every time an invoice is issued to your customers through Stripe. Use this metric to segment on customers who have been issued an invoice, but either have not paid or had a payment fail. It can also be used to trigger a flow to notify customers of an upcoming payment.

Refunded Payment

This metric records an event when you refund a payment through Stripe. You can filter and target Refunded Payment events based on the following criteria:

  • Amount
    The value of the payment that was refunded.

Successfully Paid

This metric is recorded each time a customer successfully makes a payment through Stripe, whether or not it is linked to an invoice. These events include payment data and, when present, the associated invoice and its line items. Use this metric to send automated invoice receipts to customers after they pay, or use it alongside website activity data in email flows to identify customers who have been active on your website but haven't made payments for your products or services. You can then send those users emails offering discounts to make a purchase on your website.

You can filter and target Successfully Paid events by Currency. These events include the following information:

  • Currency
    The currency of the payment, e.g., USD, GBP.
  • Invoice
    The invoice this payment is tied to in Stripe, when present.

Customer data

For this integration, Klaviyo identifies customers by their email address. If Stripe syncs over customer data with a new email address, Klaviyo will create a new profile consisting of the customer's email address and associated Stripe metrics. When a payment includes card details, the card's expiration date is stored in the Stripe Card Expiration Date custom property on the customer's profile.

One of the Stripe events listed above must occur in order for a profile to be created in Klaviyo.

Use Stripe data in Klaviyo

Use a Stripe metric to trigger a flow. You can narrow the flow with trigger filters, such as a Currency filter, and personalize its messages with data from the triggering event.

Automated invoices

You can send out invoice receipts to your customers automatically after they make a payment by setting up an invoice flow, triggered by Stripe's Successfully Paid metric.

Flow in Klaviyo flow builder triggered by Successfully Paid
Flow in Klaviyo flow builder triggered by Successfully Paid

This flow can automatically populate an email that displays dynamic payment details using template tags that reference Stripe payment attributes.

For more information on embedding dynamic data into an email template, see our article on using event data to personalize flow messages.

Stripe failed payments flow

Alert your customers to a failed payment with an automated flow, triggered by the Stripe Failed Payment metric.

Flow in Klaviyo flow builder triggered by Failed Payment
Flow in Klaviyo flow builder triggered by Failed Payment

Troubleshooting

I am not seeing all activity in Stripe sync to Klaviyo.

A Stripe payment or invoice must have a valid email address to sync to Klaviyo. For payments, check the Stripe customer's email address; if it is missing, Klaviyo uses the email in the payment's billing details. For invoices, Klaviyo uses the invoice's customer email, falling back to the Stripe customer's email if it is missing. If the email address Klaviyo selects is missing or invalid, the event will not sync.

Keep in mind that first and last name inputs are not necessarily consistent or unique, so we don’t create profiles based on this information alone. Doing so could lead to duplicates and inaccurate tracking.

If, even with email addresses associated, you’re still not seeing Stripe data sync to Klaviyo, reach out to our support team.

Outcome

You've now integrated Stripe with Klaviyo and learned how to use your synced data.

Additional resources

  • Getting started with flows

    Learn how to use flows, also known as automations or drip campaigns, in Klaviyo for personalized and automated communications to your customers, and learn how to set your first flow live.

  • Getting started with segments

    Learn how to create and use segments in Klaviyo, which are a powerful tool for understanding your audience and sending targeted messages.

  • Understanding the types of information exchanged between Klaviyo and apps

    Learn about what types of data are exchanged between Klaviyo and external apps, and where that data is found in your Klaviyo account. When you integrate a third-party application with Klaviyo, the two platforms exchange information. Most data exchange with Klaviyo is one-way; data is pulled into your Klaviyo account so you can leverage a broad scope of your customers' data within Klaviyo.

Was this article helpful?
Use this form only for article feedback. Learn how to contact support.

Explore more from Klaviyo

Community
Connect with peers, partners, and Klaviyo experts to find inspiration, share insights, and get answers to all of your questions.
Partners
Hire a Klaviyo-certified expert to help you with a specific task, or for ongoing marketing management.
Support

Access support through your account.

Email support (free trial and paid accounts) Available 24/7

Chat/virtual assistance
Availability varies by location and plan type