Customer.io + Stripe
Connect Customer.io and Stripe to Automate Revenue-Driven Messaging
Trigger perfectly timed, personalized campaigns based on real payment and subscription events from Stripe.

Why integrate Customer.io and Stripe?
Customer.io and Stripe are two of the most useful tools in a modern SaaS or e-commerce stack — one owns the customer communication layer, the other owns the payment and subscription lifecycle. When they run in isolation, revenue-critical moments like failed payments, successful upgrades, or trial expirations go without the right message at the right time. Connecting Customer.io with Stripe through tray.ai means every billing event automatically triggers the right email, SMS, or push notification.
Automate & integrate Customer.io & Stripe
Use case
Automated Dunning Campaigns for Failed Payments
When Stripe registers a failed payment or invoice payment failure event, tray.ai immediately updates the customer's profile in Customer.io and triggers a dunning email sequence. The campaign escalates across email, SMS, and in-app with urgency-tuned messaging until the payment is recovered or the subscription is cancelled.
Use case
New Subscriber Onboarding Triggered by Stripe Events
When a customer completes checkout and a Stripe subscription is created, tray.ai fires a workflow that enriches the Customer.io profile with plan name, billing cycle, and MRR, then enrolls the customer in the appropriate onboarding campaign. Different subscription tiers route users into tailored onboarding tracks automatically.
Use case
Trial Expiration and Conversion Campaigns
tray.ai monitors Stripe for upcoming trial end dates and feeds that data into Customer.io to trigger conversion sequences days before the trial expires. When a trial converts to a paid subscription in Stripe, the workflow automatically removes the customer from the conversion campaign and moves them into a paid-user lifecycle track.
Use case
Subscription Upgrade and Downgrade Messaging
Whenever a customer changes their Stripe subscription plan — upgrading to a higher tier or downgrading — tray.ai detects the event, updates the customer's attributes in Customer.io, and triggers the right message. Customers get a response that acknowledges their decision and tells them what to do next.
Use case
Churn Prevention Alerts for At-Risk Subscribers
tray.ai can monitor Stripe signals such as multiple consecutive failed payments, pending cancellation requests, or repeated refunds, and automatically flag these customers in Customer.io to enter a churn prevention workflow. Customer success teams can receive a Slack alert while the customer gets a targeted re-engagement campaign at the same time.
Use case
Post-Purchase and Receipt Transactional Messaging
For one-time Stripe charges, tray.ai routes payment confirmation events into Customer.io to trigger branded transactional receipts, follow-up sequences, or cross-sell campaigns. Every purchase gets captured and acted on with consistent, on-brand communication instead of Stripe's default receipt emails.
Use case
Subscription Cancellation Win-Back Campaigns
When a Stripe subscription is cancelled or set to cancel at period end, tray.ai immediately updates the customer's status in Customer.io and enrolls them in a win-back campaign. The workflow personalizes outreach based on how long they were a customer, which plan they held, and their last interaction with your product.
Get started with Customer.io & Stripe integration today
Customer.io & Stripe Challenges
What challenges are there when working with Customer.io & Stripe and how will using Tray.ai help?
Challenge
Keeping Customer.io Profiles Accurate as Stripe Data Changes
Stripe subscription data changes constantly. Plan upgrades, payment retries, trial conversions, and cancellations all alter a customer's billing state, and without automation, Customer.io attributes go stale fast. The result is wrong segments, mistimed campaigns, and customers receiving messages that have nothing to do with where they actually are.
How Tray.ai Can Help:
tray.ai listens for all relevant Stripe webhook events in real time and maps them directly to Customer.io attribute updates through a no-code workflow builder. Every billing state change in Stripe propagates to Customer.io within seconds, keeping every customer profile current and every campaign trigger accurate.
Challenge
Handling Stripe Webhook Reliability and Retries
Stripe webhooks can occasionally arrive out of order, show up twice, or fail to deliver during downtime. If your Customer.io campaign triggers depend on these webhooks without proper handling, you risk duplicate enrollments, missed triggers, or customers entering the wrong campaign.
How Tray.ai Can Help:
tray.ai includes built-in idempotency handling, retry logic, and error monitoring for webhook-based workflows. You can configure deduplication checks against Customer.io customer IDs and Stripe event IDs so that even if a webhook fires twice, the downstream Customer.io action executes only once.
Challenge
Mapping Stripe Plan and Price IDs to Meaningful Customer Segments
Stripe uses opaque price and product IDs that mean nothing in Customer.io. Without a translation layer, it's impossible to automatically segment customers by plan tier, billing frequency, or product line — so marketers end up maintaining manual lookup tables or filing developer requests every time a new plan launches.
How Tray.ai Can Help:
tray.ai's workflow builder lets you embed lookup tables and conditional logic that translate Stripe price IDs into human-readable plan names and tier labels before writing them to Customer.io. When new plans are added in Stripe, you update the mapping once in tray.ai and every downstream Customer.io segment updates automatically.
Challenge
Coordinating Multi-Step Campaigns With Real-Time Billing State
Dunning campaigns, trial conversion sequences, and win-back flows all need to adapt as Stripe billing state changes mid-campaign. A customer in a dunning sequence who pays should exit it immediately. A customer who resubscribes during a win-back flow should stop receiving re-engagement emails. Without automation, these suppressions require someone to step in manually.
How Tray.ai Can Help:
tray.ai workflows can listen for Stripe resolution events — such as invoice.payment_succeeded or customer.subscription.created — and immediately call the Customer.io API to suppress or remove a customer from an active campaign. Billing outcomes automatically govern messaging state, with no manual oversight required.
Challenge
Syncing Historical Stripe Data Into Customer.io for New Integrations
When teams first connect Stripe and Customer.io, they hit a backfill problem: existing Customer.io profiles have no subscription attributes, and existing Stripe customers have no corresponding enrichment. Any campaign relying on Stripe attributes will exclude your entire existing customer base until someone migrates the data.
How Tray.ai Can Help:
tray.ai supports both real-time webhook workflows and scheduled batch workflows. When setting up the integration for the first time, you can run a one-time bulk sync workflow that paginates through all Stripe customers, retrieves their active subscription and payment data, and upserts those attributes into matching Customer.io profiles — so your full customer base is enriched before you launch your first campaign.
Start using our pre-built Customer.io & Stripe templates today
Start from scratch or use one of our pre-built Customer.io & Stripe templates to quickly solve your most common use cases.
Customer.io & Stripe Templates
Find pre-built Customer.io & Stripe solutions for common use cases
Template
Stripe Failed Payment → Customer.io Dunning Sequence
This template listens for Stripe invoice payment failure webhooks, updates the corresponding customer profile in Customer.io with payment failure attributes, and triggers a multi-step dunning email and SMS campaign that escalates over time and self-cancels upon payment recovery.
Steps:
- Receive Stripe webhook for invoice.payment_failed event and parse customer ID, amount due, and next retry date
- Look up or create the customer record in Customer.io and update attributes including payment_failed, failed_amount, and retry_date
- Trigger the dunning campaign in Customer.io and set a conditional branch to exit the campaign when Stripe fires invoice.payment_succeeded
Connectors Used: Stripe, Customer.io
Template
Stripe Subscription Created → Customer.io Onboarding Enrollment
When a new Stripe subscription is created, this template syncs the subscription plan, billing interval, MRR, and trial end date to Customer.io and routes the customer into the correct onboarding campaign based on their plan tier.
Steps:
- Capture the customer.subscription.created event from Stripe and extract plan ID, amount, currency, and trial end date
- Upsert the customer profile in Customer.io with subscription_plan, mrr, billing_cycle, and trial_ends_at attributes
- Use a conditional logic step to enroll the customer in the matching plan-tier onboarding campaign in Customer.io
Connectors Used: Stripe, Customer.io
Template
Stripe Trial Ending Soon → Customer.io Conversion Campaign
This template runs on a daily schedule, queries Stripe for subscriptions with trials ending in the next 3 to 7 days, and ensures each customer in Customer.io is enrolled in a conversion sequence with a personalized trial countdown.
Steps:
- Run a scheduled workflow daily that queries the Stripe API for subscriptions where trial_end falls within the next 3 to 7 days
- For each matching subscription, update the Customer.io customer profile with trial_ends_in_days and plan_name attributes
- Check whether the customer is already enrolled in the conversion campaign and trigger enrollment if not, or update their countdown attribute if already active
Connectors Used: Stripe, Customer.io
Template
Stripe Subscription Cancelled → Customer.io Win-Back Campaign
This template captures Stripe cancellation events, updates Customer.io with cancellation data, calculates customer lifetime value, and enrolls the churned customer in a personalized win-back email sequence with suppression logic if they resubscribe.
Steps:
- Receive the customer.subscription.deleted webhook from Stripe and extract subscription tenure, plan, and total revenue data
- Update the Customer.io customer profile with subscription_status set to cancelled, cancelled_at date, and customer_ltv value
- Trigger the win-back campaign in Customer.io and register a parallel Stripe webhook listener to suppress the campaign automatically if a new subscription is created
Connectors Used: Stripe, Customer.io
Template
Stripe Plan Change → Customer.io Segment Update and Campaign Trigger
When a customer upgrades or downgrades their Stripe subscription, this template updates their Customer.io plan attributes, moves them into the correct segment, and triggers either an upgrade confirmation email or a downgrade re-engagement sequence.
Steps:
- Capture the customer.subscription.updated event from Stripe and compare the previous plan ID with the new plan ID to determine upgrade or downgrade direction
- Update the Customer.io customer profile with the new subscription_plan, mrr, and plan_changed_at attributes
- Branch the workflow: if upgrade, trigger the upgrade congratulations campaign; if downgrade, trigger the feature-education or re-engagement campaign
Connectors Used: Stripe, Customer.io
Template
Stripe One-Time Charge → Customer.io Transactional Receipt and Upsell
This template intercepts Stripe payment_intent.succeeded events for one-time charges and routes them into Customer.io to send a branded receipt email and launch a post-purchase upsell or cross-sell sequence based on the product purchased.
Steps:
- Receive the Stripe payment_intent.succeeded webhook and extract customer email, amount, currency, and product metadata
- Upsert the customer record in Customer.io and log the purchase event with product_name, amount_paid, and purchase_date as event properties
- Trigger a transactional receipt broadcast in Customer.io and enroll the customer in the matching post-purchase upsell campaign based on the product purchased
Connectors Used: Stripe, Customer.io