Deferred revenue

Last updated:

|
Revenue analytics is in beta

Revenue analytics is currently works best for:

  1. Small to medium-sized companies
  2. Companies with subscription models (mostly SaaS)

If you process more than 20,000 transactions per month, or your revenue comes primarily from one-off payments rather than recurring subscriptions, revenue analytics may feel less useful, slower, or provide less insight than expected.

When using revenue data from your Data Warehouse (like Stripe), PostHog will automatically defer revenue recognition to match your accounting practices. This is particularly useful for subscription businesses that need to recognize revenue over time rather than all at once.

This implies that our dashboard will show future revenue if you filter by a date range including dates in the future, indicating all of the revenue that will be recognized in the future.

Note: Revenue deferring is automatically applied when using Stripe as your data source. You don't need to configure anything additional if you're already filling Stripe's period property on your invoice line items - PostHog handles the calculations based on the period information in your Stripe invoices.

How PostHog processes deferred revenue

This does NOT apply to revenue data from events since we don't support informing what period a revenue event belongs to. See below for more information.

For supported sources, when PostHog imports your revenue data, it automatically:

  1. Detects period information: Finds the relevant period property on your invoice line items
  2. Calculates deferral periods: Determines how many months/days the revenue should be spread across
  3. Distributes revenue: Splits the total amount evenly across the service period

For example, if you have an annual subscription where customers pay $1,200 upfront:

  • Without deferring: All $1,200 appears in the month of payment
  • With deferring: $100 appears in each of the 12 months of the subscription period

Revenue deferring for each revenue source

Revenue from event data

Revenue deferring is NOT applied to revenue data from events since we don't support informing what period a revenue event belongs to. You should manually apply revenue deferring to events on your own before sending them to PostHog.

Revenue from Stripe

PostHog's Stripe integration automatically handles revenue deferring based on the period property found in your Stripe invoice line items.

In Stripe, when you create a subscription or invoice, each line item can include a period object that defines the service period:

JSON
{
"line_items": [
{
"amount": 120000,
"currency": "usd",
"period": {
"start": 1640995200,
"end": 1672531200
}
}
]
}

The period object contains:

  • start: Unix timestamp when the service period begins
  • end: Unix timestamp when the service period ends

When deferring doesn't apply

Revenue deferring only applies when:

  • You're using Stripe as your data source
  • Your invoice line items include a period property
  • The period spans multiple billing cycles

For one-time purchases or monthly subscriptions, revenue is recognized immediately in the month of payment.

Questions? Ask Max AI.

It's easier than reading through 814 pages of documentation

Community questions

Was this page useful?

Next article

Managed views

Revenue analytics works by automatically transforming the data coming from your different revenue sources (Stripe or events) into a standardized set of managed views . These views are automatically created once you add a revenue source . These views are not exclusive to the revenue analytics dashboard: you can use them in other parts of PostHog where you'd be able to use views, more importantly the SQL editor . There are 5 sets of views. For event sources they're named in the format revenue…

Read next article