> For the complete documentation index, see [llms.txt](https://help.sharkdom.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.sharkdom.com/tracking-your-payouts/razorpay-tracking.md).

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