# Razorpay

Referral Rocket supports integrating with Razorpay, a payment gateway provider. With Razorpay integration easily track qualifying events and automatically track rewards. In addition to that, with RazorpayX, you can now send rewards as well.

**How does Razorpay Integration work?**

When you connect Razorpay to a campaign, Referral Rocket starts tracking for payments made by your customers. Referral Rocket listens to payment webhook events sent by Razorpay and finds the customer in the campaign. If the customer(using their email) is found, Referral Rocket marks their qualifying event as complete and finds the referrer. The referrer is then marked as eligible for a reward and would show up in the reward due table for you to take action.

**How to setup Razorpay integration?**

Follow these steps:

1. Go to Razorpay account -> Developers
2. Create a new webhook and add Referral Rocket URL. Copy the following URL `https://app.referralrocket.io/api/public/razorpay/webhook`
   1. Add a secret key.&#x20;
   2. &#x20;Select `Payment.Captured` as the active event. <br>

      <figure><img src="/files/SzLIJNO8vSpHSbwyEAqz" alt=""><figcaption></figcaption></figure>
3. Go to your campaign detail page and select the Integration tab. Find Razorpay and click on Connect<br>

   <figure><img src="/files/zz6O0nCE7UqW1EDAYLP8" alt=""><figcaption></figcaption></figure>
4. Copy your secret key from step 2.1. \
   ![](/files/RHlm0xSvVfWm4Xl7Gdaw)
5. Click submit on Referral Rocket and you are set.
6. If you wish to send rewards via Razorpay (payouts to users Bank), you can connect your RazorpayX account as well.
   1. Go to Razorpay-x account -> Setting

      1. Now go to Banking and get customer identifier

      <figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeirjaNWfPpVpKQ_vGYhT1hcn7JS-kcAhqnZIR3RYPTBbRpx-h15HGfQMOBdfNvn7XsAO594i42L9gpNJn_IAkT84XoJbieqJFS-S0N6vSOERw8BDPlVrWbe78_z3gl3b0QESKErw?key=ssc0WPIohx4IXmR-VAWpLKp5" alt=""><figcaption></figcaption></figure>

      2. Now go to Developer controls and click on generate key\
         ![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXetUvVAfxN4Ncnmjw1vLKKkHDLwiEAYtB3dkf6KzdmqDZHgEgRBNzGWNb_rucySaTswh0W_HH2EbYW1Nl_L275tDAM-cS8WqHorJDp52pTDQhABaWdcdkF3HdB25-oiNRBQM2-Lig?key=ssc0WPIohx4IXmR-VAWpLKp5)
      3. Enable the Razorpay-X to send rewards.

         1. Now Copy Razorpay-X customer identifier, API-KEY-ID and API-SECRET-KEY  from the above steps

         ![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXfmV2gscHb96l9LIKUf9PKGRb8E9V3WMlqhQC2lzmMfyd7ZATFmpUGZ0AwZe3X1EJu7KpVVj82lsKF687u-Tx5lh4ZTJ77lyVBP3pGTlijHz9NJwBrIQCBN-DKnD8hORq8KCH59WA?key=ssc0WPIohx4IXmR-VAWpLKp5)&#x20;

         <br>


---

# 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://referral-rocket.gitbook.io/docs/integrations/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.
