Push every Stripe charge into Mixpanel in real time
When Stripe confirms a successful charge, send the revenue event to Mixpanel, bump the customer's lifetime value, and stamp their latest plan so analytics is always current.
Integrations
Stripe
Mixpanel
Type
Categories
- Product
- Operations
I want a Stripe-to-Mixpanel revenue pipe that runs every time a Stripe charge succeeds, so product analytics has clean revenue data without waiting for a nightly export. Build it as a code-based workflow with three deterministic steps.
Trigger: a Stripe webhook listening for the charge.succeeded event.
Step 1: call the Mixpanel Track Event operation to record an event named "Charge Succeeded". Use the Stripe customer ID as the distinct_id when present, otherwise fall back to the customer email. Event properties should include amount (converted from Stripe's smallest currency unit into a decimal, for example 2500 cents becomes 25.00), currency, plan (pulled from invoice or subscription metadata when available), and the Stripe charge ID. Pass the Stripe charge ID as Mixpanel's $insert_id so any webhook retries are idempotent and Mixpanel deduplicates them.
Step 2: call the Mixpanel Increment Profile Numerical Property operation on the same distinct_id to add the charge amount (decimal, same conversion as step 1) to a profile property called lifetime_value.
Step 3: call the Mixpanel Set Profile Properties operation on the same distinct_id, setting last_charged_at to the charge timestamp (ISO 8601), last_charge_amount to the decimal charge amount, and plan to the current plan name.
Every step is a fixed transformation with no branching or LLM judgment, so this should be a code workflow: Stripe webhook trigger followed by three Mixpanel nodes in sequence. If Stripe ever sends a charge.succeeded event for a charge whose customer cannot be resolved to either a customer ID or an email, log a warning and stop the run rather than sending events with no distinct_id.
What it does
- Catches every successful Stripe charge the moment it happens, with no nightly export wait.
- Records a Charge Succeeded event in Mixpanel with amount, currency, plan, and charge ID.
- Adds the charge amount to a lifetime value running total on the customer's Mixpanel profile.
- Stamps last charged at, last charge amount, and current plan so segments and funnels stay accurate.
What you’ll need
- A Stripe account where you can add a webhook for successful charges.
- A Mixpanel project with a service account and project token.
- A way to identify each Stripe customer in Mixpanel (Stripe customer ID, email, or a user ID you already store in Stripe metadata).
How to customize it
- Change the event name or which properties you send (coupon used, region, billing country, lead source).
- Switch how the customer is identified in Mixpanel: Stripe customer ID, email, or your own internal user ID from Stripe metadata.
- Add filters so only certain plans, amounts, or test versus live charges get tracked.
- Rename the profile fields if your team already uses different names for lifetime value or plan.
Use cases
- Data Sync
- Notifications & Alerts