Pull Stripe revenue into ErdiKnows

A restricted key is enough. Erdi reads charges and customers and plots them as daily series under your events.

What arrives

Three series: revenue from succeeded charges, new customers, and new paying users. Revenue uses the currency Stripe already settled and carries the revenue role. New paying users carry the paying-users role (a flow of first succeeded charges) so acquisition cost can divide ad spend by them — never use that series as a stock of active customers. Active paying customers (active_payers) are derived hourly from subscribers once capture has started. The first pull covers the last 90 days and is marked as imported history on charts — renewals of customers who first paid before that window can look like new payers until cohort capture covers the day. This is a pull from the Stripe API, not a Stripe webhook — Erdi never receives payment events live.

The same sync also upserts cohort rows in subscribers (Stripe customer id as app_user_id, source stripe): converted_at from the first succeeded charge, cancelled_at from canceled subscriptions. No email or name is stored. Requires Subscriptions read on the restricted key for cancels; charges alone still write converts.

New customers vs new paying users

new_customers counts Stripe customer objects created that day. A customer row is often only a record — no card, no charge. It sits between signup and payment in the funnel and has no paying-users role.

new_paying_users counts a customer on the day of their first succeeded charge only. Later charges from the same customer do not increment it again. That series carries the paying-users role.

How it authenticates

A restricted key with read access to charges and customers, stored encrypted. A full secret key is the wrong thing to paste. Keys that start with rk_test_ only see Stripe test data — those charges land on *_sandbox metrics (same idea as RevenueCat sandbox) and never get evaluation roles or cohort rows. Use a live key for real numbers. Erdi never writes to Stripe.

What does not come

Subscriptions as a feed, disputes, payouts, and customer emails. Those stay in Stripe. Erdi only needs the daily revenue line next to what shipped.

Set it up under Settings → Sources in your project.

Get started with ErdiKnows