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

strapi-plugin-paddle-webhook

v1.0.0-beta.1

Published

Paddle payment provider webhook plugin for Strapi headless CMS

Readme

Strapi plugin strapi-plugin-paddle-webhook

Plugin to handle Paddle's webhook alerts.

How it works


The plugin verifies and stores Paddle's webhook alerts and events in a customizable form. The verification process is based on the official Paddle documentation.

After a webhook call has been verified, the plugin optionally (for more info see the customization part) stores the payload to the database and responds with HTTP 200 to Paddle.

Data model

The plugin stores the payload in the following format:

| attribute | description | required | comment | | |-----------|-----------------------|----------|-------------------------------------------------|---| | user | Strapi user reference | false | if there is a user with the given email address | | | eventTime | Paddle event_time | true | | | | email | Paddle order email | false | | | | alertId | Paddle alert_id | true | | | | alertName | Paddle alert_name | true | on fulfillment call the value will be "fulfillment" | | | passthrough | Paddle passthrough | true | | | | payload | Full alert payload | true | | |

How to install


I. Install

  1. Under the root folder of your project run

NPM:

npm install strapi-plugin-paddle-webhook --save

YARN:

yarn add strapi-plugin-paddle-webhook

II. Configure

The verification process uses a public key provided by Paddle, which has been loaded during the startup. If the plugin is unable to load the key file, strapi won't start.

Plugin Configuration:

  1. Download your private key from Paddle dashboard / Developer Tools / Public key
  2. Save it to a file name paddle_public.key and move to the strapi config folder
  3. Create a plugins.js file (if not exists) under the config folder and set the public key's path:
    module.exports = {
      'strapi-plugin-paddle-webhook': {
        publicKeyPath: './config/paddle_public.key'
      }
    }

III. Set the API permissions

  1. Run strapi strapi develop
  2. Enable public access for the endpoint under Settings/Roles/Public alt text
  3. The webhook endpoint is listening at: http://localhost:1337/paddle-webhook/webhook (POST)
  4. After deploying strapi to your external server, you have to configure Paddle to use the webhook URL. Go to Paddle Dashboard, and under Developer Tools/Alerts / Webhooks and set the public endpoint under the URL for receiving webhook alerts field.
  5. The fulfillment endpoints must be set for each product separately, if you have active products you have to update them and use the same URL: http://localhost:1337/paddle-webhook/webhook.

IV. Testing

To test the endpoint in a local environment:

  1. install ngrok
  2. in a terminal run ngrok http 1337
  3. Login to Paddle and go to Developer Tools/Alerts / Webhooks and select Webhook Simulator
  4. Set the test URL provided by ngrok in the following format: {ngrok public URL}/paddle-webhook/webhook
  5. Test the webhook

Customizing the workflow


When an alert has been received from Paddle the plugin saves it into the database (Paddle order model) but in most cases saving the data is not enough, you have to do some additional logic (update the user, for example). You have two options to do this:

  • create lifecycle hooks on the PaddleOrder model
  • implement the plugins afterVerified method

1. Overwriting the model lifecycles

You can do this by overwriting the PaddleOrder model lifecycles (see more info in the Strapi documentation)

  1. create paddle-webhook/models folder under the extensions folder
  2. add PaddleOrder.js
  3. crate the lifecycle hooks, for example
    module.exports = {
      lifecycles: {
        async afterCreate(data) {
          console.log('paddle order created');
          console.log(JSON.stringify(data));
          // do something with the data
        }
      }
    };

2. Overwriting the service afterVerified method

The plugins service has a method called afterVerified.

  /**
   * Called after successful verification.
   *
   * @return whether a PaddleOrder item should be created
   */
  async afterVerified(_payload: any): Promise<boolean> {
    // do something with the data
    return true;
  }

The method has been called after every successful verification whit the payload as an argument. The method should return a boolean, which decides whether the data should be saved to the database or not.