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

@gerbergpt/medusa-fulfillment-4px

v1.0.1

Published

4PX fulfillment service for Medusa V2

Downloads

8

Readme

Compatibility

This plugin is compatible with versions >= 2.11.x of @medusajs/medusa.

Table of Contents

Prerequisites

  • Node.js v20 or higher
  • Medusa server v2.11.3 or higher
  • Get your own API Key and API Secret from 4PX API
    • Note: To use this plugin with the 4PX API, you must have registered your 4PX account as a merchant. Developer or other service-provider account types are not supported.

Installation

yarn add @gerbergpt/medusa-fulfillment-sfexpress

Configuration

Add the provider module in your medusa-config.ts file:

module.exports = defineConfig({
  projectConfig: {
    // ...
  },
  modules: [
    // ... other modules
    {
      key: Modules.FULFILLMENT,
      resolve: "@medusajs/fulfillment",
      options: {
        providers: [
          {
            id: "4px",
            resolve: "@gerbergpt/medusa-fulfillment-4px/providers/fulfillment-4px",
            options: {
              api_key: process.env.FOURPX_API_KEY,
              api_secret: process.env.FOURPX_API_SECRET,
              sandbox: process.env.FOURPX_ENV === "sandbox",
              //source_country_code: 'CN',
              //language: 'en',
              //default_transport_mode: 2
            },
          },
        ],
      },
    },
  ],
  ...,
  plugins: [
    {
      resolve: "@gerbergpt/medusa-fulfillment-4px",
      options: {},
    },
  ],
})

Environment Variables

Create or update your .env file with the following variables:

FOURPX_API_KEY=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
FOURPX_API_SECRET=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
FOURPX_ENV="sandbox | production"

Development

The following steps guide you through setting up the plugin locally using yalc, a tool that allows you to publish local packages and test them in other projects without pushing them to a registry.

  1. Prepare the plugin for local development Install dependencies, build the project, and publish it to your local yalc store:
yarn install
yarn run build
yarn run publish
  1. Navigate to your Medusa backend application and install the plugin:
npx medusa plugin:add @gerbergpt/medusa-fulfillment-4px
  1. After installation, you should see an entry pointing to the local yalc package:
"dependencies": {
  ...,
  "@gerbergpt/medusa-fulfillment-4px": "file:.yalc/@gerbergpt/medusa-fulfillment-4px",
  ...
}
  1. Follow the steps in the configuration section
  2. You can now begin development by running the yarn run dev command. The Medusa backend server will automatically restart whenever you make changes to this plugin.
  3. When you have completed development and testing, remove the local published yalc package:
yalc remove  @gerbergpt/medusa-fulfillment-4px