Connecting Stripe Billing to PostHog
Stripe Billing sits on top of Stripe payments, and the difference matters: a payment succeeding is not the same event as a subscription beginning, and most implementations wire the wrong one. PostHog can be self-hosted, which changes the calculus entirely: the data stays on infrastructure you control, and so does the responsibility for everything that goes wrong with it. The join between them succeeds or fails on one thing: whether the distinct_id reaches the Stripe subscription before the conversion happens, because PostHog can only match a conversion it can tie back to a click it recognizes.
Free30 minutesNo obligation
Specific to this pair
Stripe Billing subscription events on PostHog person profiles
Pass your logged-in user ID into Stripe Checkout as the client reference, and capture subscription started, invoice paid, plan changed and subscription cancelled from webhooks against that distinct_id, grouped by company if enabled. Identify anonymous buyers by email at the checkout button. Use warehouse-imported Stripe tables for reporting and captured events for funnels, not both.
PostHog is the one destination here where renewals, upgrades and churn are wanted as events, because the question is retention by cohort, not acquisition cost. The join is the distinct_id: pass your logged-in user ID into the Checkout session as the client reference, and have the webhook handler capture subscription started, invoice paid, plan changed and subscription cancelled against that same ID. Group the events by company if you have PostHog's group analytics on, since a B2B subscription belongs to an account.
Where it breaks is the anonymous visitor who buys before signing up. If the pricing page sends people to Checkout without an account, the Stripe customer has an email but no distinct_id, and the webhook creates a new person who never merges with the browsing history. Call identify with the email at the checkout button, or create the account first.
There are two ways to get Stripe into PostHog and they should not both write events. PostHog's data warehouse can import Stripe tables for querying; check the current source list in your project. That is fine for revenue analysis, but if you also capture webhook events, keep the warehouse tables for reporting and the events for funnels, or MRR gets counted twice.
Stripe Billing → PostHog · what breaks
Why this join usually fails — Stripe Billing → PostHog
- 01
The distinct_id never reaches Stripe Billing
Stripe Checkout takes the customer to a Stripe-hosted page, and trials mean the subscription and the first payment can be weeks apart.
- 02
Every renewal firing as a new conversion
The most common Stripe Billing error and the easiest to make, because payment success is the obvious webhook. It inflates conversion counts by exactly your retention rate, which makes long-lived customers look like a marketing achievement every month.
- 03
Self-hosting the analytics and the outage together
The advantage of owning the pipeline is that nothing blocks it. The cost is that when the ingestion instance fills its disk on a Saturday, the events are gone and nobody is paged. Hosted tools fail differently and more visibly.
- 04
Nothing reconciles afterwards
PostHog shows events in the activity view within moments. On a self-hosted instance, check the ingestion lag as well — events that are queued are not events that are lost, and the two need different responses.
Stripe Billing → PostHog · the fix
What working looks like — Stripe Billing → PostHog
The distinct_id on every subscription
Conversions arriving in PostHog
The event lands on the person profile and becomes available in insights, funnels and session replay.
Reconciled against the source
Stripe Billing → PostHog · architecture
How Stripe Billing and PostHog actually connect
- 1
Stripe Billing holds the truth
Every renewal produces a successful payment intent. Wire the conversion to payment success and a customer who stays two years generates twenty-four conversions against one acquisition.
- 2
PostHog needs a click to match
PostHog needs a distinct_id, an event name and its properties. Self-hosted instances additionally need the ingestion endpoint reachable and the project API key correct, which is a class of failure hosted tools do not have.
- 3
The identifier is the bridge
The distinct_id, captured at the visit and carried into the Stripe subscription.
- 4
The event source decides reliability
Send the first successful payment on a new subscription, not every invoice. Trial starts belong on a separate lower-value action.
- 5
Deduplication at the destination
PostHog deduplicates on the event UUID where supplied. Without one, a retried batch duplicates, and on a self-hosted instance there is no vendor support desk to notice it for you.
Stripe Billing → PostHog · normal or broken
Working vs. broken, side by side — Stripe Billing → PostHog
Normal, not a fault
The distinct_id present on the subscription
Sent from the Stripe subscription lifecycle webhooks
Deduplicated correctly
PostHog deduplicates on the event UUID where supplied. Without one, a retried batch duplicates, and on a self-hosted instance there is no vendor support desk to notice it for you.
Reconciles with the source
Actually broken
The distinct_id missing on most records
Stripe Checkout takes the customer to a Stripe-hosted page, and trials mean the subscription and the first payment can be weeks apart.
Sent from the browser
The most common Stripe Billing error and the easiest to make, because payment success is the obvious webhook. It inflates conversion counts by exactly your retention rate, which makes long-lived customers look like a marketing achievement every month.
Counted twice, or not at all
The advantage of owning the pipeline is that nothing blocks it. The cost is that when the ingestion instance fills its disk on a Saturday, the events are gone and nobody is paged. Hosted tools fail differently and more visibly.
Nobody has reconciled it
Stripe Billing → PostHog · diagnose
Diagnostic order — Stripe Billing → PostHog
- 01
Count subscriptions carrying the distinct_id
- 02
Follow one real conversion end to end
- 03
Compare monthly conversion count against new subscription count
If conversions exceed new subscriptions, renewals are being counted and the acquisition figure is wrong by that amount.
- 04
Check ingestion health and disk before debugging any missing event
On self-hosted instances the answer is infrastructure far more often than it is instrumentation.
- 05
Read the match rate, not the success message
PostHog shows events in the activity view within moments. On a self-hosted instance, check the ingestion lag as well — events that are queued are not events that are lost, and the two need different responses.
Stripe Billing → PostHog · prove
How it gets proven — Stripe Billing → PostHog
Source of truth
Stripe subscriptions by creation date, separated from the invoice payments that recur against them.
- The distinct_id confirmed present on a live subscription.
- Purchase events reconciled per transaction against your billing system, with ingestion lag checked over the same window.
- New subscriptions reconciled against imported conversions for a settled month, with renewals demonstrably excluded.
Stripe Billing → PostHog · free audit
What we check in the free audit
- Count subscriptions carrying the distinct_id
- Follow one real conversion end to end
- Compare monthly conversion count against new subscription count
- Check ingestion health and disk before debugging any missing event
- Read the match rate, not the success message
Checked against
Stripe subscriptions by creation date, separated from the invoice payments that recur against them.
Free30 minutesNo obligation
Stripe Billing → PostHog · when not to buy
When you don't need this — Stripe Billing → PostHog
- Measure identifier coverage yourself first — pull your last hundred subscriptions and count how many carry the distinct_id.
- If you take one-off payments and no subscriptions, the plain Stripe integration covers you and this adds nothing.
- If you have no reason to keep the data on your own infrastructure and no team to run it, the hosted product removes the only real downside of this one.
Stripe Billing → PostHog · what we deliver
What gets built — Stripe Billing → PostHog
Identifier capture into Stripe Billing
Capture on your own domain and pass the identifier into the Checkout session metadata, so it lands on the customer and survives to the first real charge.
Event source: the Stripe subscription lifecycle webhooks
Send the first successful payment on a new subscription, not every invoice. Trial starts belong on a separate lower-value action.
Dispatch to PostHog
The PostHog capture API, posted server-side from your backend to your own instance or to PostHog Cloud.
Reversals where they exist
Cancellations inside the first period reverse.
Written guarantee
95%+ tracking accuracy
Measured against Stripe subscriptions by creation date, separated from the invoice payments that recur against them.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Stripe Billing → PostHog questions, answered
Pass the PostHog distinct_id, normally your user ID, into the Checkout session as client_reference_id or metadata, and use it when capturing events from Stripe webhooks.
Yes, as an invoice-paid event separate from subscription started. Retention and expansion analysis needs renewals, unlike an ad platform.
Almost always because the distinct_id never reached the Stripe subscription. Stripe Checkout takes the customer to a Stripe-hosted page, and trials mean the subscription and the first payment can be weeks apart. Measure coverage before debugging the dispatch.
PostHog identifies by distinct_id with an alias call to merge anonymous and identified users. On a self-hosted instance you also control the ingestion endpoint, which means the identifier survives ad blockers that would kill a third-party pixel — one of the few genuine technical advantages available to a first-party setup.
The Stripe subscription lifecycle webhooks. Send the first successful payment on a new subscription, not every invoice. Trial starts belong on a separate lower-value action.
PostHog shows events in the activity view within moments. On a self-hosted instance, check the ingestion lag as well — events that are queued are not events that are lost, and the two need different responses.
More on Stripe Billing → PostHog
- Stripe → PostHogConnecting Stripe to PostHog
- Stripe Billing → Google AdsConnecting Stripe Billing to Google Ads
- Stripe Billing → MetaConnecting Stripe Billing to Meta Conversions API
RELATED GUIDES
Where Stripe Billing → PostHog fits in the rest of your tracking
- PayPal → PostHogConnecting PayPal to PostHog
- Stripe Billing → MatomoConnecting Stripe Billing to Matomo
- Stripe Billing → GA4Connecting Stripe Billing to GA4
- SubscriptionsConversion tracking for subscription businesses, across the whole lifecycle
- PayPal → MixpanelConnecting PayPal to Mixpanel
- Stripe → GA4Connecting Stripe to GA4
- PayPal → MatomoConnecting PayPal to Matomo
- Stripe → MixpanelConnecting Stripe to Mixpanel
Free · 30 min
Get Stripe Billing and PostHog joined properly
Free30 minutesNo obligation
