# Razorpay setup for PopMCP

A Razorpay API key pair, the Key Id starting rzp_live_ or rzp_test_ plus the matching Key Secret, which the Dashboard reveals only once.

- Auth: API credentials
- Setup time: 4 min
- API base URL: https://api.razorpay.com/v1
- Credentials screen: https://dashboard.razorpay.com/app/keys
- Provider docs: https://razorpay.com/docs/api/

## Approval required before this works

Razorpay only issues working live-mode API keys after its team verifies your KYC and business documents and moves the merchant account to Activated.

- Typical wait: Razorpay publishes no standard KYC turnaround. Its own setup docs state an account can be "activated within 8 business hours" if you take the onboarding-manager route; otherwise the account sits in under_review after KYC submission and merchants commonly report a few working days, longer whenever documents need clarification.
- Cost: Free (no activation fee; standard per-transaction pricing applies once live)
- Blocked until approved: Live mode is unavailable, so rzp_live_ keys cannot be generated and no real payment, order, payout, refund or settlement can be processed. Test keys never touch real money or real customer data.
- Works meanwhile: Test mode works the moment you sign up: rzp_test_ keys, the full Orders/Payments/Refunds/Subscriptions APIs, webhooks and checkout all behave normally against dummy cards and UPI handles.

## Before you begin

- A Razorpay merchant account. Live Mode keys also need the account activated through KYC
- Owner or Admin access, because API Keys sits under Account & Settings
- Verified website or app details on the account, which Razorpay requires before it will issue Live Mode keys
- One active key pair per mode per account. Regenerating replaces whatever is running in production today

## Get your credentials

### 1. Pick the mode before you generate anything

Sign in at dashboard.razorpay.com and set the switch in the top bar to Live Mode or Test Mode. Generate the key in the mode you want PopMCP to talk to.

Screen: https://dashboard.razorpay.com/app/dashboard

### 2. Open Account & Settings then API Keys

Click Account & Settings in the left navigation, then open API Keys under Website and app settings.

Screen: https://dashboard.razorpay.com/app/keys

### 3. Generate the key pair

Click Generate Key, then read the Key Id and Key Secret from the dialog that opens.

### 4. Save the secret before closing the dialog

Click Download Key Details, or copy both halves by hand. Close the dialog only after the secret is stored somewhere safe.

### 5. Paste both values into PopMCP

Open the Razorpay connector in PopMCP. Paste the `rzp_` value into Key ID and the secret into Key Secret, then click Connect.

## Fields PopMCP asks for

- Key ID (keyId) [required]: Razorpay Dashboard → Account & Settings → API Keys → Generate/Download. The Key ID starts with rzp_test_ (sandbox) or rzp_live_ (production). This is the account the MCP is locked to.
- Key Secret (keySecret) [required]: The Key Secret is shown only ONCE when you generate the key. Copy it then (regenerate if you lost it). It pairs with the Key ID for HTTP Basic auth. Stored encrypted; used server-side only.

## Verify

PopMCP shows the Razorpay connector as Connected and reports the mode it read from the Key Id prefix. Asking for recent payments or settlements returns rows from that Razorpay account.

## Troubleshooting

### 401 with "Authentication failed"

Cause: The Key Id and Key Secret came from different generations, or the pair was regenerated after you pasted it.

Fix: Generate a fresh pair and paste both halves from the same dialog. A Key Id never works with an older secret.

### The Key Secret is no longer visible on the Dashboard

Cause: Razorpay shows the secret once. After that only the Key Id is listed.

Fix: Regenerate the pair, then update every integration that used the old secret.

### The connection succeeds but live data is empty

Cause: The key was generated while the Dashboard was in Test Mode, so it only sees simulated transactions.

Fix: Switch to Live Mode, generate a Live key pair, and replace both values in PopMCP.

### Generate Key is blocked in Live Mode

Cause: The account has not finished activation, or the website and app details have not been verified.

Fix: Complete KYC and verify the website details under Account & Settings, or connect with Test Mode keys in the meantime.

### Payouts or subscription endpoints return 400 or 403

Cause: RazorpayX Payouts and Subscriptions are separate products that must be enabled on the account.

Fix: Enable the product under Account & Settings and retry with the same key pair.

---

Source: https://www.docs.popmcp.com/docs/integrations/razorpay/