> For the complete documentation index, see [llms.txt](https://referral-rocket.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://referral-rocket.gitbook.io/docs/integrations/razorpay.md).

# 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>
