{"id":1314,"date":"2026-07-07T11:24:55","date_gmt":"2026-07-07T11:24:55","guid":{"rendered":"https:\/\/easycommerce.dev\/docs\/?post_type=helpwp_doc&#038;p=1314"},"modified":"2026-07-07T11:26:53","modified_gmt":"2026-07-07T11:26:53","slug":"razorpay-payment-integration","status":"publish","type":"helpwp_doc","link":"https:\/\/easycommerce.dev\/docs\/addons\/razorpay-payment-integration\/","title":{"rendered":"Razorpay Payment Integration"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Integrating your Razorpay account into your ecommerce website is seamless with the EasyCommerce payment gateway addon. Razorpay lets your customers pay with credit and debit cards, UPI, net banking, and popular wallets through a secure checkout modal. Follow these simple steps for a smooth setup.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To learn more about addon activation, read this documentation on <a href=\"https:\/\/easycommerce.dev\/docs\/addons\/install-and-activate-addons\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>how to activate addons on EasyCommerce<\/strong><\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Navigate to Payment Settings<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Go to <strong>Store &gt; Settings &gt; Payment &gt; Methods<\/strong>.<\/li>\n\n\n\n<li>Select <strong>Razorpay<\/strong> as your payment gateway.<\/li>\n\n\n\n<li>Tap &#8216;<strong>Save Settings<\/strong>&#8216; to finalize the changes.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized has-custom-border\"><img loading=\"lazy\" decoding=\"async\" width=\"1263\" height=\"752\" src=\"https:\/\/easycommerce.dev\/docs\/wp-content\/uploads\/2026\/07\/enable-razorpay.png\" alt=\"\" class=\"has-border-color has-vivid-cyan-blue-border-color wp-image-1320\" style=\"border-width:4px;border-top-left-radius:8px;border-top-right-radius:8px;border-bottom-left-radius:8px;border-bottom-right-radius:8px;aspect-ratio:1.679532879917773;width:1112px;height:auto\" srcset=\"https:\/\/easycommerce.dev\/docs\/wp-content\/uploads\/2026\/07\/enable-razorpay.png 1263w, https:\/\/easycommerce.dev\/docs\/wp-content\/uploads\/2026\/07\/enable-razorpay-300x179.png 300w, https:\/\/easycommerce.dev\/docs\/wp-content\/uploads\/2026\/07\/enable-razorpay-1024x610.png 1024w, https:\/\/easycommerce.dev\/docs\/wp-content\/uploads\/2026\/07\/enable-razorpay-768x457.png 768w\" sizes=\"auto, (max-width: 1263px) 100vw, 1263px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Create an OAuth App in Razorpay<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Razorpay connects to EasyCommerce through OAuth 2.0. You need an OAuth app in your Razorpay Dashboard before you configure the addon.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Log in to your <a href=\"https:\/\/dashboard.razorpay.com\/#\/app\/oauth\"><strong>Razorpay Dashboard<\/strong><\/a> and open the <strong>OAuth Apps<\/strong> section.<\/li>\n\n\n\n<li>Create a new OAuth app.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"983\" height=\"635\" src=\"https:\/\/easycommerce.dev\/docs\/wp-content\/uploads\/2026\/07\/create-razorpay-app.png\" alt=\"\" class=\"wp-image-1321\" srcset=\"https:\/\/easycommerce.dev\/docs\/wp-content\/uploads\/2026\/07\/create-razorpay-app.png 983w, https:\/\/easycommerce.dev\/docs\/wp-content\/uploads\/2026\/07\/create-razorpay-app-300x194.png 300w, https:\/\/easycommerce.dev\/docs\/wp-content\/uploads\/2026\/07\/create-razorpay-app-768x496.png 768w\" sizes=\"auto, (max-width: 983px) 100vw, 983px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Copy the <strong>Client ID<\/strong> and <strong>Client Secret<\/strong>. You will need both in the next step.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full has-custom-border\"><img loading=\"lazy\" decoding=\"async\" width=\"930\" height=\"458\" src=\"https:\/\/easycommerce.dev\/docs\/wp-content\/uploads\/2026\/07\/copy-key.png\" alt=\"\" class=\"has-border-color wp-image-1322\" style=\"border-color:#0693e3;border-width:4px;border-top-left-radius:5px;border-top-right-radius:5px;border-bottom-left-radius:5px;border-bottom-right-radius:5px\" srcset=\"https:\/\/easycommerce.dev\/docs\/wp-content\/uploads\/2026\/07\/copy-key.png 930w, https:\/\/easycommerce.dev\/docs\/wp-content\/uploads\/2026\/07\/copy-key-300x148.png 300w, https:\/\/easycommerce.dev\/docs\/wp-content\/uploads\/2026\/07\/copy-key-768x378.png 768w\" sizes=\"auto, (max-width: 930px) 100vw, 930px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Configure Razorpay Settings<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Access the Razorpay addon settings tab beside the <strong>&#8216;Methods&#8217;<\/strong> tab.<\/li>\n\n\n\n<li>Enable the &#8216;<strong>Test Mode<\/strong>&#8216; (optional). Use your Razorpay test credentials while this is on.<\/li>\n\n\n\n<li>Configure the payment gateway settings with a name, logo, and default order status.<\/li>\n\n\n\n<li>Enter your <strong>OAuth Client ID<\/strong> and <strong>OAuth Client Secret<\/strong> from Step 2.<\/li>\n\n\n\n<li>Finally, tap &#8216;<strong>Save Settings<\/strong>&#8216; to store the changes.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full has-custom-border\"><img loading=\"lazy\" decoding=\"async\" width=\"1498\" height=\"1050\" src=\"https:\/\/easycommerce.dev\/docs\/wp-content\/uploads\/2026\/07\/easycommerce-payment-settings.webp\" alt=\"\" class=\"has-border-color wp-image-1319\" style=\"border-color:#0693e3;border-width:4px;border-top-left-radius:5px;border-top-right-radius:5px;border-bottom-left-radius:5px;border-bottom-right-radius:5px\" srcset=\"https:\/\/easycommerce.dev\/docs\/wp-content\/uploads\/2026\/07\/easycommerce-payment-settings.webp 1498w, https:\/\/easycommerce.dev\/docs\/wp-content\/uploads\/2026\/07\/easycommerce-payment-settings-300x210.webp 300w, https:\/\/easycommerce.dev\/docs\/wp-content\/uploads\/2026\/07\/easycommerce-payment-settings-1024x718.webp 1024w, https:\/\/easycommerce.dev\/docs\/wp-content\/uploads\/2026\/07\/easycommerce-payment-settings-768x538.webp 768w\" sizes=\"auto, (max-width: 1498px) 100vw, 1498px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: Connect Your Razorpay Account<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Copy the <strong>Redirect URL<\/strong> shown in the <strong>Connect Account<\/strong> section and add it to your Razorpay OAuth app settings.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"905\" height=\"528\" src=\"https:\/\/easycommerce.dev\/docs\/wp-content\/uploads\/2026\/07\/copy-redirect-url.png\" alt=\"\" class=\"wp-image-1323\" srcset=\"https:\/\/easycommerce.dev\/docs\/wp-content\/uploads\/2026\/07\/copy-redirect-url.png 905w, https:\/\/easycommerce.dev\/docs\/wp-content\/uploads\/2026\/07\/copy-redirect-url-300x175.png 300w, https:\/\/easycommerce.dev\/docs\/wp-content\/uploads\/2026\/07\/copy-redirect-url-768x448.png 768w\" sizes=\"auto, (max-width: 905px) 100vw, 905px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Tap &#8216;<strong>Connect Account<\/strong>&#8216;. You will be redirected to Razorpay to authorize the connection.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full has-custom-border\"><img loading=\"lazy\" decoding=\"async\" width=\"641\" height=\"659\" src=\"https:\/\/easycommerce.dev\/docs\/wp-content\/uploads\/2026\/07\/Razorpay-Authorize-Easy-Pay.png\" alt=\"\" class=\"has-border-color wp-image-1324\" style=\"border-color:#0693e3;border-width:4px;border-top-left-radius:5px;border-top-right-radius:5px;border-bottom-left-radius:5px;border-bottom-right-radius:5px\" srcset=\"https:\/\/easycommerce.dev\/docs\/wp-content\/uploads\/2026\/07\/Razorpay-Authorize-Easy-Pay.png 641w, https:\/\/easycommerce.dev\/docs\/wp-content\/uploads\/2026\/07\/Razorpay-Authorize-Easy-Pay-292x300.png 292w\" sizes=\"auto, (max-width: 641px) 100vw, 641px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Approve the request. You will return to your store with a &#8216;<strong>Connected to Razorpay<\/strong>&#8216; confirmation.<\/li>\n\n\n\n<li>Your access tokens are stored encrypted and refreshed automatically. Tap &#8216;<strong>Disconnect Account<\/strong>&#8216; anytime to revoke the connection.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full has-custom-border\"><img loading=\"lazy\" decoding=\"async\" width=\"858\" height=\"392\" src=\"https:\/\/easycommerce.dev\/docs\/wp-content\/uploads\/2026\/07\/connected-to-razorpay.png\" alt=\"\" class=\"has-border-color wp-image-1325\" style=\"border-color:#0693e3;border-width:4px;border-top-left-radius:5px;border-top-right-radius:5px;border-bottom-left-radius:5px;border-bottom-right-radius:5px\" srcset=\"https:\/\/easycommerce.dev\/docs\/wp-content\/uploads\/2026\/07\/connected-to-razorpay.png 858w, https:\/\/easycommerce.dev\/docs\/wp-content\/uploads\/2026\/07\/connected-to-razorpay-300x137.png 300w, https:\/\/easycommerce.dev\/docs\/wp-content\/uploads\/2026\/07\/connected-to-razorpay-768x351.png 768w\" sizes=\"auto, (max-width: 858px) 100vw, 858px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Step 5: Set Up the Webhook<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Webhooks keep your order statuses in sync with Razorpay in real time, even if a customer closes the browser before returning to your store.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Copy the <strong>OAuth Webhook URL<\/strong> from the addon settings.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full has-custom-border\"><img loading=\"lazy\" decoding=\"async\" width=\"810\" height=\"245\" src=\"https:\/\/easycommerce.dev\/docs\/wp-content\/uploads\/2026\/07\/oauth-webhook-url.png\" alt=\"\" class=\"has-border-color wp-image-1326\" style=\"border-color:#0693e3;border-width:4px;border-top-left-radius:5px;border-top-right-radius:5px;border-bottom-left-radius:5px;border-bottom-right-radius:5px\" srcset=\"https:\/\/easycommerce.dev\/docs\/wp-content\/uploads\/2026\/07\/oauth-webhook-url.png 810w, https:\/\/easycommerce.dev\/docs\/wp-content\/uploads\/2026\/07\/oauth-webhook-url-300x91.png 300w, https:\/\/easycommerce.dev\/docs\/wp-content\/uploads\/2026\/07\/oauth-webhook-url-768x232.png 768w\" sizes=\"auto, (max-width: 810px) 100vw, 810px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Go to the <strong><a href=\"https:\/\/dashboard.razorpay.com\/#\/app\/webhooks\" target=\"_blank\" rel=\"noreferrer noopener\">Webhooks section<\/a><\/strong> in your Razorpay Dashboard and add the URL as a new webhook.<\/li>\n\n\n\n<li>Enable these events: <strong>payment.captured<\/strong>, <strong>payment.failed<\/strong>, and <strong>refund.created<\/strong>.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full has-custom-border\"><img loading=\"lazy\" decoding=\"async\" width=\"843\" height=\"608\" src=\"https:\/\/easycommerce.dev\/docs\/wp-content\/uploads\/2026\/07\/razorpay-event-settings-e1783423236449.png\" alt=\"\" class=\"has-border-color wp-image-1328\" style=\"border-color:#0693e3;border-width:4px;border-top-left-radius:5px;border-top-right-radius:5px;border-bottom-left-radius:5px;border-bottom-right-radius:5px\" srcset=\"https:\/\/easycommerce.dev\/docs\/wp-content\/uploads\/2026\/07\/razorpay-event-settings-e1783423236449.png 843w, https:\/\/easycommerce.dev\/docs\/wp-content\/uploads\/2026\/07\/razorpay-event-settings-e1783423236449-300x216.png 300w, https:\/\/easycommerce.dev\/docs\/wp-content\/uploads\/2026\/07\/razorpay-event-settings-e1783423236449-768x554.png 768w\" sizes=\"auto, (max-width: 843px) 100vw, 843px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Copy the <strong>Webhook Secret<\/strong> from Razorpay and paste it into the <strong>OAuth Webhook Secret<\/strong> field in the addon settings.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full has-custom-border\"><img loading=\"lazy\" decoding=\"async\" width=\"751\" height=\"540\" src=\"https:\/\/easycommerce.dev\/docs\/wp-content\/uploads\/2026\/07\/oauth-secret-code.png\" alt=\"\" class=\"has-border-color wp-image-1329\" style=\"border-color:#0693e3;border-width:4px;border-top-left-radius:5px;border-top-right-radius:5px;border-bottom-left-radius:5px;border-bottom-right-radius:5px\" srcset=\"https:\/\/easycommerce.dev\/docs\/wp-content\/uploads\/2026\/07\/oauth-secret-code.png 751w, https:\/\/easycommerce.dev\/docs\/wp-content\/uploads\/2026\/07\/oauth-secret-code-300x216.png 300w\" sizes=\"auto, (max-width: 751px) 100vw, 751px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Tap &#8216;<strong>Save Settings<\/strong>&#8216; to store the changes.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Step 6: Test the Integration<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Keep &#8216;<strong>Test Mode<\/strong>&#8216; enabled and connect with your <strong><a href=\"https:\/\/razorpay.com\/docs\/payments\/payments\/test-card-details\/\" target=\"_blank\" rel=\"noreferrer noopener\">Razorpay test credentials<\/a><\/strong> to run end-to-end test transactions.<\/li>\n\n\n\n<li>Place a test order and confirm that the payment completes, the order status updates, and the transaction appears in your Razorpay Dashboard.<\/li>\n\n\n\n<li>Once testing is complete, disable Test Mode, reconnect with your live credentials, and start accepting payments.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">How Razorpay Payments Work on Your Store<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>At checkout, customers pick Razorpay and pay through Razorpay&#8217;s official checkout modal without leaving your store. Their name, email, and phone are pre-filled.<\/li>\n\n\n\n<li>Every payment is verified with an HMAC-SHA256 signature check before the order is marked successful. Failed or unverified payments are marked as failed automatically.<\/li>\n\n\n\n<li>You can issue full or partial refunds straight from your EasyCommerce order screen. The refund is processed through the Razorpay Refunds API and confirmed via webhook.<\/li>\n<\/ul>\n","protected":false},"author":6,"featured_media":0,"template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}}},"helpwp_product":[19],"helpwp_topic":[21],"class_list":["post-1314","helpwp_doc","type-helpwp_doc","status-publish","hentry","helpwp_topic-addons"],"_links":{"self":[{"href":"https:\/\/easycommerce.dev\/docs\/wp-json\/wp\/v2\/helpwp_doc\/1314","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/easycommerce.dev\/docs\/wp-json\/wp\/v2\/helpwp_doc"}],"about":[{"href":"https:\/\/easycommerce.dev\/docs\/wp-json\/wp\/v2\/types\/helpwp_doc"}],"author":[{"embeddable":true,"href":"https:\/\/easycommerce.dev\/docs\/wp-json\/wp\/v2\/users\/6"}],"wp:attachment":[{"href":"https:\/\/easycommerce.dev\/docs\/wp-json\/wp\/v2\/media?parent=1314"}],"wp:term":[{"taxonomy":"helpwp_product","embeddable":true,"href":"https:\/\/easycommerce.dev\/docs\/wp-json\/wp\/v2\/helpwp_product?post=1314"},{"taxonomy":"helpwp_topic","embeddable":true,"href":"https:\/\/easycommerce.dev\/docs\/wp-json\/wp\/v2\/helpwp_topic?post=1314"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}