What Gets Synced
Payments:- Payment intent ID, amount, currency
- Customer email, customer ID
- Payment method, status
- Created date, payment timestamp
- Subscription ID, status, plan
- MRR (monthly recurring revenue)
- Customer email, customer ID
- Start date, current period, billing interval
- Subscription items and prices
- Customer ID, email, name, phone
- Created date
- Total lifetime value
payment_intent.succeeded- Payment completedinvoice.payment_succeeded- Subscription paymentcheckout.session.completed- Checkout completedcustomer.subscription.created- New subscriptioncustomer.subscription.updated- Subscription changedcustomer.subscription.deleted- Subscription cancelledcustomer.created- New customer
Setup
1. Connect Stripe Account
- Navigate to Settings → Integrations in DATALYR
- Click “Connect” next to Stripe
- You’ll be redirected to Stripe authorization page
- Select your Stripe account
- Click “Connect” to authorize DATALYR
- Grant read permissions for:
- Payments
- Subscriptions
- Customers
- Events
2. Create Restricted API Key
- Go to Stripe Dashboard → API Keys
- Click “Create restricted key”
- Name: Enter “DATALYR”
- Permissions: Select Read for Events (left column only)
- Connect Permissions: Leave all as “None” (right column)
- Click “Create key”
- Copy the key (starts with
rk_live_...) - Paste into DATALYR connection modal
3. Verify Integration
Test Payment:- Create a test payment in Stripe (use test mode)
- Go to DATALYR Dashboard → Event Stream
- Verify
payment_intent.succeededevent appears - Check that customer email matches
- Click on the payment event in Event Stream
- Verify attribution data (source, medium, campaign)
- Confirm customer journey is linked
Payment Attribution
DATALYR attributes payments to marketing sources using email matching:How It Works
Step 1: User Clicks AdEmail Matching
Requirements:- Stripe customer email must match visitor email
- Visitor must be tracked before payment (via tracking script)
- Payment must be within attribution window (default 30 days)
identify() immediately after user signup:
Subscription Tracking
DATALYR tracks subscription lifecycle and calculates MRR automatically.MRR Calculation
Monthly Subscriptions:Subscription Events
customer.subscription.created: Fired when new subscription starts.MRR Dashboard
DATALYR Dashboard shows:- Total MRR (monthly recurring revenue)
- ARR (annual recurring revenue = MRR × 12)
- New MRR (from new subscriptions)
- Churned MRR (from cancellations)
- Net MRR growth
- MRR by source/medium/campaign
- Date range
- Acquisition source
- Plan/product
- Customer segment
Payment Events
payment_intent.succeeded
Fired when one-time payment completes. Use Cases:- Course purchases
- One-time product sales
- Consultation bookings
- Donation payments
- If
checkout.session.completedhaspayment_intent, onlypayment_intent.succeededis counted - This prevents same purchase from appearing twice
invoice.payment_succeeded
Fired when subscription renewal payment succeeds. Use Cases:- Monthly subscription renewals
- Annual subscription renewals
- Usage-based billing
checkout.session.completed
Fired when Stripe Checkout session completes. Use Cases:- Checkout page conversions
- Embedded checkout tracking
payment_intent exists (to avoid double-counting with payment_intent.succeeded).
Customer Journey
DATALYR links Stripe customers to their complete journey from first touch to payment.Journey Example
Day 1: First Visit- First touch: Facebook ad (Day 1)
- Last touch: Google organic (Day 3)
- Conversion: $99/month subscription
- Attribution: Facebook (first-touch) or Google (last-touch)
Advanced Features
Baseline MRR Snapshot
On initial sync, DATALYR fetches ALL active subscriptions to establish MRR baseline: What’s Captured:- All active subscriptions (unlimited history)
- Current MRR per subscription
- Subscription start dates
- Customer attribution
- Accurate MRR reporting from day one
- Historical MRR trends
- Proper churn calculations
- Initial sync: Full snapshot
- Subsequent syncs: Incremental (new/updated subscriptions only)
Deduplication Logic
DATALYR prevents double-counting revenue: Scenario 1: Checkout + Payment IntentMulti-Currency Support
DATALYR handles payments in any currency:- Payments synced in original currency
- Dashboard shows currency breakdown
- Conversions sent to ad platforms in original currency
- Optional currency conversion for unified reporting
Test Mode Support
DATALYR syncs both live and test mode payments:- Live payments: Production revenue
- Test payments: For testing integration
- Filter by mode in dashboard
Troubleshooting
Payments Not Appearing
Check:- Integration is connected and active (Settings → Integrations)
- Stripe connection has valid API keys
- Payment is in live mode (not test mode, unless testing)
- Payment is within sync window (last 30 days for initial sync)
- Create test payment in Stripe test mode
- Check Event Stream within 1 minute (if webhook configured)
- Or wait up to 15 minutes (for API sync)
Payments Not Attributed
Verify:- Customer email in Stripe matches visitor email
- User was identified via
identify()before payment - Visitor was tracked before payment (check Event Stream)
- Attribution window not exceeded (default 30 days)
identify() immediately after signup:
MRR Showing Incorrect
Common Issues:- Multiple currencies: Filter by currency or enable conversion
- Test mode payments: Filter out test mode
- Cancelled subscriptions: Check if showing as negative MRR
- Check subscription status in Stripe Dashboard
- Confirm DATALYR shows same subscriptions
- Compare MRR totals
Duplicate Payments
Causes:- Webhook and API sync both creating events
- Stripe sending duplicate webhooks
- DATALYR automatically deduplicates by event ID
- Same payment_intent will never create duplicate events
- If seeing duplicates, contact support with event ID
Data Privacy
Customer Data:- Customer emails hashed before sending to ad platforms (SHA-256)
- GDPR compliant hashing
- No plaintext PII sent to Meta/Google/TikTok
- Payments retained indefinitely for reporting
- Subscriptions retained for MRR tracking
- Customers retained for attribution
- Opt-out respected across all platforms
- No data synced for opted-out users
- Data deletion on request
Next Steps
Shopify Integration
Connect Shopify for e-commerce tracking
Meta Ads Integration
Send conversions to Facebook and Instagram
Google Ads Integration
Track conversions in Google Ads
Conversion Rules
Configure custom conversion matching