This document explains how to configure and use the Razorpay Payment Gateway Addon within the KiviCare Clinic Management System. It is intended for administrators who want to accept secure online payments using Razorpay.
Overview
The Razorpay Payment Gateway Addon enables clinics to accept payments using Razorpay’s secure checkout.
It supports multiple payment methods, including:
- Credit Cards
- Debit Cards
- Net Banking
- UPI
- Wallets
The integration works by creating an Order in Razorpay, redirecting the patient to a secure checkout, and verifying the payment signature upon completion.
Prerequisites
Before configuring Razorpay, ensure the following requirements are met:
- KiviCare Razorpay Addon
- The Razorpay addon must be installed and activated.
- Razorpay Account
- A valid Razorpay account created at razorpay.com.
- Account Activation
- Your Razorpay account must be activated to accept payments.
Razorpay Configuration in KiviCare
Step 1: Navigate to Payment Settings
- Log in to the WordPress Admin Dashboard.
- Go to KiviCare > Settings > Payment Settings.
Step 2: Enable Razorpay Gateway
- Locate Razorpay in the list of available payment gateways.
- Toggle the Enable switch (Green).
- Click Manage (or the edit icon) to open Razorpay settings.
Step 3: Configure Razorpay Settings
Fill in the following fields:
- Enable Razorpay
Must be checked to activate Razorpay payments.
- Mode
Choose the operating environment:
- Sandbox (Test) – For testing payments
- Live – For real transactions
- Key ID
Enter your Razorpay Key ID (e.g., rzp_test_... or rzp_live_...).
- Key Secret
Enter your Razorpay Key Secret.
- Currency
Select the currency to accept payments in (Default: USD).
Step 4: Save Settings
Click the Save button to apply and store your Razorpay configuration.
How to Obtain Razorpay API Keys
Follow these steps to generate Razorpay API credentials:
- Log in to the Razorpay Dashboard.
- Navigate to Settings > API Keys.
Test Mode Keys
- Enable Test Mode using the toggle at the top.
- Click Generate Test Key.
- Copy the Key ID and Key Secret.
Live Mode Keys
- Switch to Live Mode.
- Click Generate Live Key.
- Copy the Key ID and Key Secret.
Important: Test keys only work in Sandbox mode, and Live keys only work in Live mode.
Payment Flow
- Patient books an appointment in KiviCare.
- Patient selects Razorpay as the payment method.
- KiviCare creates an Order using Razorpay’s
/orders API.
- Razorpay secure checkout is displayed to the patient.
- Patient completes the payment.
- KiviCare verifies the payment using:
razorpay_order_id
razorpay_payment_id
razorpay_signature
- Upon successful verification:
- Payment is captured (if not already captured).
- Appointment status is updated to Confirmed.
If payment fails or is cancelled, the appointment remains Cancelled.
Troubleshooting
Common Issues and Solutions
Payment Failed
- Verify the Key ID and Key Secret are correct.
- Ensure keys match the selected Mode (Test or Live).
- Confirm that your Razorpay account is active.
Signature Verification Failed
- This usually indicates an incorrect Key Secret.
- Re-check and re-save Razorpay credentials in KiviCare.
Currency Issues
- Ensure your Razorpay account supports the selected currency.
- For non-INR currencies, international payments must be enabled in Razorpay.
Razorpay Checkout Not Loading
Ensure your site is using HTTPS.
Best Practices
- Always test payments using Sandbox mode before switching to Live.
- Keep your Key Secret secure and confidential.
- Enable international payments if accepting non-INR currencies.
- Regularly monitor transactions from the Razorpay Dashboard.
Previous
No previous post