What the agent does
This is a job with no repository. The agent reads your account through the Stripe connection, Stripe's remote MCP server, which you connect once and the request names in connections. It works on the last full calendar month, in UTC unless the prompt names another time zone, and it fixes the start and end timestamps at the top of the report so every figure below covers the same window.
For volume it lists charges created in the month and keeps those that succeeded. Gross volume is their sum per currency; refunds are the refunds created in the month, which can belong to charges from earlier months, and the report says so; net revenue is gross minus refunds. Disputes and Stripe's fees are reported as separate lines when the connection exposes them, so the net figure is never quietly mixed with costs it does not include. Amounts stay in each charge's own currency, and totals are given per currency instead of converted at a guessed rate.
For recurring revenue it reads subscriptions and their items. A subscription's monthly recurring revenue is its price times quantity, normalised to a month (an annual price counts as one twelfth, a weekly one as its monthly equivalent), with discounts applied where the subscription carries one. New MRR is from subscriptions that started in the month, churned MRR from those whose canceled_at or ended_at falls in it, and net MRR change is the difference, plus upgrades and downgrades where an item's price changed in the month and Stripe's records show the earlier price. Trials that have not converted are counted apart, not as new MRR.
Then it ranks the ten customers with the most net revenue in the month, adds up each day's gross, refunds and net into revenue-by-day.csv, and writes revenue-report.md. Every figure comes from a lookup in this run, and the prompt keeps the run read only.
Start it with one API call
POST https://api.prix.dev/o/{org}/sessions with this body:
{
"agent": "claude",
"input": "Use the Stripe connection to read last calendar month (UTC) of charges, refunds and subscriptions. Write revenue-report.md with the exact time window, gross volume from succeeded charges, refunds created in the month, net revenue, new MRR, churned MRR, net MRR change, and the 10 customers with the most net revenue, all per currency without conversion. Normalise each subscription's price and quantity to a monthly amount, apply its discount, and count unconverted trials separately. List disputes as their own line if you can read them. Write revenue-by-day.csv with one row per day: date, currency, gross, refunds, net. Read only; change nothing in Stripe.",
"connections": [
"stripe"
]
}- Get an API key. In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
- Send the request. POST the body in request.json to https://api.prix.dev/o/{org}/sessions, with your repository as the resources URL. The run starts in its own cloud sandbox.
- Read what came back. Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.
What comes back
What comes back is two files on the session, revenue-report.md and revenue-by-day.csv, each with a download link valid for an hour. The report opens with the window it covers and a summary table per currency: gross volume, refunds, net revenue, new MRR, churned MRR and net MRR change. Below it are the top ten customers by net revenue, with their customer id and the share of the month's revenue each one is, and a short methods section that says how MRR was normalised and what was left out, such as unconverted trials or fees the connection could not read.
The CSV is ready for a spreadsheet or a chart: one row per day and currency, so a spike or a refund-heavy day is easy to find. The session's transcript keeps every Stripe lookup with its response, so a figure in the report can be traced to the records it came from.
Before the report goes to a board deck or an investor update, someone who owns the numbers checks it against Stripe's own reports for the same month. Small differences usually come from definitions: whether refunds are dated by refund or by the original charge, how a mid-month plan change is counted, and whether a one-off invoice belongs in revenue but not in MRR. The methods section says which choice the agent made for each, so the comparison is quick.
Run it on every first business day of the month
Month-end close is the obvious trigger. Have a scheduler on your server send this request on the first business day of each month with an Idempotency-Key built from the month, so a retried call does not start a second run and each month gets one report.
Set a webhook URL on the API key and Rush POSTs run.completed with the session_url when the run finishes. Your server downloads both files from the session's artifacts, stores the CSV with the earlier months and sends the report to the founders' or finance channel.
The use case this job follows, with its automation and trigger: Produce a report or file, no repo.
Why run it on Rush?
Without a BI tool, a monthly report means an export, a spreadsheet and the same formulas rebuilt every month, or a script with a Stripe secret key on someone's machine. On Rush the agent reads Stripe through a connection you approved once, inside its own sandbox, and the run gets only the connections it names.
The report comes with its proof: every lookup and response is in the run's record, and the methods section states each definition used, so the numbers can be audited rather than trusted. Separate Stripe accounts or business units can be reported at once, one run each, up to the key's concurrent run limit.
Frequently asked questions
Will this match the numbers in my Stripe dashboard?
It should be close, and the methods section explains any gap. Differences come from definitions, such as dating a refund by when it was issued or how a mid-month upgrade is counted, and the report states which rule it used for each.
How is MRR calculated?
From each active subscription's items: price times quantity, normalised to one month by the billing interval, with the subscription's discount applied. Unconverted trials and one-off invoices are kept out of MRR and reported on their own.
We charge in several currencies. Does it convert them?
No. Every total is given per currency, because a conversion needs an exchange rate and a date that the report would have to guess. If you want a single figure, name the rate source in the prompt and the agent adds a converted column beside the originals.
Can it change anything in Stripe?
The prompt makes the run read only, and the transcript shows each call it made. For a hard limit, connect Stripe's MCP server with a restricted key that has read permissions only, using "auth": {"mode": "bearer"} in POST /me/connections.