# Integrating Client Payment Gateway

**Steps to integrate the payment gateway:**

**a.** Visit the [Monetise Section ](https://client.conscent.in/client/dashboard/payment-gateway)on Conscent Dashboard

**b.** Navigate to the Payment Gateway tab.

<figure><img src="/files/pVk36SgEIjVDQ1slmoRX" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/YYJYNJoJPMOkeqxzpoCN" alt="" width="375"><figcaption></figcaption></figure>

**c.** Click on Add Gateway and enter your *Razorpay* credentials i.e. Key ID and Key Secret, and an alias name. Then Save and Continue

> **Note:** Key Secret will not be physically displayed on the dashboard for security reasons.

**d.** After saving, you'll need to enter the generated webhook URL and secret in your webhook section on the Razorpay dashboard.

### Domain Whitelisting and Razorpay Configuration Guide (For Production):

<mark style="color:orange;">**Step 1: Whitelist Your Domain**</mark>

To set up your domain for payments, start by creating a CNAME record pointing to the new payment gateway.

**Instructions:**

**1. Access DNS Management:**

* Log in to the control panel of your domain registrar or DNS hosting provider.

**2. Create a CNAME Record:**

* Host/Name/Alias: Enter payment (e.g., this will create payment.clientname.com).
* Type: CNAME
* Value/Points to: payment-v2.netlify.app

**3. Save Changes:**

* Confirm and save the new CNAME record.
* Note that DNS changes may take up to 24-48 hours to propagate.

<mark style="color:orange;">**Step 2: Configure Razorpay Settings**</mark>

Once the CNAME is active, update your Razorpay account to recognize your new subdomain.

**Instructions:**

1. **Log in to Razorpay Dashboard:**

* Go to [dashboard.razorpay.com](https://dashboard.razorpay.com/) and log in.

2. **Navigate to Account Settings:**

* Click your profile icon in the top-right corner.
* Select **“Account & Settings”** from the dropdown.

3. **Update Business Website Details:**

* In the “Business Website Details” section, update your domain to *<mark style="color:blue;">payment.clientname.com.</mark>*

4. **Save Changes:**

* Click “Save” or “Update” to apply your new settings.

<mark style="color:orange;">**Step 3: Configure Razorpay for One-Time and Recurring Transactions**</mark>

Enable and test payment modes for one-time and recurring transactions on your Razorpay account.

**Instructions:**

1. **Enable Payment Modes:**

* Go to “Settings” > “Payment Methods” on the Razorpay dashboard.
* Enable all relevant payment methods (Credit Card, Debit Card, Net Banking, etc.).

2. **Set Up Recurring Payments:**

* Under “Payments”, navigate to “Subscriptions” and click “Enable Recurring Payments.”
* Follow any on-screen instructions to complete the setup.

3. **Test Payment Flow:**

* Use Razorpay’s test mode to conduct test transactions for both one-time and recurring payments to ensure smooth functionality.


---

# 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://docs.conscent.ai/integrating-client-payment-gateway.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.
