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

@jesehl/dragonpay-sdk

v1.0.0

Published

SDK for easy integration with Dragonpay payment services

Readme

Dragonpay SDK - Minimal Guide 🐉

Install

npm install @dragonpay/sdk

Usage

Create Payment Link

const { DragonpaySDK } = require('@dragonpay/sdk');

const dp = new DragonpaySDK({
  merchantId: 'YOUR_ID',
  secretKey: 'YOUR_KEY',
  environment: 'test'
});

// Create payment
dp.createInvoice({
  amount: 1000,
  currency: 'PHP',
  description: 'Test item',
  email: '[email protected]',
  txnId: 'ORDER-123'
})
.then(result => console.log('Payment URL:', result.url))
.catch(error => console.log('Error:', error));

Check Payment Status

// Use the refNo you got from createInvoice
dp.getInvoiceStatus('REF-123')
  .then(status => console.log('Status:', status.status))
  .catch(error => console.log('Error:', error));

Payment Status Codes

  • S = Success
  • F = Failed
  • P = Pending
  • U = Unknown

Common Questions 🤔

What are the possible payment statuses?

  • S = Success (Yay! Payment received)
  • F = Failed (Something went wrong)
  • P = Pending (Still waiting for payment)
  • U = Unknown (Try checking again)
  • R = Refunded
  • K = Chargeback
  • V = Voided
  • A = Authorized

How do I go live?

  1. Test everything using environment: 'test'
  2. When ready, get your production credentials from Dragonpay
  3. Change to environment: 'production'
  4. That's it!

What currencies are supported?

Right now, only PHP (Philippine Peso) is supported.

Need Help? 🆘

  • Check Dragonpay's website: https://dragonpay.ph
  • Email them at: [email protected]
  • Or check their API docs for more details

Example Project 📝

Here's a complete example you can copy-paste:

const { DragonpaySDK } = require('@dragonpay/sdk');

// Setup
const dragonpay = new DragonpaySDK({
  merchantId: 'YOUR_MERCHANT_ID',
  secretKey: 'YOUR_SECRET_KEY',
  environment: 'test'
});

// Create a payment function
async function sellSomething() {
  try {
    // 1. Create the payment
    const payment = await dragonpay.createInvoice({
      amount: 1000,
      currency: 'PHP',
      description: 'Awesome Product',
      email: '[email protected]',
      txnId: `ORDER-${Date.now()}`  // Create unique order ID
    });

    console.log('✅ Payment Created!');
    console.log('Send this link to customer:', payment.url);
    console.log('Reference Number:', payment.refNo);

    // 2. Check its status after a while
    setTimeout(async () => {
      const status = await dragonpay.getInvoiceStatus(payment.refNo);
      console.log('Payment Status:', status.status);
    }, 5000);  // Wait 5 seconds before checking

  } catch (error) {
    console.log('❌ Error:', error.message);
  }
}

// Run it!
sellSomething();

That's all you need to know! Happy coding! 🎉