# 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="https://380225236-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcoDfVWiJBvgTq8DbifIH%2Fuploads%2FYquA5x9ZxryUIwUUUxTY%2FScreenshot%202023-10-26%20at%2012.05.32%20PM.png?alt=media&#x26;token=044b0d06-3a7b-4bb0-aa75-d1922c8ed11f" alt=""><figcaption></figcaption></figure>

<figure><img src="https://380225236-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcoDfVWiJBvgTq8DbifIH%2Fuploads%2FN58up40uTBP23uXAwSCA%2FScreenshot%202023-10-26%20at%2012.05.16%20PM.png?alt=media&#x26;token=ba02c6c8-b446-477e-a7a3-8af78cd14bc0" 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.
