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

autoft-qris

v0.0.13

Published

Package untuk generate QRIS dengan 2 tema (Biru & Hijau) dan cek payment status secara realtime dengan API OrderKuota

Downloads

475

Readme

AutoFT QRIS Generator

Package Node.js untuk generate QRIS, cek status pembayaran, dan buat receipt PDF otomatis.

npm version Downloads License: MIT

Version 0.0.13 - Updated by AlfiDev

✨ Fitur Utama

  • 🎨 2 Tema QRIS: Biru (default) dan Hijau (meta style)
  • � ️ Logo Custom: Tambah logo di tengah QR code
  • Cek Pe mbayaran: Realtime monitoring status pembayaran
  • 🧾 Receipt PDF: Generate bukti transaksi otomatis
  • 💳 Cek Saldo: Monitor saldo akun API
  • Dubal Support: ESM dan CommonJS

📦 Instalasi

npm install autoft-qris

� *Quick Start

1. Setup Dasar

const { QRISGenerator, PaymentChecker, ReceiptGenerator } = require('autoft-qris');

// Konfigurasi
const config = {
    storeName: 'Toko Saya',
    auth_username: 'username_api',
    auth_token: 'token_api',
    baseQrString: 'qris_string_dari_bank',
    mutasi_url: 'https://sawargipay.net/api/mutasi', //contoh
    logoPath: './logo.png' // opsional
};

2. Generate QRIS

// Buat QR Generator
const qrisGen = new QRISGenerator(config, 'theme1');

// Generate QR untuk nominal tertentu
const amount = 50000;
const qrString = qrisGen.generateQrString(amount);
const qrImage = await qrisGen.generateQRWithLogo(qrString);

// Simpan QR code
require('fs').writeFileSync('qris.png', qrImage);
console.log('QR Code berhasil dibuat: qris.png');

3. Cek Status Pembayaran

// Setup payment checker
const paymentChecker = new PaymentChecker({
    auth_token: config.auth_token,
    auth_username: config.auth_username,
    mutasi_url: config.mutasi_url
});

// Cek pembayaran
const result = await paymentChecker.checkPaymentStatus('REF123', 50000);
if (result.success && result.data.status === 'PAID') {
    console.log('Pembayaran berhasil!');
    console.log('Jumlah:', result.data.amount);
    console.log('Tanggal:', result.data.date);
}

4. Generate Receipt

// Setup receipt generator
const receiptGen = new ReceiptGenerator(config);

// Buat receipt saat pembayaran sukses
if (result.success && result.data.status === 'PAID') {
    const receipt = await receiptGen.generateReceipt(result.data);
    console.log('Receipt dibuat:', receipt.filePath);
}

🎨 Pilihan Tema

// Tema 1 (Biru - Default)
const qrisGen1 = new QRISGenerator(config, 'theme1');

// Tema 2 (Hijau - Meta Style)
const qrisGen2 = new QRISGenerator(config, 'theme2');

// Ganti tema
qrisGen1.setTheme('theme2');

// Lihat tema yang tersedia
console.log(QRISGenerator.getAvailableThemes());

💰 Cek Saldo

const saldo = await paymentChecker.checkSaldo();
if (saldo.success) {
    console.log('Saldo Anda:', saldo.data.saldo);
}

🔄 Contoh Lengkap - Monitoring Pembayaran

const { QRISGenerator, PaymentChecker, ReceiptGenerator } = require('autoft-qris');
const fs = require('fs');

async function prosesTransaksi() {
    // Setup
    const config = {
        storeName: 'Toko Saya',
        auth_username: 'your_username',
        auth_token: 'your_token',
        baseQrString: 'your_qris_string',
        mutasi_url: 'https://sawargipay.net/api/mutasi'
    };

    const qrisGen = new QRISGenerator(config, 'theme1');
    const paymentChecker = new PaymentChecker(config);
    const receiptGen = new ReceiptGenerator(config);

    try {
        // 1. Buat QR Code
        const amount = 75000;
        const reference = 'TRX' + Date.now();
        
        const qrString = qrisGen.generateQrString(amount);
        const qrImage = await qrisGen.generateQRWithLogo(qrString);
        fs.writeFileSync('pembayaran.png', qrImage);
        
        console.log(`QR Code dibuat untuk Rp ${amount.toLocaleString()}`);
        console.log('Silakan scan QR code untuk pembayaran');
        
        // 2. Monitor pembayaran (5 menit)
        console.log('Menunggu pembayaran...');
        const startTime = Date.now();
        const timeout = 5 * 60 * 1000; // 5 menit
        
        while (Date.now() - startTime < timeout) {
            const result = await paymentChecker.checkPaymentStatus(reference, amount);
            
            if (result.success && result.data.status === 'PAID') {
                console.log('✅ Pembayaran berhasil!');
                
                // 3. Buat receipt
                const receipt = await receiptGen.generateReceipt(result.data);
                console.log('📄 Receipt:', receipt.filePath);
                
                return result.data;
            }
            
            // Tunggu 3 detik sebelum cek lagi
            await new Promise(resolve => setTimeout(resolve, 3000));
            console.log('⏳ Masih menunggu...');
        }
        
        console.log('❌ Timeout: Pembayaran tidak diterima dalam 5 menit');
        
    } catch (error) {
        console.error('Error:', error.message);
    }
}

// Jalankan
prosesTransaksi();

⚙️ Konfigurasi API

Untuk menggunakan package ini, Anda perlu:

  1. Username & Token API: Kredensial untuk akses API
  2. Base QRIS String: String QRIS dari bank Anda
  3. Mutasi URL: Endpoint API untuk cek transaksi
const config = {
    auth_username: 'username_dari_provider',
    auth_token: 'token_dari_provider', 
    baseQrString: 'qris_string_dari_bank',
    mutasi_url: 'https://sawargipay.net/api/mutasi'
};

📞 Untuk mendapatkan kredensial API, hubungi @AutoFtBot69

📋 Requirements

  • Node.js >= 20.18.3 LTS
  • Canvas support (untuk generate gambar)

🆘 FAQ

Q: Bagaimana cara mendapatkan base QRIS string?
A: Dapatkan dari bank atau payment gateway yang Anda gunakan.

Q: Apakah bisa custom logo dan nama toko?
A: Ya, atur logoPath dan storeName di konfigurasi.

Q: Berapa lama monitoring pembayaran?
A: Default 5 menit, bisa disesuaikan sesuai kebutuhan.

Q: Format receipt seperti apa?
A: PDF dengan logo, detail transaksi, dan QR code.

🤝 Contributors

  • AutoFTbot - Original author
  • AlfiDev - ESM/CommonJS support & improvements

📄 License

MIT License

🔗 Links