Skip to main content

Documentation Index

Fetch the complete documentation index at: https://revlytics.co/docs/llms.txt

Use this file to discover all available pages before exploring further.

Connect Stripe

1

Create a restricted API key

Go to Stripe Dashboard → API Keys and create a new restricted key with read-only access to:
  • Checkout Sessions
  • Payment Intents
  • Customers (optional, for enrichment)
Use a restricted key, not your secret key. Only grant the minimum permissions needed.
2

Paste the key in Revlytics

Go to Settings → Revenue Tracking in your Revlytics dashboard. Select Stripe from the provider dropdown and paste the restricted key.
3

Click Connect

Revlytics validates the key and starts syncing your revenue data.

Automatic checkout detection

The Revlytics tracking script automatically detects Stripe Checkout completions. When a customer completes a purchase and is redirected back to your site with a session_id parameter starting with cs_, a payment event is fired.

Stripe Checkout setup

Make sure your Checkout success URL includes the session ID:
const session = await stripe.checkout.sessions.create({
  // ... other options
  success_url: "https://yoursite.com/success?session_id={CHECKOUT_SESSION_ID}",
});
The {CHECKOUT_SESSION_ID} template variable is automatically replaced by Stripe with the actual session ID.

What’s tracked

DataSource
Payment amountStripe API
CurrencyStripe API
Customer emailStripe API (if connected)
Checkout session IDURL parameter
Traffic sourceRevlytics session data
Landing pageRevlytics session data
UTM parametersRevlytics session data
If you use Stripe Payment Links, add the client_reference_id parameter to include your site’s visitor ID for attribution:
https://buy.stripe.com/xxx?client_reference_id={visitor_id}

Subscriptions

Recurring subscription payments are tracked automatically when using Stripe Billing. Each renewal that triggers a checkout event is captured as a separate payment event.