# Cashfree

Referral Rocket supports integrating with [Cashfree](https://www.cashfree.com) a payment gateway provider. With Cashfree integration easily track qualifying events and automatically track rewards.

**How does Cashfree Integration work?**

When you connect Cashfree to a campaign, Referral Rocket starts tracking for payments made by your customers. Referral Rocket listens to payment webhook events sent by Cashfree 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 Cashfree integration?**

Follow these steps:

1. Go to your campaign detail page and select the Integration tab. Find Cashfree and click on Connect<br>

   <figure><img src="https://346708387-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJpvWNOwMd3hfowlhBXaA%2Fuploads%2Fs10EwXd4QP6r3xqerswh%2FScreenshot%202024-06-18%20at%201.05.14%20PM.png?alt=media&#x26;token=4e2bddd0-62f0-42b4-8452-87c2c932940d" alt=""><figcaption></figcaption></figure>

2. Copy your secret key. You can find the secret key in your [Cashfree merchant dashboard](https://docs.cashfree.com/docs/api-keys#reset-api-keys).&#x20;
   1. Note - You can use your test secret key if you are testing Referral Rocket in a non prod environment. When you are ready, replace with prod secret key.&#x20;
   2. If an API secret key does not exist, you can create one. <br>

      <figure><img src="https://346708387-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJpvWNOwMd3hfowlhBXaA%2Fuploads%2FYLjrJamlXMlyow46oPpF%2FScreenshot%202024-06-18%20at%2012.55.21%20PM.png?alt=media&#x26;token=b8e84a7b-376a-47fb-8069-94c70caf7a17" alt=""><figcaption></figcaption></figure>

3. Enter the secret key from step 2 into Cashfree setup modal

   ![](https://346708387-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJpvWNOwMd3hfowlhBXaA%2Fuploads%2FRMy9A8mcHSYlrRp2vNnx%2FScreenshot%202024-12-30%20at%203.02.35%20PM.png?alt=media\&token=8c38ae58-64d2-48ac-ace5-dd7569bd106e)

4. Add Referral Rocket to your list of webhooks. Copy the following URL \ <mark style="color:orange;">`https://app.referralrocket.io/api/public/cashfree/webhook`</mark>

5. Go to the webhook section in Cashfree dashboard. <https://docs.cashfree.com/docs/configure-webhooks>
   1. Under Transactions, create a new Webhook

   2. Add the above URL in the modal

   3. Select version as "2022-09-01"

   4. Click on Test

   5. In the next step, select "Success payment" as the event to listen on<br>

      <figure><img src="https://346708387-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJpvWNOwMd3hfowlhBXaA%2Fuploads%2FnPn12koqSkWv6kf2uX0U%2FScreenshot%202024-06-18%20at%201.02.10%20PM.png?alt=media&#x26;token=fdd2ba88-88e2-4842-8251-0f2b7e9c998d" alt=""><figcaption></figcaption></figure>

   6. Click Save

   7. Click submit on Referral Rocket and you are set. <br>

      <figure><img src="https://346708387-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJpvWNOwMd3hfowlhBXaA%2Fuploads%2F6AMTSiyzsCktoNanpIPc%2FScreenshot%202024-06-18%20at%201.03.48%20PM.png?alt=media&#x26;token=918629b5-cadc-4692-b108-554d98e5ca32" alt=""><figcaption></figcaption></figure>

Your campaign is now connected to Cashfree.&#x20;


---

# 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/cashfree.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.
