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

@agungjsp/qris-dinamis

v1.0.7

Published

Make static QRIS to dynamic QRIS

Readme

QRIS Dinamis

Convert static QRIS (Quick Response Code Indonesian Standard) to dynamic QRIS with payment amounts.

npm version License: MIT Security

Features

  • ✅ Convert static QRIS to dynamic QRIS with embedded amounts
  • ✅ Generate QR code images with customizable templates
  • ✅ Support for both CommonJS and ES Modules
  • ✅ Base64 output option for web applications
  • ✅ Fee calculation (percentage or fixed amount)
  • ✅ Custom output paths
  • ✅ Zero security vulnerabilities
  • ✅ Built-in CRC16 validation

Installation

npm i @agungjsp/qris-dinamis

Note: This is an improved fork of the original qris-dinamis package with security fixes and ES Module support.

Import Module

// CommonJS
const qrisDinamis = require('@agungjsp/qris-dinamis');

// ES Modules (both syntaxes supported)
import qrisDinamis from '@agungjsp/qris-dinamis';
import { makeString, makeFile } from '@agungjsp/qris-dinamis';

Usage

Generate Dynamic QRIS String

const qris = '00020101021126570011ID1234567890123456789012340303UMI51440014ID.CO.QRIS.WWW0215ID20232108123456780303UMI520454995802ID5914MERCHANT NAME6007Jakarta61051234662070703A016304ABCD';
const result = qrisDinamis.makeString(qris, { nominal: '5000' });
console.log(result); // Returns modified QRIS string with embedded amount

Generate QR Code Image

const qris = '00020101021126570011ID1234567890123456789012340303UMI51440014ID.CO.QRIS.WWW0215ID20232108123456780303UMI520454995802ID5914MERCHANT NAME6007Jakarta61051234662070703A016304ABCD';

// Basic usage - saves to output/ directory
const result = await qrisDinamis.makeFile(qris, { nominal: '5000' });

// Base64 output for web applications  
const base64 = await qrisDinamis.makeFile(qris, { 
  nominal: '5000', 
  base64: true 
});

// Custom output path
const result = await qrisDinamis.makeFile(qris, { 
  nominal: '5000', 
  path: 'custom/path/qris.jpg' 
});

// With fee calculation
const result = await qrisDinamis.makeFile(qris, { 
  nominal: '5000',
  fee: '500',
  taxtype: 'r' // 'r' for rupiah, 'p' for percent
});

// Browser usage (returns QR code data URL)
const qrDataURL = await qrisDinamis.makeFile(qris, { 
  nominal: '5000',
  base64: true // Required in browser environments
});
// Note: Browser version returns a simple QR code without template overlay

API Reference

makeString(qris, options)

Converts static QRIS string to dynamic QRIS string.

Parameters:

| Param | Type | Required | Default | Description | |-----------|--------|----------|---------|-------------| | qris | string | ✅ | - | Static QRIS string | | nominal | string | ✅ | - | Payment amount | | taxtype | string | ❌ | 'p' | Tax type: 'r' (rupiah) or 'p' (percent) | | fee | string | ❌ | '0' | Fee amount |

Returns: string - Dynamic QRIS string

makeFile(qris, options)

Generates QR code image from dynamic QRIS.

Parameters:

| Param | Type | Required | Default | Description | |---------------|---------|----------|---------|-------------| | qris | string | ✅ | - | Static QRIS string | | nominal | string | ✅ | - | Payment amount | | base64 | boolean | ❌ | false | Return base64 string instead of file | | path | string | ❌ | auto | Custom output path (Node.js only) | | templatePath| string | ❌ | 'assets/template.png' | Custom template image path | | taxtype | string | ❌ | 'p' | Tax type: 'r' (rupiah) or 'p' (percent) | | fee | string | ❌ | '0' | Fee amount |

Returns: Promise<string> - File path (Node.js), base64 string (Node.js), or data URL (Browser)

Error Handling

try {
  const result = qrisDinamis.makeString(qris, { nominal: '5000' });
} catch (error) {
  if (error.message.includes('required')) {
    console.log('Missing required parameter');
  }
}

try {
  const result = await qrisDinamis.makeFile(qris, { nominal: '5000' });
} catch (error) {
  console.log('File generation failed:', error.message);
}

Requirements

  • Node.js >= 12.0.0 (for full template functionality)
  • Modern browser with ES6 support (for browser usage)
  • The output/ directory will be created automatically if it doesn't exist

Browser vs Node.js Differences

| Feature | Node.js | Browser | |---------|---------|---------| | Template overlay | ✅ Full template with fonts | ❌ Simple QR only | | File output | ✅ Supported | ❌ Not supported | | Base64/Data URL | ✅ Supported | ✅ Supported | | Custom fonts | ✅ Supported | ❌ Not supported |

What's New

🚀 Latest improvements include browser compatibility fixes, security updates, and enhanced error handling.

👉 See full changelog: GitHub Releases

Security

This package has zero security vulnerabilities and uses the latest secure versions of all dependencies.

License

MIT © Rachma Azis

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Support