npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@hectasquare/medusa-payment-paypal

v1.0.9

Published

PayPal Payment Provider for Medusa v2.13+ using the latest PayPal Server SDK with full Vault API support - Hecta Square Edition

Readme

@hectasquare/medusa-payment-paypal

A professional-grade PayPal payment provider module for Medusa v2.13+. This module facilitates seamless integration with the PayPal Orders API, supporting advanced features such as payment capture, refund management, and secure payment method vaulting.

Key Features

WORKING MEDUSA REFUND --------

  • PayPal Orders API v2 Integration: Utilizes the latest PayPal API standards for robust payment processing.
  • Automatic Payment Capture: Optimized workflows for immediate fund capture upon authorization.
  • Complete Refund Management: Integrated support for full and partial refunds with comprehensive transaction tracking.
  • Vault API Support: Securely store customer payment methods to enhance the checkout experience for returning users.
  • Webhook Synchronization: Automated handling of PayPal system events to ensure real-time data consistency.
  • Type Safety: Fully implemented in TypeScript to provide comprehensive compile-time verification.

Installation

To integrate the module into your Medusa project, install the package via your preferred package manager:

npm install @hectasquare/medusa-payment-paypal

Alternatively, using pnpm:

pnpm add @hectasquare/medusa-payment-paypal

Configuration

1. Environment Variables

Configure the required PayPal credentials in your application's .env file:

PAYPAL_CLIENT_ID=your_paypal_client_id
PAYPAL_CLIENT_SECRET=your_paypal_client_secret
PAYPAL_SANDBOX=true

Credentials can be obtained through the PayPal Developer Portal.

2. Medusa Configuration

Register the provider within your medusa-config.ts configuration file:

import { defineConfig } from '@medusajs/framework'

export const config = defineConfig({
  modules: {
    payment: [
      {
        resolve: '@hectasquare/medusa-payment-paypal',
        options: {
          isSandbox: isSandbox,
          clientId: process.env.PAYPAL_CLIENT_ID,
          clientSecret: process.env.PAYPAL_CLIENT_SECRET,
          isSandbox: process.env.PAYPAL_SANDBOX === 'true'// add PAYPAL_SANDBOX in env to true or false , variable to toggle sandbox mode
        }
      }
    ]
  }
})

Integration Workflow

  1. Selection: The customer chooses PayPal as the payment method during checkout.
  2. Order Creation: An order is initialized via the PayPal Orders API.
  3. Authorization: The customer authorizes the transaction through the PayPal interface.
  4. Capture and Verification: The system captures the payment and updates the order status in Medusa.

Configuration Parameters

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | clientId | string | Yes | The PayPal REST API Client ID. | | clientSecret | string | Yes | The PayPal REST API Client Secret. | | isSandbox | boolean | No | Enables the PayPal Sandbox environment (default: false). |

Support and Troubleshooting

For technical assistance or to report issues, please consult the documentation or visit our GitHub repository.

License

This project is licensed under the MIT License. See the LICENSE file for details.