Exports and reports
Download transactions, subscriptions, customers, payouts, balance and products as CSV, JSON or NDJSON, on demand or on a schedule.
Datasets
| Dataset | What's in it | Filters |
|---|---|---|
transactions | Every payment, web and App Store / Google Play, with fees, net and refunds. | dates, project, status, source |
subscriptions | Every subscription, web and App Store / Google Play, with its plan and MRR. | dates, project, status, source |
customers | Everyone who started a checkout, with what they've spent. | dates |
payouts | Money paid out to your bank. | dates, status |
balance | Every change to your balance: sales, refunds, disputes, payouts and fees. | dates |
products | Your catalog: one row per price. | project |
GET /v1/exports returns each dataset with its exact columns (and which are in the default set), filters and statuses. Treat that response as the source of truth.
Download an export
GET /v1/exports/:dataset returns the file itself, up to 50,000 rows. Add .csv, .json or .ndjson to the path, or pass format.
# November's transactions as CSV
curl "https://billing-sandbox-api.munimtech.com/v1/exports/transactions.csv?from=2026-11-01&to=2026-11-30" -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY" -o transactions.csv
# One project's active subscriptions as JSON, chosen columns
curl "https://billing-sandbox-api.munimtech.com/v1/exports/subscriptions.json?project_id=prj_…&status=active&columns=id,app_user_id,mrr" -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"
# Every dataset, its columns and filters
curl https://billing-sandbox-api.munimtech.com/v1/exports -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"const csv = await munim.exports.download('transactions', {
from: '2026-11-01',
to: '2026-11-30',
})
const json = await munim.exports.download('subscriptions', {
format: 'json',
project_id: 'prj_…',
status: 'active',
columns: ['id', 'app_user_id', 'mrr'],
})
const { datasets } = await munim.exports.list()formatstringcsv(default),jsonorndjson.fromstring- YYYY-MM-DD (UTC), an ISO time, or milliseconds. Inclusive.
tostring- YYYY-MM-DD (UTC, inclusive), an ISO time, or milliseconds.
project_idstring- prj_…
statusstring- Only rows with this status (the dataset lists which).
sourcestringweb,storeorall(transactions and subscriptions).columnsstring- Comma-separated column keys, in order. Default: the standard set.
Over 50,000 rows, the call fails with a message to narrow the dates or make a report.
Reports for big exports
A report builds the same file in the background, up to 250,000 rows, and keeps it for 7 days. It takes the same filters plus dataset (and columns as a list). When it’s ready, a report.ready event goes to your webhooks. Read-only keys can make reports.
curl https://billing-sandbox-api.munimtech.com/v1/reports \
-H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"dataset": "transactions", "format": "csv", "from": "2026-01-01", "to": "2026-11-30"}'
# Then poll until status is "ready"
curl https://billing-sandbox-api.munimtech.com/v1/reports/rpt_… -H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY"const report = await munim.reports.create({
dataset: 'transactions',
format: 'csv',
from: '2026-01-01',
to: '2026-11-30',
})
const ready = await munim.reports.waitUntilReady(report.id)
console.log(ready.download_url){
"id": "rpt_…",
"object": "report",
"dataset": "transactions",
"format": "csv",
"status": "ready",
"filters": { "from": 1767225600000, "to": 1796083200000, "project_id": null, "status": null, "source": null, "columns": null },
"rows": 18233,
"bytes": 4120334,
"truncated": false,
"error": null,
"download_url": "https://…",
"file_name": "transactions-2026-01-01-2026-11-30.csv",
"requested_by": "api",
"created_at": 1796428800000,
"ready_at": 1796428812000,
"expires_at": 1797033600000
}status is pending, ready, failed or expired. truncated: true means it hit the row limit; narrow the dates for the rest. Treat download_url like a password.
Scheduled exports
A schedule makes a report for the day, week or month that just ended and emails it. Up to 20 schedules, each with up to 10 email addresses.
curl https://billing-sandbox-api.munimtech.com/v1/report_schedules \
-H "Authorization: Bearer $MUNIM_BILLING_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Monthly close", "dataset": "balance", "frequency": "monthly",
"emails": ["[email protected]"]}'It takes the export filters plus frequency (daily, weekly or monthly), emails and name. List with GET /v1/report_schedules; remove with POST /v1/report_schedules/:id/delete.
Live CSV links
For Google Sheets, Excel and BI tools, make a secret CSV link in the dashboard under Exports. The tool refreshes it whenever it likes; Munim rebuilds it at most every 15 minutes. Revoke a link there when you no longer need it.