> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rabbitpay.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate Razorpay API Token

> Generate and manage Razorpay API keys for use with RabbitPay.

## Overview

RabbitPay requires **Razorpay API credentials** to securely communicate with your merchant Razorpay account. These credentials authorize RabbitPay to perform key operations on your behalf, including:

* Creating payments and orders
* Verifying payment signatures
* Processing refunds and captures
* Fetching transaction and settlement data

You can either use your **existing Razorpay API keys** or **regenerate a new pair** if you need to rotate credentials or have lost access to the previous secret.

<Note>
  Razorpay displays the **Key Secret only once** at the time of generation. Make sure to copy and store it in a secure location immediately.
</Note>

## Prerequisites

Before you begin, ensure you have the following:

* An **active Razorpay Business account**
* **Admin access** to the Razorpay Dashboard
* A **verified business website** linked to your Razorpay account

<Tip>
  If your business website is not yet verified, complete the KYC and website verification process in Razorpay before generating API keys.
</Tip>

## Step 1: Open Account Settings

Navigate to your Razorpay Dashboard and open the **Account & Settings** page.

**Navigation path:**

```text theme={null}
Razorpay Dashboard  →  Account & Settings
```

1. Log in to your [Razorpay Dashboard](https://dashboard.razorpay.com).
2. In the **left sidebar**, scroll to the bottom.
3. Click **Account & Settings**.

<Frame caption="Figure 1: Navigate to Account & Settings from the Razorpay Dashboard.">
  <img src="https://mintcdn.com/rabbit-pay/2mCIG6wasg3gxar7/images/razorpay/account-settings.png?fit=max&auto=format&n=2mCIG6wasg3gxar7&q=85&s=5a72ea5f4790af5398f6379463ee180f" alt="Razorpay Dashboard highlighting the Account & Settings option in the left sidebar" width="1595" height="807" data-path="images/razorpay/account-settings.png" />
</Frame>

## Step 2: Open the API Keys Section

On the **Account & Settings** page, locate the **Website and app settings** card in the middle column and click the **API keys** link.

<Frame caption="Figure 2: Click the API keys link under Website and app settings.">
  <img src="https://mintcdn.com/rabbit-pay/ikZ7F1K4JKoA1-O1/images/razorpay/api-keys-arrow.png?fit=max&auto=format&n=ikZ7F1K4JKoA1-O1&q=85&s=77642f615e887edde50dc7a72a4aca21" alt="Razorpay Account Settings page with a red arrow pointing to the API keys link under Website and app settings" width="1587" height="812" data-path="images/razorpay/api-keys-arrow.png" />
</Frame>

## Step 3: Access API Keys & Integration

Once you are inside the **API Keys & Integration** page, you will see the section that contains the credentials required to integrate Razorpay with RabbitPay.

* If API Keys have **already been generated**, you can continue using the existing **Key ID** and **Key Secret**.
* If you want to **rotate credentials** or have **lost access** to the previous secret, you can regenerate a new key pair using the **Regenerate Key** button.

<Frame caption="Figure 3: API Keys & Integration section showing the Regenerate Key option.">
  <img src="https://mintcdn.com/rabbit-pay/2mCIG6wasg3gxar7/images/razorpay/api-keys-integration.png?fit=max&auto=format&n=2mCIG6wasg3gxar7&q=85&s=69458bb4ecdabbdead4da1c36c823ac3" alt="Razorpay Account Settings page showing the API keys and integration section with the Regenerate Key button" width="1588" height="802" data-path="images/razorpay/api-keys-integration.png" />
</Frame>

<Note>
  Regenerating an API key will **immediately invalidate the previous Key Secret**. Any integrations still using the old credentials will stop working until they are updated.
</Note>

## Step 4: Generate or Retrieve API Keys

Follow the steps below to generate or retrieve your Razorpay API credentials:

1. Locate the **API Keys & Integration** section on the Account & Settings page.
2. If API Keys already exist, use the existing **Key ID**.
3. If a new key pair is required, click **Regenerate Key**.
4. Confirm the action in the popup that appears.
5. Copy the newly generated **Key ID**.
6. Copy the **Key Secret immediately** — Razorpay displays this value only once.

<Tip>
  Store both the **Key ID** and **Key Secret** in a password manager or secrets vault. You will paste them into the RabbitPay dashboard in the next step of the integration.
</Tip>

## Important Notes

<Note>
  **Security best practices for handling Razorpay API credentials:**

  * Store the **API Key** and **Secret** securely in an encrypted vault or environment variable.
  * **Never share the Key Secret publicly** — treat it like a password.
  * Do **not** expose API credentials in frontend applications, mobile apps, or public code repositories.
  * If the **Key Secret is lost**, generate a new key pair — it cannot be recovered.
  * Rotate your API keys periodically as part of your security hygiene.
</Note>

## Verification

Your setup is complete when all of the following are true:

* ✅ A Razorpay API Key has been generated successfully.
* ✅ The **Key ID** has been copied and stored securely.
* ✅ The **Key Secret** has been copied and stored securely.
* ✅ The credentials are ready to be configured inside the RabbitPay dashboard.

## Next Steps

With your Razorpay API credentials ready, continue the integration by configuring webhooks so RabbitPay can receive real-time payment events from Razorpay.

<Card title="Configure Razorpay Webhook" icon="webhook" href="/integrations/razorpay/configure-webhook">
  Set up the webhook endpoint and signing secret to receive Razorpay payment events in RabbitPay.
</Card>
