Skip to content

Paying customers and revenue by first-touch source or country

GET
/v1/revenue/by-source

Paying customers (paid in the period, or paying now) grouped by the first touch of the visitor they came from (referrer, utm_source, utm_campaign) or by country (the customer’s address in Stripe or Lemon Squeezy), with collected revenue and MRR per currency. A customer is traced to a visitor by nordva_visitor_id in the Stripe customer’s or subscription’s metadata (with Checkout, subscription_data.metadata; Checkout Session metadata is not read) or nv_vid in Lemon Squeezy checkout custom data (s.js adds it to checkout links; the store’s webhook brings it back), then their user id or email sent with identify, then their email on the waitlist; match says how many were traced and how. Untraced customers are “(unknown)”; traced ones whose first visit had no referring site are “(direct)”. Amounts are in the smallest currency unit, reported per currency, and never converted or added together. Every response includes sync (status, last_synced_at, livemode): backfilling means the first import is still running, revoked or error means the numbers are as of the last successful sync.

Auth: Secret key only. Free and Indie: referrer and country. Builder: all.

group_by
string
default: referrer
Allowed values: referrer utm_source utm_campaign country
period_days
integer
default: 30 >= 1 <= 730

Revenue by source

Error envelope. See error.code for the discriminator.

object
data
required
null
error
required
object
code
required
string
message
required
string
remediation
required
string
doc_url
string format: uri
param
string
request_id
string
meta
object
key
additional properties

Error envelope. See error.code for the discriminator.

object
data
required
null
error
required
object
code
required
string
message
required
string
remediation
required
string
doc_url
string format: uri
param
string
request_id
string
meta
object
key
additional properties

STRIPE_NOT_CONNECTED: connect Stripe or Lemon Squeezy in the dashboard first.

object
data
required
null
error
required
object
code
required
string
message
required
string
remediation
required
string
doc_url
string format: uri
param
string
request_id
string
meta
object
key
additional properties