Revenue Metrics
Track consolidated revenue across your Stripe accounts.
Setup
- Store your Stripe key:
~/.config/stripe/api_key - Edit the
ACCOUNTSdict inscripts/stripe-metrics.pywith your Stripe account IDs - Run metrics:
python3 {baseDir}/scripts/stripe-metrics.py --period today # today vs yesterday
python3 {baseDir}/scripts/stripe-metrics.py --period week # last 7d vs prior 7d
python3 {baseDir}/scripts/stripe-metrics.py --period month # last 30d vs prior 30d
python3 {baseDir}/scripts/stripe-metrics.py --period all # all time
Output is JSON: gross revenue, refunds, net revenue, transaction count, and period-over-period growth %.
Nightly Deep Dive Workflow
- Run
--period todayfor the daily snapshot (⚠️ use--period yesterdayif running at 3 AM) - Run
--period monthfor trend context - Update your daily review doc with final revenue numbers
- Write findings to
memory/YYYY-MM-DD.mdunder "## Revenue Review" - Propose next day's plan based on what's working
- Send the user a brief summary
Key Metrics to Track
- Daily net revenue — the scoreboard
- Per-account breakdown — which products are pulling weight
- Period growth % — accelerating or decelerating
- Transaction count — volume vs ticket size trends
Customization
Edit scripts/stripe-metrics.py to add your Stripe accounts:
ACCOUNTS = {
"my_product": "acct_XXXX",
"my_saas": "acct_YYYY",
}
The script reads your Stripe key from ~/.config/stripe/api_key.