# Razorpay

&#x20;Payment Gateway for India: Start Accepting Payments Instantly with *Razorpay's* Free Payment Gateway. Supports Netbanking, Credit, Debit Cards, UPI, etc.

**API** key is a combination of the `key_id` and `key_secret` and is required to make any API request to Razorpay. You also have to implement the API key in your code as part of your integration process.

1. Log into your [Dashboard](https://dashboard.razorpay.com/) with appropriate credentials.
2. Select the mode (**Test** or **Live**) for which you want to generate the API key&#x20;
3. Navigate to **Settings** → **API Keys** → **Generate Key** to generate the key for the selected mode.<br>

The `Key Id` and `Key Secret` appear in a pop-out window as shown below:

![](https://razorpay.com/docs/assets/images/generate-api-keys.gif)

**Note**:\
After generating the keys from the Dashboard, download and save them securely. If you do not remember your API Keys, you need to re-generate it from the Dashboard and replace it wherever required.

**Warning**:\
Do not share your API Key secret with anyone or on any public platforms. This can pose security threats for your Razorpay account.

Once generated, you will be able to see the Key Id, the date the key was created, and the expiry date for the API Key on screen.

![](https://razorpay.com/docs/assets/images/settings-4.png)

### [Regenerate API Keys🔗](https://razorpay.com/docs/payment-gateway/dashboard-guide/settings/api-keys/#regenerate-api-keys) <a href="#regenerate-api-keys" id="regenerate-api-keys"></a>

You also have the option to regenerate the key, if required.

**Two Factor Authentication**:\
To regenerate API keys, you must validate your identity via OTP sent to your registered mobile number. However, this step is skipped if you already performed OTP validation while logging into the Dashboard.\
If you have not set up two-factor authentication, you will be prompted to verify your mobile number before re-generating keys.

To regenerate API key:

1. Log in to the [Dashboard](https://dashboard.razorpay.com/).
2. Select the mode for which you want to generate the API key from the menu ribbon.
3. Navigate to **Settings** → **API Keys**.
4. Click **Regenerate Key**.

This gives you the option to de-activate the old key immediately or in 24 hours.

Watch the short animation below for more information.

![](https://razorpay.com/docs/assets/images/regenerate-api-keys.gif)

![Razorpay Setup](https://3944481674-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MS6WDxrpCHR85DR5XfW%2F-MYcnAEej7YOioqw-a02%2F-MYcxPylwjt68QcTtx7R%2Fimage.png?alt=media\&token=66fbd41e-5584-4fa7-a551-dc1a2210021f)

After collect Api secret key id & secret key set into **InfixLMS**


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://infixlms.gitbook.io/infixlms/payment-gateway-settings/razorpay.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
