Docs
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
2 months ago
Github stars
2

πŸ“ 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

Medusa - Paypal