MEDUSA-PAYMENT-PHONEPE
Support the Medusa-Payment-PhonePe Plugin - Elevate Our Medusa Community!
Dear Developers and E-commerce Enthusiasts,
Are you a developer based in India ? Are you looking for a payment solutions that support UPI, and other india specific modes natively. If you are
A🚀 Welcome to the future of web development and eCommerce! Are you ready to harness the power of seamless payments? Look no further than the Medusa Payment PhonPe plugin – your gateway to a world of convenience, efficiency, and innovation.
In today's fast-paced digital landscape, a smooth and secure payment experience is the cornerstone of success for any eCommerce platform. We understand the challenges you face as a web developer, striving to create exceptional user experiences while ensuring the highest level of trust and reliability. That's where Medusa Payment PhonPe comes in!
Imagine a plugin that effortlessly integrates PhonPe, one of the most trusted and widely-used payment gateways, into the MedusaJS ecosystem. Your users will enjoy a frictionless checkout process, while you benefit from the robustness and simplicity of our solution. No more struggling with complex payment integrations – we've got you covered!
By leveraging the Medusa Payment PhonPe plugin, you'll unlock a multitude of benefits:
âś… Simplicity: Seamlessly integrate PhonPe payments into your Medusa-powered eCommerce platform with just a few lines of code. Our user-friendly documentation ensures a hassle-free setup.
âś… Reliability: Trust is the currency of the digital age. With PhonPe's reputation for security and our commitment to excellence, you can rest assured that your users' transactions are in safe hands.
âś… Speed: Time is of the essence. Our plugin ensures swift and efficient payment processing, reducing checkout friction and boosting customer satisfaction.
âś… Flexibility: We understand that no two eCommerce platforms are alike. That's why our plugin is designed to be customizable, allowing you to tailor the payment experience to your unique requirements.
âś… Innovation: Stay ahead of the curve. By offering PhonPe as a payment option, you're tapping into the growing trend of digital payments, meeting your users where they are and setting your platform apart from the competition.
Join the ranks of successful web developers who have already revolutionized their eCommerce platforms with Medusa Payment PhonPe. Together, let's build a future where every transaction is smooth, every customer is satisfied, and every developer has the tools they need to create magic.
Don't miss out on this opportunity to elevate your eCommerce platform to new heights. Embrace the future of payments with Medusa Payment PhonPe – because when it comes to success, every detail matters, and every payment counts! 💡💰
Installation Made Simple
No hassle, no fuss! Install Medusa-Payment-PhonePe effortlessly with npm:
bash yarn install medusa-payment-phonepe
PHONEPE_SALT= PHONEPE_MODE= PHONEPE_MERCHANT_ACCOUNT=
enabledDebugLogging?: boolean; - to enable debug logging. Enabling this might coz the vercel function to timeout
redirectUrl: string; - the URL to redirect the client to
redirectMode: "REDIRECT" | "POST";
callbackUrl: string; - the server 2 server callback path
merchantId: string; - the phonepe merchant id
salt: string; - the phonpe supplied
mode: "production" | "test" | "uat" - the mode to operate in. UAT is to test against the phone gateway, production when you want acutal money to be deducted, test.. well its just that test mode, mocked to be fully implemented. test are currently run in UAT mode.
const plugins = [
...,
{
resolve:
,Copy to clipboardmedusa-payment-phonepe
options: {
redirectUrl: "http://localhost:8000/api/payment-confirmed",
callbackUrl: "http://localhost:9000/phonepe/hook",
salt: process.env.PHONEPE_SALT,
merchantId:
process.env.PHONEPE_MERCHANT_ACCOUNT,
mode: process.env.PHONEPE_MODE,
redirectMode: "POST"
}
},
...]
/ eslint-disable @typescript-eslint/no-unused-vars /
/ eslint-disable require-jsdoc /
import { medusaClient } from "@lib/config";
import { createPostCheckSumHeader } from "@lib/util/phonepe-create-post-checksum-header";
import { sleep } from "@lib/util/sleep";
import { notFound } from "next/navigation";
import { NextRequest, NextResponse } from "next/server";
import { PaymentStatusCodeValues } from "types/phonepe-types";
export async function POST(
request: NextRequest,
_response: NextResponse
): Promise<NextResponse > {
const urlSplit = request.url.split("//");
const base = urlSplit[1].split("/")[0];
}
export default POST;
`
/ eslint-disable @typescript-eslint/no-explicit-any /
import { medusaClient } from "@lib/config";
import { PaymentSession } from "@medusajs/medusa";
import Button from "@modules/common/components/button";
import Spinner from "@modules/common/icons/spinner";
import { useCart, useUpdatePaymentSession } from "medusa-react";
import { useEffect, useState } from "react";
import { PaymentResponse } from "types/phonepe-types";
export const PhonePePaymentButton = ({
session,
notReady
}: {
session: PaymentSession;
notReady: boolean;
}) => {
const [disabled, setDisabled] = useState(false);
const [submitting, setSubmitting] = useState(false);
const [errorMessage, setErrorMessage] = useState (
undefined
);
const { cart, setCart } = useCart();
};
&&
and add into the payment element
Copy to clipboardcase "phonepe": return <></>
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
Untested features
These features exists, but without implementing the client it isn't possible to tests these outright
- Refund
Disclaimer
The code was tested on limited number of usage scenarios. There maybe unforseen bugs, please raise the issues as they come, or create pull requests if you'd like to submit fixes.
Support the Medusa-Payment-PhonePe Plugin - Strengthen Our Medusa Community!
Dear Medusa Enthusiasts,
I hope this message finds you all in high spirits and enthusiasm for the world of e-commerce! Today, I reach out to our vibrant Medusa community with a heartfelt appeal that will strengthen our collective journey and elevate our online stores to new heights. I am thrilled to present the Medusa-Payment-PhonePe plugin, a community-driven project designed to streamline payment processing for our beloved Medusa platform.
As a dedicated member of this community, I, have invested my time and passion into crafting this valuable plugin that bridges the gap between online retailers and their customers. It is with great humility that I invite you to participate in this open-source initiative by sponsoring the Medusa-Payment-PhonePe plugin through GitHub.
Your sponsorship, no matter the size, will make a world of difference in advancing the Medusa ecosystem. It will empower me to focus on the continuous improvement and maintenance of the Medusa-Payment-PhonePe plugin, ensuring it remains reliable, secure, and seamlessly integrated with Medusa.
Being a community plugin, perks are not the focus of this appeal. Instead, I promise to give back to the community by providing fast and efficient support via Discord or any other means. Your sponsorship will help sustain and enhance the plugin's development, allowing me to be responsive to your needs and address any concerns promptly.
Let's come together and demonstrate the power of community collaboration. By sponsoring the Medusa-Payment-PhonePe plugin on GitHub, you directly contribute to the success of not only this project but also the broader Medusa ecosystem. Your support enables us to empower developers, merchants, and entrepreneurs, facilitating growth and success in the world of e-commerce.
To show your commitment and be part of this exciting journey, kindly consider sponsoring the Medusa-Payment-PhonePe plugin on GitHub. Your contribution will amplify the impact of our community and foster a supportive environment for all.
Thank you for your time, and thank you for being an integral part of our Medusa community. Together, we will elevate our online stores and create extraordinary experiences for customers worldwide.
With warm regards,
SGFGOV

Build your own plugins
Develop your own plugins with our API to speed up your processes.
Make your plugin available via npm for it to be shared in our Plugin Library with the broader Medusa community.
.png)