Agent context
Stripe models
6 SQL models that turn the raw Stripe tables into the reports people ask about. Deploy them in Weld and your agent queries the definitions behind every number.
How the set is built
- 6Raw tables
- 1Staging
- 10Core
- 5Analytics
Staging cleans each raw table once, core holds the logic, and analytics is the table dashboards and agents read.
- Get all subscriptionsExtracts a comprehensive overview of Stripe subscriptions. This helps in understanding the status and duration of various subscriptions tied to different customers.1 raw table
- Get subscription plansPulls an exhaustive view of Stripe subscriptions, diving into associated items, the specifics of plans, discounts applied through coupons, and additional metrics like the amount discounted and subscription intervals.5 raw tables
- Normalize to monthly revenueThis SQL model fetches the monthly subscription amounts, converts them to EUR using average monthly forex rates, and provides insights into revenue streams in a standardized currency.6 raw tables
- Identify active subscriptions and sum revenueThis SQL model fetches the monthly revenue per subscription and applies discounts to provide a net monthly amount. It then identifies if a subscription is active or canceled based on the status.grain: customer x month a subscription started · 6 raw tables
- Create time series for each customerThis SQL model captures the monthly recurring revenue (MRR) trend for each customer, including the change in MRR, and provides a rank based on the MRR. It also considers the customer's subscription status and cancellation date.6 raw tables
- Summarize Monthly Recurring Revenue (MRR)This SQL model provides a comprehensive view of the Monthly Recurring Revenue (MRR) by categorizing the revenue into new MRR, contraction MRR, churn MRR, and expansion MRR. It also computes the net new MRR and total MRR over time.6 raw tables
- Weld or dbt
- The same SQL in both dialects. Sync the folder with GitHub Sync, or copy the dbt models into your project.
- Check before you rely on it
- Reconcile a month against Stripe's own reports first. Each model's notes say what the synced data can and can't support.
Connect Stripe.
Your agents start with context.
Sync Stripe to your warehouse, deploy these models, and query them from Claude, Cursor or ChatGPT over MCP. Free for 14 days, no credit card.