Voltar a Guias de Pagamento

PhonePe Payment Gateway for Shopify: Setup and Optimization

Master the PhonePe payment gateway for Shopify. Learn to set up UPI, complete KYC, and use HidePay to optimize checkout for higher conversions in India.

Introduction

Integrating the PhonePe payment gateway for Shopify is one of the most effective ways to capture the Indian e-commerce market. With UPI driving the vast majority of digital transactions in India, providing a trusted, mobile-first payment experience is no longer optional for growth. By adding this gateway, you give your customers access to a familiar interface that significantly reduces friction at the final stage of the buying journey.

We built HidePay to help merchants take this integration further by giving them precise control over how and when these payment options appear. While the standard integration is straightforward, the real value lies in how you manage your checkout flow to maximize conversions and minimize transaction costs. Learn more and install HidePay on the Shopify App Store to get started today.

This guide provides a technical walkthrough for setting up the PhonePe gateway, managing KYC requirements, and implementing advanced rules to ensure your checkout remains clean and efficient. You will learn how to move beyond a basic setup to a strategic payment configuration that protects your margins and improves the customer experience.

Why PhonePe Is Essential for Indian E-commerce

Shopify merchants operating in India face a unique challenge: Shopify Payments is not natively available in the region. This requires selecting a third-party provider that can handle the specific preferences of the Indian consumer. PhonePe has emerged as a leader because it addresses the core habits of this demographic, specifically the reliance on Unified Payments Interface (UPI).

With over 500 million registered users, the brand carries immense trust. When a customer sees the familiar logo at checkout, the perceived risk of the transaction drops. Beyond trust, the technical infrastructure is built for scale. It handles high transaction volumes during peak sales periods without the downtime that often plagues smaller gateways.

The integration also supports a comprehensive suite of payment instruments. While UPI is the primary draw, the gateway also processes credit and debit cards, net banking from all major Indian banks, and the PhonePe Wallet. This ensures that regardless of how your customer prefers to pay, you have a high-probability path to a successful sale.

Prerequisites for a Successful Integration

Before you begin the technical setup within your Shopify admin, you must have your business documentation ready. PhonePe is a regulated financial entity and requires a full Know Your Customer (KYC) process before you can move from a test environment to live transactions.

You will need the following details and documents:

  • A registered Indian business entity (Proprietorship, Partnership, LLP, or Private Limited).
  • A valid GSTIN and a business PAN card.
  • A business current account with a cancelled cheque for verification.
  • The identity and address proof of the authorized signatory.
  • A live Shopify store with a clear refund and privacy policy published.

Ensure your store's "Contact Us" page includes a physical address and a working phone number. The compliance team often checks these details to verify that the business is legitimate before approving the merchant ID.

Personalizar os Shopify Payments facilmente

Oculte, ordene e renomeie os métodos de pagamento do Shopify usando condições poderosas. Personalize o seu checkout e controle as opções de pagamento com o HidePay.

Step-by-Step: Installing PhonePe on Shopify

The installation process is a no-code experience. You do not need to edit your theme files or handle complex API integrations. The official plugin manages the communication between Shopify's checkout and the payment server.

1. Create Your Merchant Account

Navigate to the PhonePe Business website and register your interest. You will provide your store URL, contact details, and business category. Once you have access to the dashboard, you can begin the digital KYC process. While waiting for approval, you can still proceed with the Shopify setup to prepare your checkout.

2. Locate the App in Shopify Admin

Log in to your Shopify admin and navigate to the Settings menu, then select Payments. Under the Additional Payment Methods section, click Add payment methods. You can search by provider; type "PhonePe" into the search bar. Select the official "PhonePe Payment Gateway" app.

3. Install and Authenticate

Click the Install button. Shopify will ask for permissions to manage your checkout and order data. Once confirmed, you will be redirected to the PhonePe login page. Enter your registered mobile number and verify it via OTP. This step automatically links your Merchant ID to your Shopify store, eliminating the need to manually copy and paste API salt keys.

4. Activate the Gateway

After the redirection back to Shopify, you will see the gateway listed. You have the option to enable "Test Mode." It is highly recommended to keep this on initially to perform a sandbox transaction before going live. When you are ready for real orders, toggle Test Mode off and click Activate.

