{"id":22624,"date":"2025-09-25T17:00:00","date_gmt":"2025-09-25T11:30:00","guid":{"rendered":"https:\/\/meetanshi.com\/blog\/?p=22624"},"modified":"2025-10-14T16:47:00","modified_gmt":"2025-10-14T11:17:00","slug":"integrate-phonepe-with-magento-2","status":"publish","type":"post","link":"https:\/\/meetanshi.com\/blog\/integrate-phonepe-with-magento-2\/","title":{"rendered":"How To Integrate PhonePe With Magento 2?"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">This blog shows you the simple steps to integrate India&#8217;s popular payment solution, PhonePe, with your Magento 2 store.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The default Magento 2 admin doesn\u2019t have any native PhonePe integration, therefore we will use the Meetanshi Magento 2 PhonePe Payment Gateway extension.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This extension:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Doesn&#8217;t require any coding to setup the payment gateway<\/li>\n\n\n\n<li>Gives complete access to customize the payment solution<\/li>\n\n\n\n<li>Manage all your transaction from the Magento 2 backend&nbsp;<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Steps to Add PhonePe Gateway in Magento 2 Store<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Download and Install the Extension<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Start with downloading the Meetanshi <a href=\"https:\/\/meetanshi.com\/magento-2-phonepe-payment-gateway.html\">Magento 2 PhonePe Payment Gateway<\/a> extension and extracting the zip folder to upload it to the root of your Magento 2 directory via FTP.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"264\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Meetanshi-Magento-2-PhonePe-Payment-Gateway-700x264.png\" alt=\"Meetanshi Magento 2 PhonePe Payment Gateway\" class=\"wp-image-22634\" style=\"width:822px;height:auto\" srcset=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Meetanshi-Magento-2-PhonePe-Payment-Gateway-700x264.png 700w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Meetanshi-Magento-2-PhonePe-Payment-Gateway-250x94.png 250w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Meetanshi-Magento-2-PhonePe-Payment-Gateway-768x290.png 768w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Meetanshi-Magento-2-PhonePe-Payment-Gateway-1536x580.png 1536w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Meetanshi-Magento-2-PhonePe-Payment-Gateway-403x152.png 403w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Meetanshi-Magento-2-PhonePe-Payment-Gateway-964x364.png 964w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Meetanshi-Magento-2-PhonePe-Payment-Gateway-120x45.png 120w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Meetanshi-Magento-2-PhonePe-Payment-Gateway.png 1980w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Then, log in to your SSH and run the following commands one after the other:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>php bin\/magento setup:upgrade<\/li>\n\n\n\n<li>php bin\/magento setup:static-content:deploy -f<\/li>\n\n\n\n<li>php bin\/magento cache:flush<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Get PhonePe API Credentials&nbsp;<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Now, log in to your<a href=\"https:\/\/business.phonepe.com\/login\" target=\"_blank\" rel=\"noopener\"> PhonePe Business account<\/a> and then navigate to the<strong> Developer Settings<\/strong> section.Then under the API keys, you will find the <strong>Client ID, Client Version<\/strong> and <strong>Client Secret<\/strong>. Copy them and navigate to your Magento 2 admin panel.&nbsp;<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"253\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Developer-settings-in-phonepe-business-dashboard-700x253.png\" alt=\"Developer settings in phonepe business dashboard\" class=\"wp-image-22628\" style=\"width:822px;height:auto\" srcset=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Developer-settings-in-phonepe-business-dashboard-700x253.png 700w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Developer-settings-in-phonepe-business-dashboard-250x90.png 250w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Developer-settings-in-phonepe-business-dashboard-768x278.png 768w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Developer-settings-in-phonepe-business-dashboard-1536x556.png 1536w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Developer-settings-in-phonepe-business-dashboard-403x146.png 403w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Developer-settings-in-phonepe-business-dashboard-964x349.png 964w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Developer-settings-in-phonepe-business-dashboard-120x43.png 120w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Developer-settings-in-phonepe-business-dashboard.png 1999w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure>\n<\/div>\n\n\n<h3 class=\"wp-block-heading\">Step 3: Add the PhonePe Configuration Settings<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Now, from your Magento 2 admin panel, navigate to <strong>Stores &gt; Configuration &gt; Sales &gt; Payment Methods &gt; PhonePe Payment<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here, you will find a handful of settings to customize the payment gateway. Start with enabling the extension and then add these settings:&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Title:<\/strong> Add a suitable title to display on the checkout page.<\/li>\n\n\n\n<li><strong>Show PhonePe Logo:<\/strong> Select Yes if you want to display the PhonePe logo.<\/li>\n\n\n\n<li><strong>Sandbox Mode:<\/strong> Select Yes if you want to use the extension in a testing environment. (We recommend selecting yes).&nbsp;<\/li>\n\n\n\n<li><strong>Gateway URL:<\/strong> This URL is pre-filled for the sandbox environment. For production, use the live Gateway URL provided by PhonePe.<\/li>\n\n\n\n<li><strong>Client ID:<\/strong> Enter the Client ID that you copied from the PhonePe Business dashboard.<\/li>\n\n\n\n<li><strong>Client Secret:<\/strong> Enter the Client Secret that you copied from the PhonePe Business dashboard.<\/li>\n\n\n\n<li><strong>Client Version:<\/strong> Enter the Client Version that you copied from the PhonePe Business dashboard (typically 1).<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"516\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Magento-2-phonepe-integration-settings--700x516.png\" alt=\"Magento 2 phonepe integration settings\" class=\"wp-image-22632\" srcset=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Magento-2-phonepe-integration-settings--700x516.png 700w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Magento-2-phonepe-integration-settings--250x184.png 250w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Magento-2-phonepe-integration-settings--768x566.png 768w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Magento-2-phonepe-integration-settings--403x297.png 403w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Magento-2-phonepe-integration-settings--964x710.png 964w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Magento-2-phonepe-integration-settings--120x88.png 120w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Magento-2-phonepe-integration-settings-.png 1422w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">The above were general settings, now add the needed customization to your store.&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Allow Auto Invoice:<\/strong> Select Yes if you want to automatically generate an invoice after a payment is done.<\/li>\n\n\n\n<li><strong>Payment from Applicable Countries:<\/strong> Choose between &#8216;All Allowed Countries&#8217; or &#8216;Specific Countries&#8217; to manage payment method visibility.<\/li>\n\n\n\n<li><strong>Payment from Specific Countries:<\/strong> Add countries if you have opted for the Specific Countries option above.<\/li>\n\n\n\n<li><strong>Additional Information:<\/strong> Option to add any instructions or messages for the customer on the checkout page.<\/li>\n\n\n\n<li><strong>Debug:<\/strong> Enable debug mode, which is helpful for troubleshooting purposes.<\/li>\n\n\n\n<li><strong>Sort Order:<\/strong> Set the position of this payment method among the other payment options in your store.&nbsp;<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"695\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Magento-2-phonepe-integration-configuration--700x695.png\" alt=\"Magento 2 phonepe integration configuration\" class=\"wp-image-22630\" srcset=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Magento-2-phonepe-integration-configuration--700x695.png 700w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Magento-2-phonepe-integration-configuration--250x248.png 250w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Magento-2-phonepe-integration-configuration--150x150.png 150w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Magento-2-phonepe-integration-configuration--768x762.png 768w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Magento-2-phonepe-integration-configuration--403x400.png 403w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Magento-2-phonepe-integration-configuration--964x957.png 964w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Magento-2-phonepe-integration-configuration--120x119.png 120w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Magento-2-phonepe-integration-configuration-.png 1062w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Then, click on <strong>Save Config<\/strong> from the top right and complete your PhonePe Magento 2 integration.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: Show the Payment Gateway in the Frontend&nbsp;<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Now, when your customers see the payment option at the checkout page, they will be redirected to the PhonePe hosted payment page.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You customers have the option to pay via QR code, UPI ID, card, or net banking.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"707\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/PhonePe-at-the-checkout-page--700x707.png\" alt=\"PhonePe at the Magento 2 checkout page\" class=\"wp-image-22638\" srcset=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/PhonePe-at-the-checkout-page--700x707.png 700w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/PhonePe-at-the-checkout-page--250x252.png 250w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/PhonePe-at-the-checkout-page--768x775.png 768w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/PhonePe-at-the-checkout-page--403x407.png 403w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/PhonePe-at-the-checkout-page--964x973.png 964w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/PhonePe-at-the-checkout-page--120x121.png 120w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/PhonePe-at-the-checkout-page-.png 1072w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">After the payment is completed, the customer will see a success message and will return to the &#8220;Thank You&#8221; page on your store with the order number.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"381\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Order-ID-details-using-PhonePe-payment-method-700x381.png\" alt=\"Order ID details using PhonePe payment method\" class=\"wp-image-22636\" style=\"width:781px;height:auto\" srcset=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Order-ID-details-using-PhonePe-payment-method-700x381.png 700w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Order-ID-details-using-PhonePe-payment-method-250x136.png 250w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Order-ID-details-using-PhonePe-payment-method-768x418.png 768w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Order-ID-details-using-PhonePe-payment-method-1536x837.png 1536w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Order-ID-details-using-PhonePe-payment-method-403x220.png 403w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Order-ID-details-using-PhonePe-payment-method-964x525.png 964w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Order-ID-details-using-PhonePe-payment-method-120x65.png 120w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Order-ID-details-using-PhonePe-payment-method.png 1766w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure>\n<\/div>\n\n\n<h3 class=\"wp-block-heading\">Step 5: View PhonePe Payment Details in the Backend&nbsp;<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Now, when a payment is completed using the PhonePe integration, then navigate to <strong>Sales &gt; Orders<\/strong> and select the order from your Magento 2 admin.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the Payment Information section, you will find order details like:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Title<\/li>\n\n\n\n<li>PhonePe Order ID<\/li>\n\n\n\n<li>Transaction ID<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"189\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Phonepe-payment-details-in-Magento-2-700x189.png\" alt=\"Phonepe payment details in Magento 2\" class=\"wp-image-22640\" style=\"width:804px;height:auto\" srcset=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Phonepe-payment-details-in-Magento-2-700x189.png 700w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Phonepe-payment-details-in-Magento-2-250x67.png 250w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Phonepe-payment-details-in-Magento-2-768x207.png 768w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Phonepe-payment-details-in-Magento-2-1536x414.png 1536w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Phonepe-payment-details-in-Magento-2-403x109.png 403w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Phonepe-payment-details-in-Magento-2-964x260.png 964w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Phonepe-payment-details-in-Magento-2-120x32.png 120w, https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/09\/Phonepe-payment-details-in-Magento-2.png 1616w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\">Why Pick the Meetanshi Magento 2 PhonPe Integration Extension?&nbsp;<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The Meetanshi PhonePe integration is a better choice if you don&#8217;t want to overspend and still get access to quality features. There are low-cost alternatives, but they carry the risk of poor code quality and potential conflicts in your store.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">While the extension offers a number of helpful product-related features, you also enjoy extra benefits, like:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Lifetime license to source code<\/li>\n\n\n\n<li>30-day money-back guarantee<\/li>\n\n\n\n<li>Free support and updates for 1 year<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Meetanshi offers you complete support during post installation and rolls&nbsp;&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It provides a seamless, secure, and user-friendly payment experience for your customers.With India&#8217;s most popular payment methods, you&#8217;re not only streamlining your checkout process but also building trust and opening your business to a massive market.<\/p>\n\n\n<div class=\"meetanshi-cta\">\r\n<div class=\"cta-content-wrapper\">\r\n<span>Magento 2 PhonePe Payment Gateway<\/span>\r\n<p>Start accepting PhonePe on your Magento 2 store with a zero-code setup.<\/p>\r\n<a href=\"https:\/\/meetanshi.com\/magento-2-phonepe-payment-gateway.html\" target=\"_blank\" class=\"btn-primary\">Get Now <\/a>\r\n<\/div>\r\n<div class=\"cta-image-new\">\r\n<img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2025\/11\/phonepe-payment-gateway.png\" alt=\"Magento 2 PhonePe Payment Gateway\">\r\n<\/div>\r\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This blog shows you the simple steps to integrate India&#8217;s popular payment solution, PhonePe, with your Magento 2 store. The default Magento 2 admin doesn\u2019t&#8230;<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[34],"tags":[],"class_list":["post-22624","post","type-post","status-publish","format-standard","hentry","category-magento"],"acf":[],"_links":{"self":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/22624","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/comments?post=22624"}],"version-history":[{"count":6,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/22624\/revisions"}],"predecessor-version":[{"id":23679,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/22624\/revisions\/23679"}],"wp:attachment":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/media?parent=22624"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/categories?post=22624"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/tags?post=22624"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}