Skip to main content
  1. Home
  2. Connectors
  3. Stripe - PostHog
Stripe PostHog

Send events from your Stripe-billed app to PostHog

Each event is resolved to a person against a 750M+ device graph before it reaches PostHog, so records and reporting reflect the person, not the device.

US device IDs in the graph
750M+
Match rate on events
90%+
Identity window, per customer
Lifetime
Most brands are live
<20 min

How it flows

How a Stripe event reaches PostHog. Sent from your app, resolved to a person, then forwarded.

01 Capture

Captured from Stripe

For apps that bill through Stripe, send payment and subscription events to Upstack with the Upstack Pixel and JavaScript SDK, resolved to a customer before they reach the tools you spend on.

See the Stripe integration
StripeWhat it sends
  • subscription_initial_purchaseyou fire it for the first subscription order
  • subscription_recurring_purchaseon invoice.paid for an existing subscription
  • payment_succeededmaps to invoice.paid or charge.succeeded
  • payment_refundedmaps to charge.refunded
  • amount / currencyamount in cents, with invoiceId and subscriptionId

02 Understand

Resolved to one person before it leaves

Every Stripe event is matched against a 750M+ device graph, so a phone browse and a desktop checkout resolve to one customer rather than two strangers.

How resolution works
Upstack DataResolved before it is sent
  • IdentityMatched against a 750M+ device graph, so a phone browse and a desktop checkout resolve to one customer.
  • customer_typeNew or returning, resolved before send.
  • DeduplicationOne person, one record, across devices and identifiers.
  • Bot and fraud filteringAutomated traffic never becomes a contact.

A CRM is only as trustworthy as its worst duplicate. These controls exist so the record reflects the person.

03 Activate

Delivered to PostHog

Stream resolved product and commerce events into PostHog for analysis on a person, not a session.

See the PostHog integration
PostHogWhat it receives
  • distinct_idthe person, across devices
  • event name and propertiesfunnels and retention
  • $set person propertiesuser-level attributes

Which events reach PostHog

Each Upstack event is mapped to the PostHog event below before it is sent.

Upstack eventSent to PostHog as
Page view$pageview
Product viewview_item
Add to cartadd_to_cart
Checkoutinitiate_checkout
Purchasepurchase

Each event carries Upstack’s resolved distinct_id, which persists across sessions, plus email when the visitor is identified, IP address, user agent and device details.

The catch

A Stripe charge has no session, campaign or referrer attached: it is the money and nothing else.

Loading it into a CRM without resolution produces accurate revenue with no attribution, which is the failure mode that looks fine until someone asks which channel paid for it.

Where to check in PostHogRecords you can audit

PostHog Activity

then check that a single person shows events from more than one device.

What changes

What changes when Stripe feeds PostHog. Two gains on the PostHog side, two on the Stripe side.

PostHog

Server-side delivery

Upstack always sends events to PostHog from its servers as well as through the PostHog snippet, so an event an ad blocker or browser privacy setting stops in the browser still arrives from the server.

PostHog

Identity-resolved events

Events sent to PostHog carry the resolved customer whenever Upstack can identify one, matched against a 750M+ device graph.

Stripe

Subscription purchases as events

Fire subscription_initial_purchase for the first order and subscription_recurring_purchase each time a renewal is paid, so first orders and renewals are reported separately.

Stripe

Payments and refunds

payment_succeeded, payment_failed and payment_refunded each map to a Stripe event (invoice.paid or charge.succeeded, invoice.payment_failed, charge.refunded), so money events reach Upstack when your app fires them.

Setup

Live in under 20 minutes.

You need your PostHog Project API Key from Project Settings and the data region, US or EU, where your project is hosted.

Upstack dashboardExample
PostHog Destination Healthy
Read the full PostHog setup guide
  1. 01

    Install the Upstack Pixel and SDK

    Add the Upstack Pixel to your app, then fire the subscription and payment events with the JavaScript SDK when Stripe reports them, such as subscription_recurring_purchase when invoice.paid fires for an existing subscription.

  2. 02

    Add the PostHog destination

    Under Destinations, add PostHog with your Project API Key, which starts with phc_, and the Data Region (US or EU) that matches where your PostHog project is hosted.

  3. 03

    Check Live Events in PostHog

    Visit your store, view a product or add to cart, and confirm the event appears in PostHog under Activity, Live Events.

FAQ

Questions about Stripe and PostHog.

How does Upstack identify users in PostHog?

Upstack assigns each visitor a consistent distinct_id that persists across sessions, devices and browsers when it can resolve the visitor’s identity. Anonymous visitors get a temporary ID that Upstack tries to merge once the visitor is identified.

Will I see duplicate events if I also have PostHog installed via another method?

Possibly. If PostHog’s JavaScript snippet or another integration sends the same events, you may see duplicates, so disable overlapping event types in either Upstack or the other integration.

Which events does PostHog receive?

PageView as $pageview, ViewContent as view_item, AddToCart as add_to_cart, InitiateCheckout as initiate_checkout and Purchase as purchase.

Which customer parameters are sent to PostHog?

Each event carries Upstack’s resolved distinct_id, which persists across sessions, plus email when the visitor is identified, IP address, user agent and device details.

How do I check that Stripe events are reaching PostHog?

Visit your store, view a product or add to cart, and confirm the event appears in PostHog under Activity, Live Events.

How long does it take to connect Stripe to PostHog?

Most brands are live in under 20 minutes. Once Stripe events reach Upstack, every destination receives the same resolved events, PostHog included.

Related connectors

See all 408 connectors

Get Stripe talking to PostHog.

A 15-minute walkthrough of this connector on your own account.

21-day free trial, no card. Month to month.