Optimizing the Checkout with Native Rules

A common mistake merchants make is treating their payment gateway as a "set and forget" feature. A cluttered checkout with too many options can overwhelm customers, leading to choice paralysis and cart abandonment.

Using the app we developed, you can implement rules that hide or show the PhonePe gateway based on specific criteria — start by creating your first payment customization rule. If you want to hide PhonePe for non-Indian customers, set a country-based condition so only customers in India see the gateway.

Sorting for Conversion

In the Indian market, UPI is the fastest way to pay. We allow you to sort your payment methods so that PhonePe appears at the very top of the list. By making the most popular method the easiest to find, you reduce the time a customer spends on the checkout page. This is particularly effective for mobile shoppers who want to complete a purchase in two or three taps. Read the guide on sorting payment methods when multiple options share the same name to avoid ordering issues.

Hiding Based on Geography or Product

If you sell globally but only use PhonePe for your Indian customers, you should set a rule to hide this gateway for any customer located outside of India. This prevents international customers from seeing payment options that they cannot use, which maintains a professional and localized feel for every market.

You can also hide the gateway based on product tags. If you sell digital downloads alongside physical goods, you might prefer different gateways for each to manage different risk profiles or transaction fees. See the step-by-step article on hiding payment methods when a certain product is in the cart.

Handling Transaction Failures and Error Codes

No payment gateway has a 100% success rate. Understanding why a payment failed is the first step toward recovery. Shopify provides internal error codes when a transaction through PhonePe does not complete.

Common issues include:

  • AUTHENTICATION_FAILED: Usually occurs when the customer fails the 3D Secure or UPI PIN verification.
  • CARD_DECLINED: The issuing bank has rejected the transaction, often due to insufficient funds or international usage restrictions.
  • EXPIRED_CARD: The customer is attempting to use an outdated card.
  • RISKY: The transaction has been flagged by fraud detection filters.

Monitoring these failures in your Shopify "Abandoned Checkouts" section allows you to reach out to customers with a recovery email. Often, suggesting they try an alternative method like UPI if their card failed can save the sale.

Protecting Margins with Smart Rules

Every payment method carries a cost. UPI typically has the lowest Merchant Discount Rate (MDR), while credit cards and certain wallets can be more expensive for the merchant. To protect your bottom line, you can use our app to create rules based on the cart total.

If a transaction is very small, the fixed portion of a payment fee might eat most of your profit. You could set a rule to only show the most cost-effective payment methods for orders under a certain amount. Conversely, for very large orders, you might want to disable certain wallets that have lower transaction limits to prevent customer frustration.

Using HidePay, you can also manage the relationship between pre-paid and Cash on Delivery (COD) options. Many Indian merchants want to discourage COD because of the high Return to Origin (RTO) rates. You can rename your payment methods to highlight the benefits of paying online (for example, add a short descriptive label) or hide COD entirely for customers who have a history of frequent returns.

Best Practices for Mobile Checkout

Since the majority of PhonePe users are on mobile devices, your Shopify checkout must be optimized for small screens. The PhonePe gateway uses a "half-page" or "intent" flow on mobile. This means when a customer selects UPI, the PhonePe app (or other UPI apps) opens directly on their phone without them having to manually enter a VPA or wait for a text message.

To ensure this works perfectly:

  1. Avoid heavy scripts: Don't load unnecessary third-party apps on your checkout page that could slow down the redirect to the payment app.
  2. Clear Labeling: Rename the payment method in your Shopify settings to something clear like "Pay via UPI / Cards / Wallet."
  3. Use Native Functions: Ensure your payment customizations are built on Shopify Functions rather than outdated scripts.

Our app is built on Native Shopify Functions, ensuring that your payment rules execute instantly within Shopify’s own infrastructure. This prevents the "flicker" or lag often seen with older script-based apps, providing a professional experience that keeps the customer focused on completing the purchase. For a deeper look at why Shopify Functions matter and how to migrate from scripts, check the dedicated article on codeless functions.

Troubleshooting Common Setup Issues

