Razorpay × Metabase

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.

Heads up: Metabase connects to SQL databases and warehouses — it does not ship a native Razorpay connector. For dashboards that need history, sync Razorpay (via its APIs or settlement reports) into a database first.

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?

For: Founders, finance

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)
For: Finance, ops

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)
For: Finance, leadership

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)
For: Growth, RevOps

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.

No paid tool required. A fully free stack: a small dlt or hand-written script (extract) → a free Postgres database like Neon or Supabase (load) → a scheduler such as GitHub Actions cron (host) → Metabase (visualize). For hosting and scheduling details, see our data pipeline guide.

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:

ClaudeClaude Code CLI
# Metabase built-in MCP (replace with your instance URL)
claude mcp add --transport http metabase https://your-metabase.example.com/api/metabase-mcp
Cursor~/.cursor/mcp.json or .cursor/mcp.json
{
  "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 & authenticateshell
# 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 status

On 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:

Prompt for creating a Razorpay Payments Overview 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

ConceptGrainKey columns
paymentsone row per paymentid, order_id, amount, fee, tax, status, method, created_at
ordersone row per orderid, amount, amount_paid, status, created_at
settlementsone row per settlementid, amount, fees, tax, status, created_at
refundsone row per refundid, payment_id, amount, status, created_at
disputesone row per disputeid, payment_id, amount, status, created_at
subscriptionsone row per subscriptionid, customer_id, plan_id, status, current_end

Modeling advice

  • Build a modeled_razorpay_payments view 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?

MetricDefinitionNotes
Captured volumeSum of captured payment amounts.Gross, before fees.
Payment success rateCaptured ÷ attempted payments.Segment by method.
Net revenueCaptured − fees − tax − refunds.What the business keeps.
Refund rateRefunds ÷ captured payments.By count or amount — label which.
Dispute rateDisputes ÷ payments.High rates risk penalties.
MRRActive 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.

Daily volume and success ratePostgreSQL

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;
Success rate by methodPostgreSQL

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;
Gross vs. net revenue by monthPostgreSQL

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;

What are common mistakes when analyzing Razorpay in Metabase?

Running dashboards off a one-time CSV export.→ Schedule the sync so data stays fresh — a manual export goes stale the moment someone acts on it.
Reporting gross without fees and refunds.→ Subtract Razorpay fees and refunds to see the net the business keeps.
Ignoring payment method.→ UPI, cards, and netbanking have very different success rates — always segment by method.
Leaving amounts in paise or times in epoch.→ Divide amounts and convert timestamps once in a model layer.
Never reconciling with Razorpay Dashboard.→ Sanity-check modeled volume and settlements against Razorpay's own reports before trusting them.

Related analytics

Related metrics

Related integrations

FAQ

Does Metabase connect natively to Razorpay?
No. Metabase reads SQL databases and warehouses. Sync Razorpay into a database first (its APIs, webhooks, or settlement reports), then connect Metabase to that database.
How do I improve payment success rate?
Start by measuring it per method (UPI, cards, netbanking, wallets) and per issuer. Razorpay's failure reasons tell you where declines cluster — surface them in a table so you can act.
Can I track subscription MRR from Razorpay?
Yes, if you use Razorpay Subscriptions. Model active subscriptions and plan prices into a monthly MRR table, the same way you would for any subscription billing tool.