Medusa plugins
P

Paypal

Alphabite's Medusa Paypal Plugin

Need customizations for this plugin?

Get in touch
npm install @alphabite/medusa-paypal
Category
payment
Built by
alphabite
Type
unknown
Last updated
4 weeks ago
Monthly downloads
461

šŸ“ PayPal Plugin for Medusa

The Alphabite PayPal Plugin integrates PayPal payment processing into your Medusa store. It handles various payment flows, including capturing payments, managing refunds, and ensuring robust error handling.


šŸ“š Table of Contents


šŸŽÆ Core Features

  • āœ… Seamless PayPal payment integration
  • šŸ”„ Handles various PayPal error states
  • šŸ’° Supports refunds directly from Medusa Admin
  • šŸ›’ Creates new order IDs for each payment attempt within the same payment intent
  • šŸ“¦ Optional inclusion of shipping and customer data in PayPal orders

🧱 Compatibility

  • Backend: Medusa v2+
  • Frontend: Framework-agnostic (integrates with PayPal's SDK)
  • Admin: Refund functionality integrated into Medusa Admin

šŸ›  Common Use Cases

  • Accepting PayPal payments for products and services
  • Managing payment captures and refunds efficiently
  • Ensuring robust payment processing with comprehensive error handling

šŸ“– Documentation

For complete documentation, visit our PayPal Plugin Documentation.



šŸ“¦ Installation

This guide walks you through installing and configuring the Alphabite PayPal Plugin in your Medusa backend.


1. Install the Plugin

Install the package via npm:

npm install @alphabite/medusa-paypal

2. Register the Plugin

Add the plugin to your or :

{
plugins: [
{
resolve: "@alphabite/medusa-paypal",
options: {
clientId: process.env.PAYPAL_CLIENT_ID,
clientSecret: process.env.PAYPAL_CLIENT_SECRET,
isSandbox: process.env.PAYPAL_IS_SANDBOX === "true",
webhookId: process.env.PAYPAL_WEBHOOK_ID,
includeShippingData: false,
includeCustomerData: false,
},
},
],
};

āš™ļø Plugin Options

The following options can be passed to the PayPal plugin in your or file:

OptionTypeDefaultDescription
Required. Your PayPal API client ID.
Required. Your PayPal API client secret.
Whether to use the PayPal Sandbox environment for testing.
Optional. Your PayPal webhook ID. If provided, enables confirmation of payment captures.
Optional. If , shipping data from the storefront order will be added to the PayPal order.
Optional. If , customer data from the storefront order will be added to the PayPal order.

āœ… Compatibility

  • Requires Medusa v2
  • Compatible with both JS and TypeScript projects

šŸš€ Next Steps

šŸ‘‰ Configuration Guide šŸ‘‰ Join our Discord Community for faster support