# Razorpay Tracking

Step 1 : **Configure Webhook on Sharkdom**

1. **Log in** to your Sharkdom Dashboard.
2. **Navigate** to:\
   `Settings > Integrations > Webhooks`
3. **Select** Razorpay from the list of supported integrations.
4. **Copy** the production webhook URL displayed in the dashboard.

## Step 2 **: Set Up the Webhook in Razorpay**

1. **Log in** to your Razorpay dashboard.
2. On the left sidebar, go to **"Settings"** and click **"Webhooks"** under **"Developers"**.
3. Click **“+ Add New Webhook”**.
4. In the **Webhook URL** field, paste the URL copied from your Sharkdom dashboard.
5. In the **Secret** field, enter a unique secret key (you will use this later to validate webhook payloads).
6. **Select events** you want Razorpay to send to Sharkdom ( `payment.captured`,`payment.authorize,payment.succeeded`).
7. Click **"Create Webhook"**.<br>

## Step 3 **: Test the Webhook**

1. Trigger a payment event in Razorpay ( test payment or subscription creation).
2. Verify that the webhook is received by Sharkdom and is logged in the **Webhook Activity** section.<br>

## Step 4 **: Payment Identification in Sharkdom**

1. Sharkdom identifies customers by matching the `customer_key` provided in Razorpay’s webhook payload.
2. Ensure you send the `customer_key` in the Razorpay **metadata** when creating payments.

## Step 5 **: Confirm Integration**

1. Ensure Sharkdom receives webhook events consistently.
2. Payments should now be tracked and attributed to partners on Sharkdom automatically.


---

# 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://help.sharkdom.com/tracking-your-payouts/razorpay-tracking.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.
