@gorgo/medusa-payment-paypal
v2.1.0
Published
PayPal payment provider for Medusa
Maintainers
Readme
Plugin Features
- Full Integration with PayPal: Connect your store to PayPal for secure and reliable payments.
- One-Step & Two-Step Payments: Autocapture or authorization/hold payment flows.
- Refunds & Cancellations: Full refund and order cancellation support.
- Webhook Notifications: Real-time payment status updates with signature verification.
- Express Checkout: A PayPal button for the storefront. The buyer pays without filling in the checkout form, the address comes from their PayPal account, and the shipping cost updates for it.
- Detailed Logging: Request and response logs for debugging and support in development mode.
- Full Test Coverage: Comprehensive unit and integration tests covering core flows and edge cases.
- Storefront Example: A complete Next.js storefront ready to use as a reference.
- Integration module : Configure this plugin directly in the Medusa Admin application – no editing configuration files or redeploying the store.
Integration Module: This plugin supports the Integration module, which lets store administrators configure it directly in the Medusa Admin application instead of editing configuration files and redeploying the store. Sensitive values are encrypted, and settings are validated before they take effect.
What is PayPal
With PayPal, the buyer pays with an account that holds their cards and bank accounts, so the store never handles card details. PayPal accepts payments in 25 currencies.
💬 Support & Community
Got questions or ideas about the plugin? Join the Telegram support chat, @gorgojs_chat.
Connect with other Medusa developers on Telegram in @medusajs_chat.
The Maintenance page explains how we test, update and fix the plugin.
Requirements
- Medusa v2.21.0 or later
- Node.js v22.23.4, v24.22.1, v26.12.1 or later
- A PayPal Business account and an app in the PayPal Developer Dashboard
- Integration Module
Installation
yarn add @gorgo/medusa-integration @gorgo/medusa-payment-paypal
# or
npm install @gorgo/medusa-integration @gorgo/medusa-payment-paypalConfiguration
Register the plugin and the Integration Module in medusa-config.ts:
const PAYPAL_INTEGRATION_ID = "paypal-1"
module.exports = defineConfig({
plugins: [
{
resolve: "@gorgo/medusa-integration",
options: {
encryptionKey: process.env.INTEGRATION_ENCRYPTION_KEY,
providers: [
{
resolve: "@gorgo/medusa-payment-paypal/providers/integration-paypal",
id: PAYPAL_INTEGRATION_ID,
options: {},
},
],
},
},
{
resolve: "@gorgo/medusa-payment-paypal",
options: {},
},
],
modules: [
{
resolve: "@medusajs/medusa/payment",
options: {
providers: [
{
resolve: "@gorgo/medusa-payment-paypal/providers/payment-paypal",
id: "paypal",
options: { id: PAYPAL_INTEGRATION_ID },
},
],
},
},
],
})Set INTEGRATION_ENCRYPTION_KEY to a long random string, for example the output of openssl rand -hex 32. The Integration Module derives the key that encrypts secret settings, such as API keys, from it.
Then restart the server and configure the integration in Medusa Admin under Settings → Integrations → PayPal.
Documentation
The complete installation, configuration, and usage guide for this plugin is available on the Gorgo documentation website.
License
Licensed under the MIT License.
