> For the complete documentation index, see [llms.txt](https://docs.quickreply.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.quickreply.ai/product-modules/integrations/available-integrations/cod-to-prepaid/razorpay.md).

# Razorpay

Razorpay is one of India’s leading payment gateways, offering robust APIs for online payments, subscriptions, and UPI-based collections. It supports a wide range of payment methods including cards, wallets, and BNPL.

<figure><img src="/files/uP0iKrkqcRs4AlRCQada" alt=""><figcaption></figcaption></figure>

**When you connect Razorpay with QuickReply you can:**

**Send Payment Links for COD Orders**\
Trigger WhatsApp messages containing prepaid Razorpay payment links for COD orders.

**Reduce RTO with Smart Nudges**\
Encourage users to pay in advance by offering limited-time discounts or free shipping on prepaid orders.

**Track Prepaid Conversions in Real-Time**\
Sync payment status instantly and trigger thank-you or drip flows once the order is converted.

To integrate Razorpay with QuickReply:

* Go to Integrations in your QuickReply dashboard
* Choose the software
* Click ‘Request Connection’
* Our team will take care of the rest

Now, you can enable COD-to-Prepaid Campaigns on WhatsApp. In this campaign, QuickReply.ai will send payment requests to end-user on WhatsApp and will incentivise them to prepay for their order now.\
\
To enable this payment collection via Razorpay, you need to do the following setup

1. Share Razorpay's API key & Secret with us over <support@quickreply.ai>
2. Setup the callback url in Razorpay

### Generate Razorpay API Keys

**Note**: If you have already have your Razorpay API key & secret with you, jump to section.

1. Log into your Dashboard with appropriate credentials.
2. Select the mode (Test or Live) for which you want to generate the API key. You can use Test keys for testing. But when you go live, share your live keys

Test Mode: The test mode is a simulation mode which you can use to test your integration flow. Your customers will not be able to make payments in this mode. But you will be able to simulate the end-to-end flow of payment via WhatsApp to order update in Shopify.

Live Mode: When your integration is complete, switch to the live mode and generate live mode API keys. Replace test mode keys with live mode keys in the integration to accept payments from customers.

3\. Navigate to Settings → API Keys → Generate Key to generate key for the selected mode.

4\. The Key Id and Key Secret appear on a pop-up page as shown below:

#### Live mode API keys <a href="#live_mode_api_keys" id="live_mode_api_keys"></a>

{% embed url="<https://youtu.be/30REpNtYSak>" %}

**Watch Out:** After generating the keys from the Dashboard, download and save them securely. You have to share these keys with us over <support@quickreply.ai>. If you do not remember your API Keys, you need to re-generate it from the Dashboard and replace it wherever required. In future also, if you regenerate your API keys, you will have to inform us again with the new keys so that we can do the corresponding update on our end.

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.

<figure><img src="/files/e71iUA89MNsXrzKeuEzR" alt=""><figcaption></figcaption></figure>

## 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 into the [Razorpay Dashboard](https://dashboard.razorpay.com/#/access/signin).
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.

<figure><img src="/files/tvzoLDgeECa7KDzDy8SK" alt=""><figcaption></figcaption></figure>

## Set up Callback URL <a href="#set_up_callback_url" id="set_up_callback_url"></a>

To set up webhooks:

1. Log into the Razorpay Dashboard and navigate to Settings → Webhooks.
2. Click the + Add New Webhook button.

<figure><img src="/files/mZGa7Tn7PsVhi259C67N" alt=""><figcaption></figcaption></figure>

In the Webhook Setup pop-up page:

1. Enter the URL as <https://app.quickreply.ai/api/razorpay/payment-authorized>
2. Enter the secret key that you have generated in above steps.

(If you have any previous generated secret key , You can use it here)

3\. In the Alert Email field, enter the email address <devs@quickreply.ai>

4\. Select the required events from the list of Active Events.

Payment Events

payment.authorized

5\. Click Create Webhook.

## Share the keys with QuickReply.ai Support <a href="#share_the_keys_with_quickreplyai_support" id="share_the_keys_with_quickreplyai_support"></a>

Once, you have setup the callback url and have the Razorpay's Key & Secret ready; kindly share that with <support@quickreply.ai> or with your Account Manager.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://docs.quickreply.ai/product-modules/integrations/available-integrations/cod-to-prepaid/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.