If the gateway is not appearing at checkout after activation, the most common culprit is a currency mismatch. PhonePe for Shopify is designed to work with Indian Rupees (INR). If your store's primary currency is set to USD or another currency, the gateway may not trigger. Ensure your Shopify market settings are correctly configured to offer INR to customers in India.

Another frequent issue is "Pending" orders. This happens when the communication between the gateway and Shopify (the webhook) is delayed. Do not fulfill these orders until the status changes to "Paid" in your admin. If an order stays pending for more than a few hours, check your PhonePe Business Dashboard to see if the funds were actually captured.

If you are using multiple gateways, they may appear in an unorganized list. We recommend using HidePay to reorder them so the most reliable gateway is always the first choice for the customer. This simple change can have a measurable impact on your checkout completion rate. See the HidePay tutorials for debugging and retrieving the correct payment method when you need to diagnose which gateway is being used.

Summary of Key Actions

Integrating and optimizing your payment flow requires a balance of technical setup and strategic rules. Follow these steps to ensure your PhonePe integration performs at its peak:

  • Complete KYC Early: Start the documentation process with PhonePe before you plan to go live to avoid delays in approval.
  • Test the Full Flow: Use the sandbox environment to simulate both successful and failed transactions to see how your store responds.
  • Use Geography Rules: Hide the gateway for customers outside India to keep your checkout clean and relevant.
  • Prioritize Popular Methods: Sort your payment list to put PhonePe and UPI at the top, where mobile users expect to see them.
  • Monitor Failed Payments: Use Shopify error codes to identify patterns and refine your customer recovery strategy.

By taking these steps, you transform a simple payment integration into a competitive advantage. The goal is to make the payment process so fast and reliable that it becomes an invisible part of the customer's journey.

Conclusion

Setting up the PhonePe payment gateway for Shopify is a fundamental step for any merchant targeting the Indian market. It provides the security, trust, and speed that local customers expect. However, simply installing the plugin is just the beginning. To truly optimize your store, you need to control the checkout environment through smart sorting and conditional rules.

We have seen that merchants who actively manage their payment options see fewer abandoned carts and lower transaction costs. By refining which methods appear based on the customer’s location, cart value, or previous behavior, you create a more personalized and efficient shopping experience.

Take control of your checkout today — install HidePay on the Shopify App Store and set up your first payment rule to prioritize your best-performing gateways. You can also explore HidePay's product site for feature details and tutorials.

FAQ

Does PhonePe for Shopify support international payments?

The official PhonePe plugin for Shopify is primarily designed for the Indian market and processes transactions in INR. While it can accept international credit cards, the primary user experience is optimized for Indian customers using UPI, local cards, and net banking.

How much does it cost to use PhonePe on Shopify?

The plugin itself is free to install from the Shopify App Store. However, you will pay a transaction fee (Merchant Discount Rate) to PhonePe for every successful order. These rates vary by payment method (UPI is typically lowest) and you should check PhonePe Business for the latest pricing.

Can I hide PhonePe for specific products?

Yes, by using an app like HidePay, you can create rules to hide the gateway based on product tags, collections, or cart contents. See the HidePay guide on hiding payment methods when a product is in the cart for step-by-step instructions.

How do I switch from Test Mode to Live Mode?

Once you have verified that your test transactions are appearing correctly in your Shopify admin, go to your Payment settings, select the gateway, toggle the "Test Mode" switch to off, and save your changes. Ensure your KYC is fully approved before doing this, or real transactions will fail.


Embedded resources and tutorials referenced in this guide:

  • Install HidePay on the Shopify App Store to begin.
  • How to create a payment customization in HidePay for rule-based hiding and showing.
  • How to sort payment methods when multiple methods share the same name.
  • How to hide payment methods for certain products in HidePay.
  • How to hide Express Checkout buttons with HidePay (Shopify Plus note applies).
  • HidePay product and tutorial pages for deeper setup and debugging.
  • Nextools articles: introducing HidePay and the HideSuite bundle, and the SupaEasy article on codeless Shopify Functions for advanced customization.

(Links above point to HidePay's Shopify listing, HidePay help docs, and relevant Nextools blog posts and product pages for step-by-step setup and configuration.)

Começar a usar o HidePay

Oculte, organize e otimize os métodos de pagamento do Shopify instantaneamente, sem necessidade de código.