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 |
- Medusa v2
- Node.js 18+
- PostgreSQL
In your Medusa backend directory, run:
npm install @easypayment/medusa-paypalAdd the plugin and both payment providers to your existing medusa-config.ts:
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- Start your Medusa server
- Open Medusa Admin → Settings → PayPal → PayPal Connection
- Choose Sandbox (testing) or Live (production)
- Click Connect to PayPal and complete the onboarding flow
Credentials are saved automatically. Prefer manual setup? Click Insert credentials manually and paste your Client ID and Secret from developer.paypal.com.
- Go to Medusa Admin → Settings → Regions → [your region]
- Under Payment Providers, enable:
| Provider ID | Description |
|---|---|
pp_paypal_paypal |
PayPal Smart Buttons (wallet) |
pp_paypal_card_paypal_card |
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