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

medusa-hyperswitch-prism-test

v0.0.4

Published

Hyperswitch Prism payment provider for Medusa v2

Downloads

674

Readme

medusa-hyperswitch-prism

Hyperswitch Prism payment provider plugin for Medusa v2. Enables payment processing through multiple connectors — Stripe, Adyen, PayPal, GlobalPay, Braintree, Cybersource, and Mollie — via a unified Prism-powered provider.

Compatibility

| Requirement | Version | |-------------|---------| | Medusa | >= 2.15.0 | | Node.js | >= 20 | | Framework | Medusa v2 |

Installation

npm install medusa-hyperswitch-prism

Setup

1. Environment variables

# Stripe
STRIPE_API_KEY=sk_test_...

# Adyen
ADYEN_API_KEY=AQE...
ADYEN_MERCHANT_ACCOUNT=YourMerchantAccount

# PayPal
PAYPAL_CLIENT_ID=...
PAYPAL_CLIENT_SECRET=...

# GlobalPay
GLOBALPAY_APP_ID=...
GLOBALPAY_APP_KEY=...

2. Register providers in medusa-config.ts

import { defineConfig, Modules } from "@medusajs/framework/utils"

export default defineConfig({
  modules: [
    {
      key: Modules.PAYMENT,
      resolve: "@medusajs/payment",
      options: {
        providers: [
          {
            resolve: "medusa-hyperswitch-prism",
            id: "stripe",
            options: {
              connector: "stripe",
              connectorConfig: {
                apiKey: { value: process.env.STRIPE_API_KEY ?? "" },
              },
              environment: "SANDBOX",
            },
          },
          {
            resolve: "medusa-hyperswitch-prism",
            id: "adyen",
            options: {
              connector: "adyen",
              connectorConfig: {
                apiKey: { value: process.env.ADYEN_API_KEY ?? "" },
                merchantAccount: { value: process.env.ADYEN_MERCHANT_ACCOUNT ?? "" },
              },
              environment: "SANDBOX",
            },
          },
          {
            resolve: "medusa-hyperswitch-prism",
            id: "paypal",
            options: {
              connector: "paypal",
              connectorConfig: {
                clientId: { value: process.env.PAYPAL_CLIENT_ID ?? "" },
                clientSecret: { value: process.env.PAYPAL_CLIENT_SECRET ?? "" },
                // "NO_SHIPPING" (default) — hides address collection in the PayPal popup
                // "GET_FROM_FILE" — uses the shipping address already collected by the storefront
                shippingPreference: "NO_SHIPPING",
              },
              environment: "SANDBOX",
            },
          },
          {
            resolve: "medusa-hyperswitch-prism",
            id: "globalpay",
            options: {
              connector: "globalpay",
              connectorConfig: {
                appId: { value: process.env.GLOBALPAY_APP_ID ?? "" },
                appKey: { value: process.env.GLOBALPAY_APP_KEY ?? "" },
              },
              environment: "SANDBOX",
            },
          },
        ],
      },
    },
  ],
})

3. Assign providers to regions

In the Medusa Admin, assign each provider to the regions where it should be available.

4. Switch to production

Change environment per provider when going live:

environment: process.env.NODE_ENV === "production" ? "PRODUCTION" : "SANDBOX",

5. Start the backend

npx medusa develop

Plugin Options

| Option | Type | Required | Default | Description | |--------|------|----------|---------|-------------| | connector | string | Yes | — | "stripe", "adyen", "paypal", "globalpay", "braintree", "cybersource", "mollie" | | connectorConfig | object | Yes | — | Connector-specific credentials (see examples above) | | environment | string | No | "SANDBOX" | "SANDBOX" or "PRODUCTION" | | capture | boolean | No | false | Auto-capture on authorization |

Connector Credentials Reference

| Connector | Required fields in connectorConfig | |-----------|--------------------------------------| | stripe | apiKey | | adyen | apiKey, merchantAccount | | paypal | clientId, clientSecret, shippingPreference (optional) | | globalpay | appId, appKey | | braintree | publicKey, privateKey | | cybersource | apiKey, merchantAccount, apiSecret | | mollie | apiKey |

Each credential value is provided as { value: string } to support secret manager integrations.

Test Cards

Stripe

| Card Number | Expiry | CVV | |-------------|--------|-----| | 4242 4242 4242 4242 | 03/2030 | 737 |

Adyen

| Card Number | Expiry | CVV | |-------------|--------|-----| | 4111 1111 4555 1142 | 03/2030 | 737 |

GlobalPay

| Card Number | Expiry | CVV | |-------------|--------|-----| | 4263 9700 0000 5262 | 03/2030 | 737 |

PayPal

| Card Number | Expiry | CVV | |-------------|--------|-----| | 4032 0366 9170 5063 | 10/2028 | 901 |

Storefront Integration

For React/Next.js storefront integration, see the companion package medusa-hyperswitch-prism-react.

License

MIT