agentsclimarketplace

Stripe revenue

Skill DojoCodingLabs/GTM-Engineering-Command-Center/skills/stripe-revenue

Stripe revenue intelligence — MRR tracking, cohort analysis, LTV calculation, churn diagnostics from Stripe APIFrom its SKILL.md

Install
npx -y skills add DojoCodingLabs/GTM-Engineering-Command-Center --skill stripe-revenue

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

6.1 KB, as published. Nobody here has run it

Stripe Revenue Intelligence

Extract, calculate, and analyze revenue metrics from the Stripe API. This skill covers MRR computation, cohort analysis, LTV calculation, and churn diagnostics for SaaS businesses.

Stripe API Fundamentals for Revenue

Key Objects

ObjectWhat It RepresentsKey Fields
CustomerA paying or trial userid, email, created, metadata
SubscriptionRecurring billing relationshipstatus, current_period_start/end, items, cancel_at
InvoiceA billing eventtotal, status, paid, period_start/end, subscription
PaymentIntentA payment attemptamount, status, created, customer
ChargeA completed paymentamount, paid, refunded, customer
PriceA pricing configurationunit_amount, recurring.interval, product
ProductWhat you sellname, metadata, active

Subscription Statuses

StatusMeaningCount as Active?
trialingIn free trial periodYes (for activation metrics)
activePaying and currentYes
past_duePayment failed, retryingYes (grace period)
unpaidAll retries failedNo
canceledUser cancelledNo
incompleteFirst payment failedNo
incomplete_expiredFirst payment expiredNo
pausedSubscription pausedNo

Authentication

STRIPE_SECRET_KEY=sk_live_XXXXXX     # Server-side only, never in frontend
STRIPE_PUBLISHABLE_KEY=pk_live_XXXXX # Safe for frontend
STRIPE_WEBHOOK_SECRET=whsec_XXXXXX   # For webhook signature verification

MRR Calculation

Basic MRR Formula

MRR = Sum of (subscription.items[].price.unit_amount * quantity)
      for all subscriptions where status in ['active', 'trialing', 'past_due']
      normalized to monthly

Normalization Rules

Billing IntervalNormalization
Monthlyamount as-is
Quarterlyamount / 3
Semi-annualamount / 6
Annualamount / 12
Weeklyamount * 4.33

MRR Components

New MRR:        MRR from customers who subscribed this month
Expansion MRR:  MRR increase from upgrades, add-ons, quantity increases
Contraction MRR: MRR decrease from downgrades, quantity decreases
Churned MRR:    MRR lost from cancelled subscriptions
Reactivation MRR: MRR from previously-churned customers who resubscribed

Net New MRR = New + Expansion + Reactivation - Contraction - Churned

Fetching Active Subscriptions

# List all active subscriptions (paginate with starting_after)
GET /v1/subscriptions?status=active&limit=100

# Include trialing and past_due for complete MRR picture
GET /v1/subscriptions?status=active&limit=100
GET /v1/subscriptions?status=trialing&limit=100
GET /v1/subscriptions?status=past_due&limit=100

MRR Calculation Algorithm

For each subscription:
  1. Sum all subscription items: item.price.unit_amount * item.quantity
  2. Normalize to monthly based on price.recurring.interval
  3. Apply any discount (subscription.discount or coupon)
  4. Add to running MRR total

Discount handling:
  - percent_off: MRR * (1 - percent_off / 100)
  - amount_off: MRR - (amount_off / interval_months)
  - Check coupon.duration: 'forever', 'once', 'repeating'

Key Revenue Metrics

MetricFormulaHealthy Range (SaaS)
MRR Growth Rate(MRR_now - MRR_prev) / MRR_prev10-20% MoM (early), 5-10% (growth)
Net Revenue Retention(MRR_start + expansion - contraction - churn) / MRR_start>100% (best-in-class >120%)
Gross Churn RateChurned MRR / Starting MRR<5% monthly, <3% ideal
ARPUTotal MRR / Active SubscribersTrending up = good
LTVARPU / Monthly Churn Rate>3x CAC minimum
LTV:CAC RatioLTV / CAC3:1 minimum, 5:1+ ideal
CAC Payback PeriodCAC / (ARPU * Gross Margin)<12 months
Quick Ratio(New + Expansion) / (Contraction + Churn)>4 = very healthy
Trial-to-Paid RatePaid conversions / Trial starts15-30%

Webhook Events for Real-Time Tracking

EventWhat HappenedAction
customer.subscription.createdNew subscription startedTrack new MRR
customer.subscription.updatedPlan change, quantity changeTrack expansion/contraction
customer.subscription.deletedSubscription cancelledTrack churned MRR
invoice.paidPayment succeededConfirm revenue
invoice.payment_failedPayment failedAlert, track at-risk MRR
customer.subscription.trial_will_endTrial ending in 3 daysTrigger conversion email
checkout.session.completedCheckout completedTrack new customer

Churn Analysis

Churn Types

TypeSignalIntervention
VoluntaryCustomer cancels via UI/supportExit survey, save offer, win-back sequence
InvoluntaryPayment fails, card expiresDunning emails, card update prompts, retry logic
DowngradeCustomer moves to cheaper planUnderstand why, improve value prop
Trial ChurnTrial expires without conversionBetter onboarding, trial extension offer

Involuntary Churn Prevention

Stripe's Smart Retries handle some of this, but supplement with:

  1. Pre-dunning: Email 7 days before card expires (use customer.source.expiring event)
  2. Failed payment: Email immediately with card update link
  3. Retry 1 (Day 1): Automatic Stripe retry
  4. Retry 2 (Day 3): Email "action required" with urgency
  5. Retry 3 (Day 5): Email "last chance" before service interruption
  6. Final (Day 7): Pause/cancel subscription, send win-back email

Environment Variables

STRIPE_SECRET_KEY=sk_live_XXXXXX          # For API calls
STRIPE_WEBHOOK_SECRET=whsec_XXXXXX        # For webhook verification
STRIPE_PUBLISHABLE_KEY=pk_live_XXXXXX     # For frontend (Checkout, Elements)

Keep looking

Skills are one crate of 627,801. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.