{"id":2610,"date":"2026-01-24T09:46:34","date_gmt":"2026-01-24T09:46:34","guid":{"rendered":"https:\/\/documentation.iqonic.design\/kivicare-wordpress\/?p=2610"},"modified":"2026-05-06T10:49:04","modified_gmt":"2026-05-06T10:49:04","slug":"razorpay-payment-gateway","status":"publish","type":"post","link":"https:\/\/documentation.iqonic.design\/kivicare-wordpress\/kivicare-razorpay-addon\/documentation\/razorpay-payment-gateway\/","title":{"rendered":"Razorpay Payment Gateway"},"content":{"rendered":"<div class=\"nolwrap\">\n<p>This document explains how to configure and use the <strong>Razorpay Payment Gateway Addon<\/strong> within the <strong>KiviCare Clinic Management System<\/strong>. It is intended for administrators who want to accept secure online payments using Razorpay.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Overview<\/strong><\/h2>\n\n\n\n<p>The Razorpay Payment Gateway Addon enables clinics to accept payments using <strong>Razorpay\u2019s secure checkout<\/strong>.<\/p>\n\n\n\n<p>It supports multiple payment methods, including:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Credit Cards<\/li>\n\n\n\n<li>Debit Cards<\/li>\n\n\n\n<li>Net Banking<\/li>\n\n\n\n<li>UPI<\/li>\n\n\n\n<li>Wallets<\/li>\n<\/ul>\n\n\n\n<p>The integration works by creating an <strong>Order in Razorpay<\/strong>, redirecting the patient to a secure checkout, and verifying the payment signature upon completion.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Prerequisites<\/strong><\/h2>\n\n\n\n<p>Before configuring Razorpay, ensure the following requirements are met:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>KiviCare Razorpay Addon<\/strong>\n<ul class=\"wp-block-list\">\n<li>The Razorpay addon must be installed and activated.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Razorpay Account<\/strong>\n<ul class=\"wp-block-list\">\n<li>A valid Razorpay account created at razorpay.com.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Account Activation<\/strong>\n<ul class=\"wp-block-list\">\n<li>Your Razorpay account must be activated to accept payments.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Razorpay Configuration in KiviCare<\/strong><\/h2>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>Step 1: Navigate to Payment Settings<\/strong><\/h5>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Log in to the <strong>WordPress Admin Dashboard<\/strong>.<\/li>\n\n\n\n<li>Go to <strong>KiviCare &gt; Settings &gt; Payment Settings<\/strong>.<\/li>\n<\/ol>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>Step 2: Enable Razorpay Gateway<\/strong><\/h5>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Locate <strong>Razorpay<\/strong> in the list of available payment gateways.<\/li>\n\n\n\n<li>Toggle the <strong>Enable<\/strong> switch (Green).<\/li>\n\n\n\n<li>Click <strong>Manage<\/strong> (or the edit icon) to open Razorpay settings.<\/li>\n<\/ol>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>Step 3: Configure Razorpay Settings<\/strong><\/h5>\n\n\n\n<p>Fill in the following fields:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Enable Razorpay<\/strong><br>Must be checked to activate Razorpay payments.<\/li>\n\n\n\n<li><strong>Mode<\/strong><br>Choose the operating environment:\n<ul class=\"wp-block-list\">\n<li><strong>Sandbox (Test)<\/strong> \u2013 For testing payments<\/li>\n\n\n\n<li><strong>Live<\/strong> \u2013 For real transactions<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Key ID<\/strong><br>Enter your Razorpay <strong>Key ID<\/strong> (e.g., <code>rzp_test_...<\/code> or <code>rzp_live_...<\/code>).<\/li>\n\n\n\n<li><strong>Key Secret<\/strong><br>Enter your Razorpay <strong>Key Secret<\/strong>.<\/li>\n\n\n\n<li><strong>Currency<\/strong><br>Select the currency to accept payments in (Default: USD).<\/li>\n<\/ul>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>Step 4: Save Settings<\/strong><\/h5>\n\n\n\n<p>Click the <strong>Save<\/strong> button to apply and store your Razorpay configuration.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>How to Obtain Razorpay API Keys<\/strong><\/h2>\n\n\n\n<p>Follow these steps to generate Razorpay API credentials:<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li>Log in to the <strong>Razorpay Dashboard<\/strong>.<\/li>\n\n\n\n<li>Navigate to <strong>Settings &gt; API Keys<\/strong>.<\/li>\n<\/ol>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>Test Mode Keys<\/strong><\/h5>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Enable <strong>Test Mode<\/strong> using the toggle at the top.<\/li>\n\n\n\n<li>Click <strong>Generate Test Key<\/strong>.<\/li>\n\n\n\n<li>Copy the <strong>Key ID<\/strong> and <strong>Key Secret<\/strong>.<\/li>\n<\/ol>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>Live Mode Keys<\/strong><\/h5>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Switch to <strong>Live Mode<\/strong>.<\/li>\n\n\n\n<li>Click <strong>Generate Live Key<\/strong>.<\/li>\n\n\n\n<li>Copy the <strong>Key ID<\/strong> and <strong>Key Secret<\/strong>.<\/li>\n<\/ol>\n\n\n\n<p><strong>Important:<\/strong> Test keys only work in Sandbox mode, and Live keys only work in Live mode.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Payment Flow<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Patient books an appointment in KiviCare.<\/li>\n\n\n\n<li>Patient selects <strong>Razorpay<\/strong> as the payment method.<\/li>\n\n\n\n<li>KiviCare creates an <strong>Order<\/strong> using Razorpay\u2019s <code>\/orders<\/code> API.<\/li>\n\n\n\n<li>Razorpay secure checkout is displayed to the patient.<\/li>\n\n\n\n<li>Patient completes the payment.<\/li>\n\n\n\n<li>KiviCare verifies the payment using:\n<ul class=\"wp-block-list\">\n<li><code>razorpay_order_id<\/code><\/li>\n\n\n\n<li><code>razorpay_payment_id<\/code><\/li>\n\n\n\n<li><code>razorpay_signature<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Upon successful verification:\n<ul class=\"wp-block-list\">\n<li>Payment is captured (if not already captured).<\/li>\n\n\n\n<li>Appointment status is updated to <strong>Confirmed<\/strong>.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Razorpay Webhook &amp; Secret Key Configuration<\/strong><\/h2>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>1. Introduction<\/strong><\/h5>\n\n\n\n<p>The Razorpay Webhook integration allows KiviCare to receive real-time notifications from Razorpay regarding payment status. This ensures that appointment bookings are updated instantly, even if a patient closes their browser window before being redirected back to your website.<\/p>\n\n\n\n<p>The addition of the <strong>Webhook Secret Key<\/strong> provides an extra layer of security, ensuring that only authentic messages from Razorpay are processed by your clinic system.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>2. Configuration Guide<\/strong><\/h5>\n\n\n\n<h6 class=\"wp-block-heading\"><strong>Step 1: KiviCare Setup<\/strong><\/h6>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Log in to your WordPress Admin Dashboard.<\/li>\n\n\n\n<li>Navigate to\u00a0<strong>KiviCare Settings<\/strong>\u00a0\u2192\u00a0<strong>Payment Gateways<\/strong>\u00a0\u2192\u00a0<strong>Razorpay<\/strong>.<\/li>\n\n\n\n<li><strong>Webhook Secret<\/strong>: Create a secure password or string and enter it into the &#8220;Webhook Secret&#8221; field.\n<ul class=\"wp-block-list\">\n<li><em>Tip: Keep this secret handy as you will need to enter the exact same string in your Razorpay account.<\/em><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Webhook URL<\/strong>: You will see a unique URL generated in the settings. Copy this URL to your clipboard.<\/li>\n<\/ol>\n\n\n\n<h6 class=\"wp-block-heading\"><strong>Step 2: Razorpay Dashboard Setup<\/strong><\/h6>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Log in to your\u00a0<a href=\"https:\/\/dashboard.razorpay.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Razorpay Dashboard<\/a>.<\/li>\n\n\n\n<li>In the left sidebar, go to\u00a0<strong>Settings<\/strong>\u00a0\u2192\u00a0<strong>Webhooks<\/strong>.<\/li>\n\n\n\n<li>Click on the\u00a0<strong>+ Add New Webhook<\/strong>\u00a0button.<\/li>\n\n\n\n<li><strong>Webhook URL<\/strong>: Paste the URL you copied from your KiviCare settings.<\/li>\n\n\n\n<li><strong>Secret<\/strong>: Enter the exact same Webhook Secret string you created in Step 1.<\/li>\n\n\n\n<li><strong>Active Events<\/strong>: Under the &#8220;Select Events&#8221; section, check the boxes for:\n<ul class=\"wp-block-list\">\n<li><code>payment.captured<\/code><\/li>\n\n\n\n<li><code>payment.failed<\/code><\/li>\n\n\n\n<li><code>refund.created<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Click\u00a0<strong>Create Webhook<\/strong>\u00a0to save your settings.<\/li>\n<\/ol>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>3. Key Benefits &amp; Features<\/strong><\/h5>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>Automated Appointment Confirmation<\/strong><\/h5>\n\n\n\n<p>Once configured, KiviCare will automatically confirm appointments as soon as Razorpay captures the payment. This eliminates the need for manual status updates and prevents &#8220;pending&#8221; appointments caused by browser closure or network interruptions.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>Enhanced Security<\/strong><\/h5>\n\n\n\n<p>The Webhook Secret Key acts as a digital handshake. Every notification sent by Razorpay is signed using this secret. KiviCare verifies this signature before taking any action, preventing unauthorized or fraudulent payment confirmations.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>Real-Time Status Mapping<\/strong><\/h5>\n\n\n\n<p>The system automatically synchronizes the following states:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Successful Payment<\/strong>: Automatically marks the appointment as &#8220;Booked&#8221; .<\/li>\n\n\n\n<li><strong>Failed Payment<\/strong>: Automatically marks the appointment as &#8220;Cancelled&#8221;.<\/li>\n\n\n\n<li><strong>Refunds<\/strong>: Updates the internal payment logs if a refund is issued through the Razorpay dashboard.<\/li>\n<\/ul>\n\n\n\n<p>If payment fails or is cancelled, the appointment remains Cancelled.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Troubleshooting<\/strong><\/h2>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>Common Issues and Solutions<\/strong><\/h5>\n\n\n\n<h6 class=\"wp-block-heading\"><strong>Payment Failed<\/strong><\/h6>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Verify the <strong>Key ID<\/strong> and <strong>Key Secret<\/strong> are correct.<\/li>\n\n\n\n<li>Ensure keys match the selected <strong>Mode<\/strong> (Test or Live).<\/li>\n\n\n\n<li>Confirm that your Razorpay account is active.<\/li>\n<\/ul>\n\n\n\n<h6 class=\"wp-block-heading\"><strong>Signature Verification Failed<\/strong><\/h6>\n\n\n\n<ul class=\"wp-block-list\">\n<li>This usually indicates an incorrect <strong>Key Secret<\/strong>.<\/li>\n\n\n\n<li>Re-check and re-save Razorpay credentials in KiviCare.<\/li>\n<\/ul>\n\n\n\n<h6 class=\"wp-block-heading\"><strong>Currency Issues<\/strong><\/h6>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ensure your Razorpay account supports the selected currency.<\/li>\n\n\n\n<li>For non-INR currencies, international payments must be enabled in Razorpay.<\/li>\n<\/ul>\n\n\n\n<h6 class=\"wp-block-heading\"><strong>Razorpay Checkout Not Loading<\/strong><\/h6>\n\n\n\n<p>Ensure your site is using HTTPS.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Best Practices<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Always test payments using <strong>Sandbox mode<\/strong> before switching to Live.<\/li>\n\n\n\n<li>Keep your <strong>Key Secret<\/strong> secure and confidential.<\/li>\n\n\n\n<li>Enable international payments if accepting non-INR currencies.<\/li>\n\n\n\n<li>Regularly monitor transactions from the Razorpay Dashboard.<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>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\u2019s secure checkout. It supports multiple payment methods, including: The [&hellip;]<\/p>\n","protected":false},"author":12,"featured_media":0,"parent":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[66],"tags":[],"class_list":["post-2610","post","type-post","status-publish","format-standard","hentry","category-documentation-kivicare-razorpay-addon"],"featured_image_src":null,"author_info":{"display_name":"wordpressadminiq","author_link":"https:\/\/documentation.iqonic.design\/kivicare-wordpress\/author\/wordpressadminiq\/"},"_links":{"self":[{"href":"https:\/\/documentation.iqonic.design\/kivicare-wordpress\/wp-json\/wp\/v2\/posts\/2610","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/documentation.iqonic.design\/kivicare-wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/documentation.iqonic.design\/kivicare-wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/documentation.iqonic.design\/kivicare-wordpress\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/documentation.iqonic.design\/kivicare-wordpress\/wp-json\/wp\/v2\/comments?post=2610"}],"version-history":[{"count":4,"href":"https:\/\/documentation.iqonic.design\/kivicare-wordpress\/wp-json\/wp\/v2\/posts\/2610\/revisions"}],"predecessor-version":[{"id":3273,"href":"https:\/\/documentation.iqonic.design\/kivicare-wordpress\/wp-json\/wp\/v2\/posts\/2610\/revisions\/3273"}],"wp:attachment":[{"href":"https:\/\/documentation.iqonic.design\/kivicare-wordpress\/wp-json\/wp\/v2\/media?parent=2610"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/documentation.iqonic.design\/kivicare-wordpress\/wp-json\/wp\/v2\/categories?post=2610"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/documentation.iqonic.design\/kivicare-wordpress\/wp-json\/wp\/v2\/tags?post=2610"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}