Industry-standard PayPal integration for Medusa v2
Accept PayPal and advanced credit card payments in your Medusa v2 store β built by an official PayPal Partner.
| Feature | Details |
|---|---|
| π΅ PayPal Smart Buttons | One-click wallet checkout via PayPal |
| π³ Advanced Card Fields | Hosted, PCI-compliant advanced credit card inputs |
| π Admin Dashboard | Connect, configure, and switch environments from Medusa Admin |
| π Sandbox & Live | Toggle between test and production without restarting |
| β‘ Webhooks | Automatically registered and verified with built-in retry support |
| π 3D Secure | Configurable SCA/3DS per transaction |
In your Medusa backend directory, run:
npm install @easypayment/medusa-paypal
Add the plugin and both payment providers to your existing :
import { loadEnv, defineConfig } from "@medusajs/framework/utils"loadEnv(process.env.NODE_ENV || "development", process.cwd())export default defineConfig({projectConfig: {databaseUrl: process.env.DATABASE_URL,http: {storeCors: process.env.STORE_CORS!,adminCors: process.env.ADMIN_CORS!,authCors: process.env.AUTH_CORS!,jwtSecret: process.env.JWT_SECRET || "supersecret",cookieSecret: process.env.COOKIE_SECRET || "supersecret",},},plugins: [{resolve: "@easypayment/medusa-paypal",options: {},},],modules: [{resolve: "@medusajs/medusa/payment",options: {providers: [{// PayPal Smart Buttons (wallet checkout)resolve: "@easypayment/medusa-paypal/providers/paypal",id: "paypal",options: {},dependencies: ["paypal_onboarding"],},{// Advanced Card Fields (hosted card inputs)resolve: "@easypayment/medusa-paypal/providers/paypal_card",id: "paypal_card",options: {},dependencies: ["paypal_onboarding"],},],},},],})
npx medusa db:migrate
Credentials are saved automatically. Prefer manual setup? Click Insert credentials manually and paste your Client ID and Secret from developer.paypal.com.
| Provider ID | Description |
|---|---|
| PayPal Smart Buttons (wallet) | |
| Advanced Card Fields (card) |
All settings live in Medusa Admin β Settings β PayPal and apply immediately β no server restart needed.
| Tab | What you can configure |
|---|---|
| PayPal Settings | Enable/disable, button color, shape, label |
| Advanced Card Payments | Enable/disable, 3D Secure mode |
| Additional Settings | Payment action (capture / authorize), brand name, invoice prefix |
The checkout UI is shipped as a separate package β install it inside your storefront project, not in this backend.
π¦ @easypayment/medusa-paypal-ui β React components, hooks, and a drop-in payment step adapter for Next.js App Router storefronts.
See the storefront integration & testing guide β
MIT Β© Easy Payment