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

qris-payment

v1.0.5

Published

Package untuk generate QRIS dan cek payment status secara realtime dengan API OrderKuota

Readme

qris-payment

Node.js package untuk generate QRIS, cek status pembayaran, dan otomatis generate PDF receipt menggunakan API OrderKuota.

npm version Downloads License: MIT

Fitur

  • Generate QRIS dengan nominal tertentu
  • Tambah logo di tengah QR
  • Cek status pembayaran (realtime polling) menggunakan API OrderKuota
  • Generate PDF bukti transaksi otomatis saat pembayaran sukses

Contoh Output Receipt

Instalasi

npm install qris-payment

Penggunaan Singkat

const QRISPayment = require('qris-payment');
const fs = require('fs');

const config = {
    storeName: '#', //Nama Store Kalian
    merchant: '#', //merchatID
    auth_username: '#', //Username OrderKuota
    auth_token: '#', //Token OrderKuota
    baseQrString: '#', //StringQris
    logoPath: './logo-agin.png' //Opsional
};

const qris = new QRISPayment(config);

async function main() {
    try {
        console.log('=== TEST REALTIME QRIS PAYMENT ===\n');
        const randomAmount = Math.floor(Math.random() * 99) + 1; // Random 1-99
        const amount = 100 + randomAmount; // Base 100 + random amount
        const reference = 'REF' + Date.now();
        
        // Generate QR code
        const { qrBuffer } = await qris.generateQR(amount);
        
        // Save QR code image
        fs.writeFileSync('qr.png', qrBuffer);
        
        console.log('=== TRANSACTION DETAILS ===');
        console.log('Reference:', reference);
        console.log('Amount:', amount);
        console.log('QR Image:', 'qr.png');
        console.log('\nSilakan scan QR code dan lakukan pembayaran');
        console.log('\nMenunggu pembayaran...\n');

        // Check payment status with 5 minutes timeout
        const startTime = Date.now();
        const timeout = 5 * 60 * 1000;

        while (Date.now() - startTime < timeout) {
            const result = await qris.checkPayment(reference, amount);
            
            if (result.success && result.data.status === 'PAID') {
                console.log('✓ Pembayaran berhasil!');
                if (result.receipt) {
                    console.log('✓ Bukti transaksi:', result.receipt.filePath);
                }
                return;
            }

            await new Promise(resolve => setTimeout(resolve, 3000));
            console.log('Menunggu pembayaran...');
        }

        throw new Error('Timeout: Pembayaran tidak diterima dalam 5 menit');
        
    } catch (error) {
        console.error('Error:', error.message);
    }
}

main();

Konfigurasi API

Package ini menggunakan API OrderKuota untuk cek status pembayaran. Pastikan Anda memiliki:

  • merchant: ID merchant dari OrderKuota
  • auth_username: Username autentikasi
  • auth_token: Token autentikasi

Untuk mendapatkan kredensial API, hubungi @AutoFtBot69

FAQ

Q: Apakah receipt bisa custom logo dan nama toko?
A: Bisa, cukup atur logoPath dan storeName di config.

Q: Apakah receipt otomatis dibuat saat pembayaran sukses?
A: Ya, receipt PDF otomatis dibuat dan path-nya bisa diambil dari paymentResult.receipt.filePath.

Q: Apakah bisa polling pembayaran lebih cepat/lebih lama?
A: Bisa, atur parameter interval dan maxAttempts pada fungsi polling.

Q: Bagaimana cara mendapatkan kredensial API OrderKuota?
A: Hubungi @AutoFtBot69 untuk mendapatkan merchant ID, username, dan token autentikasi.

Kontribusi

Pull request sangat diterima!
Buka issue untuk diskusi fitur/bug sebelum submit PR.

Support

Jika ada pertanyaan, silakan buka issue di GitHub

License

MIT