How to build Razorpay payment dashboards in Metabase
Razorpay processes your payments across UPI, cards, netbanking, and wallets, and handles settlements, refunds, and subscriptions. Metabase is where you turn that into shared dashboards for volume, success rate, refunds, and settlement. Because Metabase reads from SQL databases, the reliable way to connect them is a small pipeline: sync Razorpay into a database or warehouse on a schedule, then point Metabase at it. This guide walks through that path end to end — including a free option with no paid connector.
How do you connect Razorpay to Metabase?
Metabase connects to SQL databases and warehouses — not to SaaS APIs directly, and there's no native Razorpay connector. So connecting Razorpay to Metabase means one thing: run a small pipeline that copies Razorpay data into a database on a schedule, then connect Metabase to that database. Once the data lands, the models, metrics, and SQL later in this guide all work.
The good news: this doesn't require a paid tool. Use a managed connector if you want zero maintenance, or a free, code-based sync you host yourself — both are covered in Build the pipeline below, and in more depth in our guide to building a data pipeline.
What can you analyze from Razorpay data in Metabase?
- Captured volume — gross processed volume and transaction count
- Payment success rate — captured ÷ attempted, by method
- Net revenue — what lands after Razorpay fees
- Refunds and disputes — leakage and chargeback pressure
- Settlements — timing and net amounts deposited
- Subscriptions and MRR — if you use Razorpay Subscriptions
Which Razorpay dashboards should you build in Metabase?
Volume & net revenue
Captured volume and what lands after fees.
- Captured volume and count by day (line)
- Net revenue after Razorpay fees (line)
- Gross vs. net by month (dual bar)
- Average transaction value (number)
Success & failures
How reliably payments go through.
- Payment success rate by day (line)
- Failures by error reason (bar)
- Success rate by method (UPI, cards, netbanking) (bar)
- Failures by bank/issuer (table)
Refunds, disputes & settlements
Leakage and cash landing in your account.
- Refund rate and refunded amount (number + line)
- Disputes/chargebacks by month (bar)
- Settlements and settlement timing (table)
- Fees as a share of volume (line)
Subscriptions & MRR
Recurring revenue from Razorpay Subscriptions.
- MRR and active subscriptions (number + trend)
- MRR movement: new, renewal, churn (waterfall)
- Revenue churn rate (line)
- Renewals due in the next 30 days (table)
How do you build the Razorpay → Metabase pipeline?
For dashboards that need history and reliability, land Razorpay data in a database first, then connect Metabase to that database.
Connector options
- Razorpay APIs (free, first-party) — Payments, Orders, Settlements, Refunds, and Subscriptions APIs into your own pipeline.
- Webhooks (free, events) — stream payment and settlement events into a table for near-real-time dashboards.
- Settlement reports (free, CSV) — periodic settlement and transaction reports for batch loads when an API pipeline is overkill.
Notes
- Land raw tables first, then build clean models on top.
- Razorpay timestamps are Unix epochs — convert with
to_timestamp()once in a model. - Amounts are in the smallest currency unit (paise) — divide in a model layer.
- Separate fees and refunds so net revenue is accurate.
Can you generate a Razorpay dashboard with AI?
Yes — and once Razorpay data is synced into a database, this is the fastest way to a strong first draft. First give an AI assistant a way to read your Metabase schema and create questions and dashboards, then paste the prompt below. It builds the dashboard from your database tables and tells the agent to skip metrics the schema can't support instead of faking them.
Two ways to let an assistant query and build in Metabase
Both connect to a Metabase instance that's already pointed at your synced database — the pipeline above moves the data; these just let the assistant read and write Metabase. Pick whichever fits your setup:
Metabase MCP
- Best for
- Chat clients (Claude, Cursor, Codex)
- Enable
- Admin → AI → MCP
- Endpoint
https://<your-metabase>/api/metabase-mcp- Auth
- OAuth handled by Metabase
Metabase CLI
- Best for
- Terminal agents, scripts, and CI
- Install
npm install -g @metabase/cli- Auth
- Browser OAuth (v62+) or an API key
- Docs
- @metabase/cli
Set up the Metabase MCP server
Enable it under Admin → AI → MCP, then point your client at the endpoint:
# Metabase built-in MCP (replace with your instance URL)
claude mcp add --transport http metabase https://your-metabase.example.com/api/metabase-mcp{
"mcpServers": {
"metabase": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://your-metabase.example.com/api/metabase-mcp"]
}
}
}Clients with native remote support can use a "url" field instead of the mcp-remote bridge. Confirm the current endpoint in the Metabase MCP docs.
Set up the Metabase CLI
Install it globally, then authenticate once (the binary is mb):
# Install the CLI (the binary is `mb`)
npm install -g @metabase/cli
# Authenticate once — opens your browser on Metabase v62+, or use an API key
mb auth login --url https://your-metabase.example.com
mb auth statusOn Metabase v62+ mb auth login opens your browser; older servers fall back to an API key. A terminal-based assistant can then inspect your schema (mb db schemas, mb table get --include fields) and create content (mb card create, mb dashboard create) against the synced tables.
Prompt: build the Razorpay Payments Overview dashboard
With MCP or the CLI connected, paste this into your assistant to generate the dashboard:
Create a polished Metabase dashboard for Razorpay payments analytics using the
available Razorpay tables in this database.
Goal: Help founders and finance leaders understand captured volume, net revenue,
payment success, refunds, disputes, settlements, and (if used) subscriptions/MRR
from Razorpay data.
First, inspect the schema and identify the available Razorpay tables. Do not
assume exact table names. Map the raw data into these analytical concepts where
possible: Payments, Orders, Settlements, Refunds, Disputes, Customers, and
Subscriptions.
Important:
- Build the dashboard from durable database/warehouse tables (Razorpay APIs or
settlement reports).
- Separate gross captured volume from net revenue (after Razorpay fees and tax).
- Compute payment success rate as captured ÷ attempted, and segment by method
(UPI, cards, netbanking, wallets).
- If Razorpay Subscriptions are used, compute MRR from active subscriptions.
- Report in INR (or your settlement currency); note the currency.
- Do not claim Metabase connects natively to Razorpay unless that is explicitly
true in this environment.
Dashboard title: Razorpay Payments Overview
Sections:
1. Executive summary (KPI cards): Captured volume; Net revenue; Success rate;
Refund rate; Dispute rate; Average transaction value.
2. Volume & net revenue: Volume by day; Gross vs. net; Average transaction
value.
3. Success & failures: Success rate; Failures by reason; Success by method.
4. Refunds, disputes & settlements: Refund rate; Disputes by month; Settlement
timing; Fees as a share of volume.
5. Subscriptions & MRR (if used): MRR movement; Active subscriptions; Revenue
churn.
Filters: Method, Currency, Order/product, Date range.
Before finalizing, create or recommend reusable Metabase models:
modeled_razorpay_payments, modeled_razorpay_settlements, and (if used)
modeled_razorpay_mrr.
Output: Build the dashboard if you have permission; otherwise provide the exact
questions, SQL, model definitions, and layout. Include caveats for any metric
that cannot be calculated from the available schema. Reconcile totals against
Razorpay Dashboard. Keep it practical, dense, and executive-readable. Avoid
vanity metrics.How should you model Razorpay data in Metabase?
Core tables
| Concept | Grain | Key columns |
|---|---|---|
payments | one row per payment | id, order_id, amount, fee, tax, status, method, created_at |
orders | one row per order | id, amount, amount_paid, status, created_at |
settlements | one row per settlement | id, amount, fees, tax, status, created_at |
refunds | one row per refund | id, payment_id, amount, status, created_at |
disputes | one row per dispute | id, payment_id, amount, status, created_at |
subscriptions | one row per subscription | id, customer_id, plan_id, status, current_end |
Modeling advice
- Build a
modeled_razorpay_paymentsview with gross, fee, and net per payment. - Define success rate on a consistent denominator (attempts vs. orders).
- Segment by
method— UPI, cards, and netbanking behave differently. - If you use Razorpay Subscriptions, build a monthly MRR model like any subscription tool.
- Reconcile modeled volume and settlements against Razorpay Dashboard.
Which Razorpay metrics should you track in Metabase?
| Metric | Definition | Notes |
|---|---|---|
| Captured volume | Sum of captured payment amounts. | Gross, before fees. |
| Payment success rate | Captured ÷ attempted payments. | Segment by method. |
| Net revenue | Captured − fees − tax − refunds. | What the business keeps. |
| Refund rate | Refunds ÷ captured payments. | By count or amount — label which. |
| Dispute rate | Disputes ÷ payments. | High rates risk penalties. |
| MRR | Active subscriptions' normalized monthly amount. | Only if Razorpay Subscriptions are used. |
What SQL powers Razorpay dashboards in Metabase?
These assume the modeled tables above (PostgreSQL dialect, amounts in paise, epoch timestamps). Adjust identifiers to match your schema.
Captured volume and how reliably payments go through.
SELECT
date_trunc('day', to_timestamp(created_at)) AS day,
COUNT(*) AS payments,
COUNT(*) FILTER (WHERE status = 'captured') AS captured,
ROUND(100.0 * COUNT(*) FILTER (WHERE status = 'captured')
/ NULLIF(COUNT(*), 0), 2) AS success_rate_pct,
ROUND(SUM(amount) FILTER (WHERE status = 'captured') / 100.0, 2)
AS captured_volume
FROM payments
WHERE to_timestamp(created_at) >= CURRENT_DATE - INTERVAL '30 days'
GROUP BY 1
ORDER BY 1;Compare UPI, cards, netbanking, and wallets.
SELECT
method,
COUNT(*) AS attempts,
ROUND(100.0 * COUNT(*) FILTER (WHERE status = 'captured')
/ NULLIF(COUNT(*), 0), 2) AS success_rate_pct
FROM payments
WHERE to_timestamp(created_at) >= CURRENT_DATE - INTERVAL '30 days'
GROUP BY method
ORDER BY attempts DESC;Net revenue is what lands after Razorpay fees.
SELECT
date_trunc('month', to_timestamp(created_at)) AS month,
ROUND(SUM(amount) / 100.0, 2) AS gross_volume,
ROUND(SUM(fee) / 100.0, 2) AS fees,
ROUND(SUM(amount - fee) / 100.0, 2) AS net_revenue
FROM payments
WHERE status = 'captured'
GROUP BY 1
ORDER BY 1;