{"id":49265,"date":"2024-07-08T18:13:51","date_gmt":"2024-07-08T12:43:51","guid":{"rendered":"https:\/\/www.techjockey.com\/blog\/?p=49265"},"modified":"2025-09-11T16:52:09","modified_gmt":"2025-09-11T11:22:09","slug":"how-to-set-up-payment-gateway","status":"publish","type":"post","link":"https:\/\/www.techjockey.com\/blog\/how-to-set-up-payment-gateway","title":{"rendered":"How to Set Up Razorpay Payment Gateway?"},"content":{"rendered":"\n<p>Are you selling products or services online and wondering how to safely accept payments from your customers? This is where a payment gateway comes in. A payment gateway is like a bridge between your website and the bank that handles your customer&#8217;s payment. It makes sure that the transaction is secure and smooth.<\/p>\n\n\n\n<p>However, setting up a payment gateway can seem confusing and scary, you might be wondering, \u201cHow do I start?\u201d or \u201cWhat if I make a mistake?\u201d, especially if you\u2019re new to it.&nbsp; So, In this guide we\u2019ll walk you through the process step-by-step, using simple language and easy-to-follow instructions.<\/p>\n\n\n\n<p>By the end of this guide, you\u2019ll learn the steps to integrate it into your website, best practices to follow, and how to tackle common challenges.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-is-a-payment-gateway\"><span class=\"ez-toc-section\" id=\"what_is_a_payment_gateway\"><\/span>What is a Payment Gateway?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>A payment gateway is a special service that helps process online payments for your business. Think of it as a secure tunnel that takes your customer&#8217;s payment information and sends it to the bank for approval. Once the bank approves, the payment gateway sends the confirmation back to your website, completing the transaction.<\/p>\n\n\n\n<p class=\"has-background\" style=\"background-color:#ffecdb\"><strong><em>Suggested: <\/em><\/strong><em>Read out comprehensive guide on <a href=\"https:\/\/www.techjockey.com\/blog\/what-is-a-payment-gateway-and-how-does-it-work\"><strong>What is a Payment Gateway and How Does it Work?<\/strong><\/a><\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-to-setup-a-payment-gateway-a-general-guide\"><span class=\"ez-toc-section\" id=\"how_to_setup_a_payment_gateway_a_general_guide\"><\/span>How to setup a payment gateway: A general guide<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Here\u2019s a general guide to help you through the process:<\/p>\n\n\n\n<ol>\n<li><strong>Choose a Payment Gateway: <\/strong>Pick a service like Razorpay, PayU or Stripe to handle online payments. Look at their features and costs.<\/li>\n\n\n\n<li><strong>Sign Up: <\/strong>Create a merchant account by providing your business information and bank details.<\/li>\n\n\n\n<li><strong>Integrate the Gateway:<\/strong>\n<ol>\n<li><strong>API Integration:<\/strong> Follow the instructions given by your selected payment gateway&nbsp; to connect the payment service to your website or app.<\/li>\n\n\n\n<li><strong>Plugins: <\/strong>Use your selected payment gateway plugins if you\u2019re on platforms like Shopify or WooCommerce.<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li><strong>Set Up Payment Methods: <\/strong>Configure which types of payments you want to accept, like credit cards or digital wallets.<\/li>\n\n\n\n<li><strong>Test Payments:<\/strong> Use test environments to make sure payments work without using real money.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-by-step-guide-to-setting-up-a-razorpay-payment-gateway\"><span class=\"ez-toc-section\" id=\"strongstep-by-step_guide_to_setting_up_a_razorpay_payment_gatewaystrong\"><\/span><strong>Step-by-Step Guide to Setting Up a Razorpay Payment Gateway<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>For a better understanding of how to set up a payment gateway, let\u2019s use Razorpay as an example. Most payment gateways follow a similar process, so this will give you a good idea of what to expect.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-step-1-find-the-best-payment-gateway-provider\"><span class=\"ez-toc-section\" id=\"step_1_find_the_best_payment_gateway_provider\"><\/span>Step 1: Find the best payment gateway provider<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Though we have used Razorpay, the first step is to find the best payment gateway provider. You need to research and select a payment gateway provider that suits your business needs.<\/p>\n\n\n\n<p class=\"has-pale-cyan-blue-background-color has-background\"><strong>Suggested Read: <\/strong><em><a href=\"https:\/\/www.techjockey.com\/category\/payment-gateway\">Buyer\u2019s Guide on how to choose the best Payment Gateway Software<\/a> for your requirements.<\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-step-2-sign-up-process\"><span class=\"ez-toc-section\" id=\"step_2_sign_up_process\"><\/span>Step 2: Sign up Process<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Sign up for an account with your chosen payment gateway provider. Click on the Sign Up link, provide necessary business details and complete the registration process.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/docsz\/AD_4nXdaJP1bfU8Wtn757Saih1W6v7uARC77BM_HIxhIZJ2iPf63_IDRfFOWAhdljPCp5bqwHC80JOcMkZZVsYRF-NC6FV7dbNtGEmEO87ucnx1pgjVlHvDwEVC0SE_V5cY9yH0dXol0rgAmJcXb5BxPq0ec2sQm?key=rjhtC0u8zmQhp-WYNbDvNg\" alt=\"\"\/><\/figure><\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"h-step-3-fill-the-kyc-details\"><span class=\"ez-toc-section\" id=\"step_3_fill_the_kyc_details\"><\/span>Step 3: Fill the KYC Details<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Provide all the necessary KYC details like Contact details, Business details and Address details.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/docsz\/AD_4nXe6lwFrdZ0R_wAJ7pUALgo5JM-NRSD0Q0IXwL8-WAd_rshKy-S-KwRtlxZk6MXqcL1wfbPtjTWtxnO3jFRMQLUGuC_ehpDjUdehSMfY8FrYzhjOtVyLcuzbdmVMl7X7owaKUCqKjgiLWh2m0FP5vs-BRyiX?key=rjhtC0u8zmQhp-WYNbDvNg\" alt=\"KYC Form for payment Gateway\"\/><\/figure><\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"h-step-4-kyc-verification\"><span class=\"ez-toc-section\" id=\"step_4_kyc_verification\"><\/span>Step 4: KYC verification<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Now that you have updated the details for your KYC, it&#8217;s time to verify them. KYC verification is important in any payment gateway because it helps businesses to activate their account and get rid of any limitations the account might have. Submit the documents for the details you have provided such as ID proof, Address proof, Bank proof etc. Once submitted, your account will be activated within the given time.&nbsp;&nbsp;&nbsp;<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/docsz\/AD_4nXcJZ_ODpsHo5orEtVomFGUlLqhfa7l8D1PZGuzJQraAZ9E2tJcPxccBudL5JxqT5SMSPqkkaP3iV5K-ujjOcw7q8sM14Rl03CAh0WIxtWYvEn-GfZUvHAexAFDgQa9rFAW3N1i5K5C0T7ScVhgZZ-Iw4SSW?key=rjhtC0u8zmQhp-WYNbDvNg\" alt=\"Complete your KYC Form image\"\/><\/figure><\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"h-step-5-integrate-the-gateway-to-your-online-website\"><span class=\"ez-toc-section\" id=\"step_5_integrate_the_gateway_to_your_online_website\"><\/span>Step 5: Integrate the gateway to your online website<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The last step on setting up your payment gateway is to integrate the gateway to your online website so that you can start accepting payments from the customers. This process involves a couple of steps. Let\u2019s understand how you can integrate a payment gateway to your website:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-to-integrate-a-payment-gateway-with-your-website\"><span class=\"ez-toc-section\" id=\"how_to_integrate_a_payment_gateway_with_your_website\"><\/span>How to Integrate a Payment Gateway with Your Website?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>There are multiple ways to integrate a payment gateway to your online store. Let\u2019s take a look:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-integration-through-plugin-or-app\"><span class=\"ez-toc-section\" id=\"integration_through_plugin_or_app\"><\/span>Integration through Plugin or App<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>One of the easiest and most straightforward ways to integrate a payment gateway into your online store is through a plugin or app. This method allows you to directly install a payment gateway provider&#8217;s app on your website. For example, if you are using WordPress for your online store, follow these steps below:<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-step-1-login-to-your-wordpress-dashboard\">Step 1: Login to your WordPress dashboard<\/h4>\n\n\n\n<p>Login to your WordPress dashboard and click on the <strong>\u201cPlugin\u201d<\/strong> option on the bottom left corner, then click on the <strong>\u201cAdd New\u201d<\/strong> button.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/docsz\/AD_4nXe3AO4BO5SUS75DGlaIOXPm_Pca5bg0P5H_W9mW5ckyeJ__NUKj6kQI4rk1Ky-QBYD0PJMGRRYBUCUODLJjNwgk-uSW3BPmOWOj8Jf41qmEfguEBzgiU1FVU8KkYELWsmVwt0fppGoU34FyzYWJRDuWKCJr?key=rjhtC0u8zmQhp-WYNbDvNg\" alt=\"WordPress dashboard image\"\/><\/figure><\/div>\n\n\n<h4 class=\"wp-block-heading\" id=\"h-step-2-install-razorpay-plugin\">Step 2: Install Razorpay Plugin<\/h4>\n\n\n\n<p>On the top right corner, search for Razorpay (or the payment gateway platform you chose) and enter. You can see the Razorpay application on the screen. Click on the \u201cInstall Now\u201d option to install it. Once it&#8217;s done, hit the \u201cActivate\u201d button.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/docsz\/AD_4nXeC1WmwFPbunPCV7WnZvdDHcvAtTv2s4vAIsKHmFgWq_L4jcTup0gBBzx8f_IR07ZJ6QDtY7y2ohIy32Wg05DN8G7JtRqQ0T7gTXGwwrd-szGJzM3EGDRqGEAPD9RfzeYOOyDO-I0R4qYuCem1OTxhMN1I?key=rjhtC0u8zmQhp-WYNbDvNg\" alt=\"Image showing Razorpay plugin option on wordpress when we are searching razorpay on plugin search option\"\/><\/figure><\/div>\n\n\n<h4 class=\"wp-block-heading\" id=\"h-step-3-enable-razorpay-as-your-payment-gateway\">Step 3: Enable Razorpay as your payment gateway.<\/h4>\n\n\n\n<p>Once activated, go back and click on the <strong>Woocommerce <\/strong>option on your dashboard, visit the <strong>Payments <\/strong>section, <strong>Enable <\/strong>Razorpay as a payment method and click on <strong>Set Up<\/strong> your payment gateway.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/docsz\/AD_4nXdLQIsqDhE-_kUtoZeZwVEMborPxE5WB-0y2x9-0XppG1_FT3YudnbzpWnSjxmV0EYKfxJFm376XY40O3TXyeg24Kcn9-Ti9BL_yZj4w0xQlPoLACn_iMCwIxkLCeY0WwE9tpMZ0LmBhCUiz7-NTjzXr-U2?key=rjhtC0u8zmQhp-WYNbDvNg\" alt=\"image showing WooCommerce dashboard in WordPress for enabling the razorpay as payment gateway.\"\/><\/figure><\/div>\n\n\n<h4 class=\"wp-block-heading\" id=\"h-step-4-connect-your-razorpay-account-to-your-website\">Step 4: Connect your Razorpay account to your website<\/h4>\n\n\n\n<p>Now, to connect your Razorpay account to your website, you need the Key ID and Key Secret.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/docsz\/AD_4nXfjK0f_sb9WjtIgW8oNiQyVtvir4BvarIuyGIAqG_JZTpeonGwRhZUBYfSmYRiRoWr6Ua1RRNfqSb6CQnhk8aw7zQ9AzhJtf_F7kvF2ct6nEQGheCq4gh16HOIWyPNky202yZ-WtNDwJ7k7utByp_WeJE7l?key=rjhtC0u8zmQhp-WYNbDvNg\" alt=\"wordpress dashboard showing the key id section and Key Secret section on wordpress woocommerce section.\"\/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-step-5-generate-live-key-and-integrate-razorpay-payment-gateway\">Step 5: Generate Live Key and integrate Razorpay payment gateway<\/h4>\n\n\n\n<p>To get the Key ID and Secret Key, go to your Razorpay dashboard &gt; <strong>Settings, <\/strong>then click on <strong>API Keys<\/strong>, and then hit the <strong>Generate Live Key<\/strong> button<strong>. <\/strong>Once clicked, you will receive your unique&nbsp; Key ID and Secret Key. Copy those credentials and paste those details (as shown in the 4th Step) and save the changes. Your Razorpay payment gateway has been successfully integrated to your website.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/docsz\/AD_4nXeqAey-g9tmlcvuQ9iEyvLJ5SM2cR0J04ZGGDRF5vbBlrDj8Zz9VoCaX03tBeX8ofXsO3CYGpeT01kmNtk-RRYX6DPVxGuX_QyeSfniB9t_UTM6wifeZ9JUNw5UTBS2SuAlk4YYRYydDxgmPPLXJxuNhDit?key=rjhtC0u8zmQhp-WYNbDvNg\" alt=\"Generate Live Key and integrate Razorpay payment gateway option on razorpay dashboard\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-self-hosted-api-based-payment-gateways\"><span class=\"ez-toc-section\" id=\"self-hosted_api-based_payment_gateways\"><\/span>Self-hosted (API-based) Payment Gateways<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Self-hosted gateways allow you to handle transactions directly on your website using APIs provided by the payment gateway. To integrate Razorpay (or your favourite Payment Gateway) in a self\u2013hosted environment. Here are the steps to integrate Razorpay into your React app:<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-1-create-a-razorpay-account\">1. Create a Razorpay Account<\/h4>\n\n\n\n<ul>\n<li>Go to the Razorpay website and create an account.<\/li>\n\n\n\n<li>In the Razorpay Dashboard, go to the Settings tab and generate your API keys (as shown in above steps). Save these keys.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-2-set-up-your-server\">2. Set Up Your Server<\/h4>\n\n\n\n<ul>\n<li>Create a new folder on your computer for your project and open it in your terminal.<\/li>\n\n\n\n<li>Initialize npm in your folder by running <strong><em>`npm init`.<\/em><\/strong><\/li>\n\n\n\n<li>Install the required packages by running:<strong><em> `npm install express razorpay dotenv crypto mongoose`.<\/em><\/strong><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-3-create-your-server-file\">3. Create Your Server File<\/h4>\n\n\n\n<ul>\n<li>Create a file named <strong><em>`server.js`<\/em><\/strong> in your project folder.<\/li>\n\n\n\n<li>Add the following code to <strong><em>`server.js`<\/em><\/strong> to set up your Express server:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>```javascript\n\nconst express = require(\"express\");\n\nconst app = express();\n\nconst port = process.env.PORT || 5000;\n\napp.use(express.json({ extended: false }));\n\napp.listen(port, () =&gt; console.log(`Server started on port ${port}`));\n\n```<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-4-save-your-api-keys\">4. Save Your API Keys<\/h4>\n\n\n\n<ul>\n<li>Create a file named <strong><em>`.env`<\/em><\/strong> in your project folder.<\/li>\n\n\n\n<li>Add your API keys to the <strong><em>`.env`<\/em><\/strong> file like this:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>```plaintext\n\nRAZORPAY_SECRET=&lt;your razorpay secret&gt;\n\nRAZORPAY_KEY_ID=&lt;your razorpay key id&gt;\n\n```<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-5-add-route-for-creating-orders\">5. Add Route for Creating Orders<\/h4>\n\n\n\n<ul>\n<li>Create a folder named <strong><em>`routes`<\/em><\/strong> in your project folder.<\/li>\n\n\n\n<li>Inside the <strong><em>`routes`<\/em><\/strong> folder, create a file named <strong><em>`payment.js`<\/em><\/strong>.<\/li>\n\n\n\n<li>Add the following code to <strong><em>`payment.js`<\/em><\/strong>:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>```javascript\n\nrequire(\"dotenv\").config();\n\nconst express = require(\"express\");\n\nconst Razorpay = require(\"razorpay\");\n\nconst router = express.Router();\n\nrouter.post(\"\/orders\", async (req, res) =&gt; {\n\n&nbsp;&nbsp;&nbsp;&nbsp;try {\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;const instance = new Razorpay({\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;key_id: process.env.RAZORPAY_KEY_ID,\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;key_secret: process.env.RAZORPAY_SECRET,\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;const options = {\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;amount: 50000, \/\/ amount in smallest currency unit\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;currency: \"INR\",\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;receipt: \"receipt_order_74394\",\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;};\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;const order = await instance.orders.create(options);\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (!order) return res.status(500).send(\"Some error occurred\");\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;res.json(order);\n\n&nbsp;&nbsp;&nbsp;&nbsp;} catch (error) {\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;res.status(500).send(error);\n\n&nbsp;&nbsp;&nbsp;&nbsp;}\n\n});\n\nmodule.exports = router;\n\n```<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-6-import-the-route-in-server-js\">6. Import the Route in `server.js`<\/h4>\n\n\n\n<p>Update your `server.js` file to include the new route:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>```javascript\n\nconst express = require(\"express\");\n\nconst app = express();\n\nconst port = process.env.PORT || 5000;\n\napp.use(express.json({ extended: false }));\n\napp.use(\"\/payment\", require(\".\/routes\/payment\"));\n\napp.listen(port, () =&gt; console.log(`Server started on port ${port}`));\n\n```<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-7-create-a-react-app\">7. Create a React App<\/h4>\n\n\n\n<ul>\n<li>Inside your project folder, create a React app by running: <strong><em>`npx create-react-app client`.<\/em><\/strong><\/li>\n\n\n\n<li>Navigate into your React app folder:<strong><em> `cd client`.<\/em><\/strong><\/li>\n\n\n\n<li>Install Axios for making HTTP requests by running: <strong><em>`npm install axios`<\/em><\/strong>.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-8-add-a-payment-button\">8. Add a Payment Button<\/h4>\n\n\n\n<p>In your React app, open the `src\/App.js` file and replace the code with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>```javascript\nimport React from \"react\";\nimport logo from \".\/logo.svg\";\nimport \".\/App.css\";\nimport axios from \"axios\";\n\nfunction App() {\n    function loadScript(src) {\n        return new Promise((resolve) =&gt; {\n            const script = document.createElement(\"script\");\n            script.src = src;\n            script.onload = () =&gt; {\n                resolve(true);\n            };\n            script.onerror = () =&gt; {\n                resolve(false);\n            };\n            document.body.appendChild(script);\n        });\n    }\n\n    async function displayRazorpay() {\n        const res = await loadScript(\"https:\/\/checkout.razorpay.com\/v1\/checkout.js\");\n\n        if (!res) {\n            alert(\"Razorpay SDK failed to load. Are you online?\");\n            return;\n        }\n\n        const result = await axios.post(\"http:\/\/localhost:5000\/payment\/orders\");\n\n        if (!result) {\n            alert(\"Server error. Are you online?\");\n            return;\n        }\n\n        const { amount, id: order_id, currency } = result.data;\n\n        const options = {\n            key: \"rzp_test_r6FiJfddJh76SI\", \/\/ Enter the Key ID generated from the Dashboard\n            amount: amount.toString(),\n            currency: currency,\n            name: \"Your Company Name\",\n            description: \"Test Transaction\",\n            image: { logo },\n            order_id: order_id,\n            handler: async function (response) {\n                const data = {\n                    orderCreationId: order_id,\n                    razorpayPaymentId: response.razorpay_payment_id,\n                    razorpayOrderId: response.razorpay_order_id,\n                    razorpaySignature: response.razorpay_signature,\n                };\n\n                const result = await axios.post(\"http:\/\/localhost:5000\/payment\/success\", data);\n\n                alert(result.data.msg);\n            },\n            prefill: {\n                name: \"Your Name\",\n                email: \"YourEmail@example.com\",\n                contact: \"9999999999\",\n            },\n            notes: {\n                address: \"Your Address\",\n            },\n            theme: {\n                color: \"#61dafb\",\n            },\n        };\n\n        const paymentObject = new window.Razorpay(options);\n        paymentObject.open();\n    }\n\n    return (\n        &lt;div className=\"App\"&gt;\n            &lt;header className=\"App-header\"&gt;\n                &lt;img src={logo} className=\"App-logo\" alt=\"logo\" \/&gt;\n                &lt;p&gt;Buy React now!&lt;\/p&gt;\n                &lt;button className=\"App-link\" onClick={displayRazorpay}&gt;\n                    Pay \u20b9500\n                &lt;\/button&gt;\n            &lt;\/header&gt;\n        &lt;\/div&gt;\n    );\n}\n\nexport default App;\n```<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-9-verify-the-payment\">9. Verify the Payment<\/h4>\n\n\n\n<p>In your <strong><em>`routes\/payment.js`<\/em><\/strong> file, add the following code to verify the payment:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>```javascript\n\nrouter.post(\"\/success\", async (req, res) =&gt; {\n\n&nbsp;&nbsp;&nbsp;&nbsp;try {\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;const { orderCreationId, razorpayPaymentId, razorpayOrderId, razorpaySignature } = req.body;\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;const shasum = crypto.createHmac(\"sha256\", process.env.RAZORPAY_SECRET);\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;shasum.update(`${orderCreationId}|${razorpayPaymentId}`);\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;const digest = shasum.digest(\"hex\");\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (digest !== razorpaySignature) return res.status(400).json({ msg: \"Transaction not legit!\" });\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;res.json({ msg: \"success\", orderId: razorpayOrderId, paymentId: razorpayPaymentId });\n\n&nbsp;&nbsp;&nbsp;&nbsp;} catch (error) {\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;res.status(500).send(error);\n\n&nbsp;&nbsp;&nbsp;&nbsp;}\n\n});\n\n```<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-10-test-your-integration\">10. Test Your Integration<\/h4>\n\n\n\n<ul>\n<li>Run your server by navigating to your project folder in the terminal and typing:<strong><em> `node server.js`.<\/em><\/strong><\/li>\n\n\n\n<li>Run your React app by navigating to the client folder and typing:<strong><em> `npm start`.<\/em><\/strong><\/li>\n\n\n\n<li>Open your React app in the browser, click the Pay \u20b9500 button, and follow the instructions.<\/li>\n<\/ul>\n\n\n\n<p>That&#8217;s it! You have now integrated Razorpay into your React app.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-common-challenges-in-payment-gateway-integration-and-how-to-overcome-them\"><span class=\"ez-toc-section\" id=\"common_challenges_in_payment_gateway_integration_and_how_to_overcome_them\"><\/span>Common Challenges in Payment Gateway Integration and How to Overcome Them<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Integrating a payment gateway like Razorpay can be tricky. Here are some common problems you might face and how to solve them:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-1-managing-api-keys\"><span class=\"ez-toc-section\" id=\"1_managing_api_keys\"><\/span>1. Managing API Keys<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p><strong>Problem: <\/strong>Keeping your API keys safe.<\/p>\n\n\n\n<p><strong>Solution:<\/strong><\/p>\n\n\n\n<ul>\n<li>Store your API keys in a special file (.env file) and not directly in your code.<\/li>\n\n\n\n<li>Change your API keys regularly and watch for any unusual activity.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-2-supporting-different-payment-methods\"><span class=\"ez-toc-section\" id=\"2_supporting_different_payment_methods\"><\/span>2. Supporting Different Payment Methods<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p><strong>Problem:<\/strong> Handling different ways people pay (cards, net banking, wallets, etc.).<\/p>\n\n\n\n<p><strong>Solution:<\/strong><\/p>\n\n\n\n<ul>\n<li>Choose a payment gateway that supports various payment methods, like Razorpay.<\/li>\n\n\n\n<li>Follow the gateway\u2019s instructions carefully to set up each payment method.<\/li>\n\n\n\n<li>Test each method thoroughly to ensure it works properly.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-3-managing-payment-failures\"><span class=\"ez-toc-section\" id=\"3_managing_payment_failures\"><\/span>3. Managing Payment Failures<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p><strong>Problem: <\/strong>Handling situations where payments don\u2019t go through.<\/p>\n\n\n\n<p><strong>Solution:<\/strong><\/p>\n\n\n\n<ul>\n<li>Implement error handling and retry logic for temporary issues.<\/li>\n\n\n\n<li>Provide clear error messages to users when a payment fails.<\/li>\n\n\n\n<li>Log payment attempts and failures for troubleshooting.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-4-verifying-transactions\"><span class=\"ez-toc-section\" id=\"4_verifying_transactions\"><\/span>4. Verifying Transactions<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p><strong>Problem:<\/strong> Making sure payments are real and not fake.<\/p>\n\n\n\n<p><strong>Solution:<\/strong><\/p>\n\n\n\n<ul>\n<li>Use the payment gateway\u2019s <a class=\"wpil_keyword_link\" href=\"https:\/\/www.techjockey.com\/blog\/fraud-detection-tools\"   title=\"fraud detection tools\" data-wpil-keyword-link=\"linked\"  data-wpil-monitor-id=\"1769\">fraud detection tools<\/a>.<\/li>\n\n\n\n<li>Verify transactions on your server using webhooks or APIs.<\/li>\n\n\n\n<li>Check transaction details (like amount and order ID) before finalizing orders.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-5-testing-the-integration\">5. Testing the Integration<\/h4>\n\n\n\n<p><strong>Problem: <\/strong>Ensuring everything works correctly before going live.<\/p>\n\n\n\n<p><strong>Solution:<\/strong><\/p>\n\n\n\n<ul>\n<li>Use the payment gateway\u2019s test environment to check your integration.<\/li>\n\n\n\n<li>Create test cases for different scenarios (successful and failed payments, etc.).<\/li>\n\n\n\n<li>Test with real payment methods before launching.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-6-handling-different-currencies\">6. Handling Different Currencies<\/h4>\n\n\n\n<p><strong>Problem:<\/strong> Supporting multiple currencies and localizations.<\/p>\n\n\n\n<p><strong>Solution:<\/strong><\/p>\n\n\n\n<ul>\n<li>Set up your payment gateway to accept various currencies.<\/li>\n\n\n\n<li>Show prices in the user\u2019s local currency.<\/li>\n\n\n\n<li>Handle currency conversion correctly if needed.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-7-improving-user-experience\"><span class=\"ez-toc-section\" id=\"7_improving_user_experience\"><\/span>7. Improving User Experience<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p><strong>Problem: <\/strong>Making the payment process easy and smooth for users.<\/p>\n\n\n\n<p><strong>Solution:<\/strong><\/p>\n\n\n\n<ul>\n<li>Ensure the payment steps are simple and clear.<\/li>\n\n\n\n<li>Use the payment gateway\u2019s customizable checkout options to match your site\u2019s design.<\/li>\n\n\n\n<li>Provide clear instructions and feedback during the payment process.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-8-following-legal-rules\"><span class=\"ez-toc-section\" id=\"8_following_legal_rules\"><\/span>8. Following Legal Rules<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p><strong>Problem:<\/strong> Meeting local and international laws for online payments.<\/p>\n\n\n\n<p><strong>Solution<\/strong>:<\/p>\n\n\n\n<ul>\n<li>Stay updated on the legal requirements in the areas you operate.<\/li>\n\n\n\n<li>Work with your payment gateway provider to ensure compliance.<\/li>\n\n\n\n<li>Implement necessary measures for data protection and privacy.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-wrapping-up\"><span class=\"ez-toc-section\" id=\"wrapping_up\"><\/span>Wrapping Up<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Setting up a payment gateway might seem hard, but it&#8217;s important for running a business online. By following the steps and using the right tools, you can make the process easier. Choose a good payment gateway, follow the instructions carefully, and test everything before going live. This way, you can ensure that your customers can pay you easily and securely.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Are you selling products or services online and wondering how to safely accept payments from your customers? This is where a payment gateway comes in. A payment gateway is like a bridge between your website and the bank that handles your customer&#8217;s payment. It makes sure that the transaction is secure and smooth. However, setting [&hellip;]<\/p>\n","protected":false},"author":184,"featured_media":49288,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7602],"tags":[467],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.2 (Yoast SEO v22.2) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Set Up a Razorpay Payment Gateway On Your Website?<\/title>\n<meta name=\"description\" content=\"In this guide, let us explore how to set up a Razorpay payment gateway on your website using various methods.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.techjockey.com\/blog\/wp-json\/wp\/v2\/posts\/49265\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Set Up Razorpay Payment Gateway?\" \/>\n<meta property=\"og:description\" content=\"In this guide, let us explore how to set up a Razorpay payment gateway on your website using various methods.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.techjockey.com\/blog\/wp-json\/wp\/v2\/posts\/49265\" \/>\n<meta property=\"og:site_name\" content=\"Techjockey.com Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Techjockey\/\" \/>\n<meta property=\"article:published_time\" content=\"2024-07-08T12:43:51+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-09-11T11:22:09+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2024\/07\/08180810\/How-to-Set-Up-Payment-Gateway.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Shubham Roy\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@TechJockeys\" \/>\n<meta name=\"twitter:site\" content=\"@TechJockeys\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Shubham Roy\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Set Up a Razorpay Payment Gateway On Your Website?","description":"In this guide, let us explore how to set up a Razorpay payment gateway on your website using various methods.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.techjockey.com\/blog\/wp-json\/wp\/v2\/posts\/49265","og_locale":"en_US","og_type":"article","og_title":"How to Set Up Razorpay Payment Gateway?","og_description":"In this guide, let us explore how to set up a Razorpay payment gateway on your website using various methods.","og_url":"https:\/\/www.techjockey.com\/blog\/wp-json\/wp\/v2\/posts\/49265","og_site_name":"Techjockey.com Blog","article_publisher":"https:\/\/www.facebook.com\/Techjockey\/","article_published_time":"2024-07-08T12:43:51+00:00","article_modified_time":"2025-09-11T11:22:09+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2024\/07\/08180810\/How-to-Set-Up-Payment-Gateway.png","type":"image\/png"}],"author":"Shubham Roy","twitter_card":"summary_large_image","twitter_creator":"@TechJockeys","twitter_site":"@TechJockeys","twitter_misc":{"Written by":"Shubham Roy","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.techjockey.com\/blog\/how-to-set-up-payment-gateway#article","isPartOf":{"@id":"https:\/\/www.techjockey.com\/blog\/how-to-set-up-payment-gateway"},"author":{"name":"Shubham Roy","@id":"https:\/\/www.techjockey.com\/blog\/#\/schema\/person\/5d8cbe24e78d4ad94110452dcf9c4fcf"},"headline":"How to Set Up Razorpay Payment Gateway?","datePublished":"2024-07-08T12:43:51+00:00","dateModified":"2025-09-11T11:22:09+00:00","mainEntityOfPage":{"@id":"https:\/\/www.techjockey.com\/blog\/how-to-set-up-payment-gateway"},"wordCount":1698,"publisher":{"@id":"https:\/\/www.techjockey.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.techjockey.com\/blog\/how-to-set-up-payment-gateway#primaryimage"},"thumbnailUrl":"https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2024\/07\/08180810\/How-to-Set-Up-Payment-Gateway.png","keywords":["payment gateway"],"articleSection":["Payment Gateway"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.techjockey.com\/blog\/how-to-set-up-payment-gateway","url":"https:\/\/www.techjockey.com\/blog\/how-to-set-up-payment-gateway","name":"How to Set Up a Razorpay Payment Gateway On Your Website?","isPartOf":{"@id":"https:\/\/www.techjockey.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.techjockey.com\/blog\/how-to-set-up-payment-gateway#primaryimage"},"image":{"@id":"https:\/\/www.techjockey.com\/blog\/how-to-set-up-payment-gateway#primaryimage"},"thumbnailUrl":"https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2024\/07\/08180810\/How-to-Set-Up-Payment-Gateway.png","datePublished":"2024-07-08T12:43:51+00:00","dateModified":"2025-09-11T11:22:09+00:00","description":"In this guide, let us explore how to set up a Razorpay payment gateway on your website using various methods.","breadcrumb":{"@id":"https:\/\/www.techjockey.com\/blog\/how-to-set-up-payment-gateway#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.techjockey.com\/blog\/how-to-set-up-payment-gateway"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.techjockey.com\/blog\/how-to-set-up-payment-gateway#primaryimage","url":"https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2024\/07\/08180810\/How-to-Set-Up-Payment-Gateway.png","contentUrl":"https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2024\/07\/08180810\/How-to-Set-Up-Payment-Gateway.png","width":1200,"height":628,"caption":"How to Set Up Payment Gateway process in steps"},{"@type":"BreadcrumbList","@id":"https:\/\/www.techjockey.com\/blog\/how-to-set-up-payment-gateway#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.techjockey.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Payment Gateway","item":"https:\/\/www.techjockey.com\/blog\/category\/payment-gateway"},{"@type":"ListItem","position":3,"name":"How to Set Up Razorpay Payment Gateway?"}]},{"@type":"WebSite","@id":"https:\/\/www.techjockey.com\/blog\/#website","url":"https:\/\/www.techjockey.com\/blog\/","name":"Techjockey.com Blog","description":"","publisher":{"@id":"https:\/\/www.techjockey.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.techjockey.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.techjockey.com\/blog\/#organization","name":"Techjockey Infotech Private Limited","url":"https:\/\/www.techjockey.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.techjockey.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2019\/12\/logo.png","contentUrl":"https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2019\/12\/logo.png","width":72,"height":72,"caption":"Techjockey Infotech Private Limited"},"image":{"@id":"https:\/\/www.techjockey.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/Techjockey\/","https:\/\/twitter.com\/TechJockeys","https:\/\/www.linkedin.com\/company\/techjockey","https:\/\/www.youtube.com\/@techjockeydotcom"]},{"@type":"Person","@id":"https:\/\/www.techjockey.com\/blog\/#\/schema\/person\/5d8cbe24e78d4ad94110452dcf9c4fcf","name":"Shubham Roy","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.techjockey.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/4606bf931eeee0e818bf91797db92f5a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4606bf931eeee0e818bf91797db92f5a?s=96&d=mm&r=g","caption":"Shubham Roy"},"description":"Shubham Roy is an experienced writer with a strong Technical and Business background. With over three years of experience as a content writer, he has honed his skills in various domains, including technical writing, business, software, Travel, Food and finance. His passion for creating engaging and informative content has earned him recognition in the industry. When he's not busy crafting articles, Shubham enjoys reading, exploring new technologies, and staying updated with the latest trends in the world of business and finance.","sameAs":["https:\/\/www.linkedin.com\/in\/omgshubham\/"],"url":"https:\/\/www.techjockey.com\/blog\/author\/shubham-roy"}]}},"_links":{"self":[{"href":"https:\/\/www.techjockey.com\/blog\/wp-json\/wp\/v2\/posts\/49265"}],"collection":[{"href":"https:\/\/www.techjockey.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techjockey.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techjockey.com\/blog\/wp-json\/wp\/v2\/users\/184"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techjockey.com\/blog\/wp-json\/wp\/v2\/comments?post=49265"}],"version-history":[{"count":6,"href":"https:\/\/www.techjockey.com\/blog\/wp-json\/wp\/v2\/posts\/49265\/revisions"}],"predecessor-version":[{"id":59368,"href":"https:\/\/www.techjockey.com\/blog\/wp-json\/wp\/v2\/posts\/49265\/revisions\/59368"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.techjockey.com\/blog\/wp-json\/wp\/v2\/media\/49288"}],"wp:attachment":[{"href":"https:\/\/www.techjockey.com\/blog\/wp-json\/wp\/v2\/media?parent=49265"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techjockey.com\/blog\/wp-json\/wp\/v2\/categories?post=49265"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techjockey.com\/blog\/wp-json\/wp\/v2\/tags?post=49265"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}