NE
NeaByteLab/QRIS-Utils
A minimalistic QRIS utility toolkit to generate, validate, and extract Indonesian QR code payment strings โ fully compliant with EMVCo TLV and CRC16-CCITT checksum standards.
QRIS Utility
A lightweight utility to generate, validate, and extract QRIS-compliant payment strings. Built with full support for EMVCo TLV formatting and CRC16 validation.
๐ฆ Features
- Generate dynamic QRIS with amount, invoice, and description
- Validate QRIS strings against CRC checksum
- Extract and parse readable tag values (nested TLV aware)
- Fully compatible with all static QRIS base strings
๐ฅ Installation
git clone https://github.com/NeaByteLab/QRIS-Utils.git
cd QRIS-Utils
npm install๐ Usage
const QRIS = require('./src/QRIS')
const staticBase = '00020101021126...6304' // your static QR base
// Generate dynamic QRIS string
const qris = QRIS.generate(staticBase, 10000, 'INV-001', 'Internet Package')
console.log('QRIS:', qris)
// Validate
console.log('Is Valid?', QRIS.validate(qris))
// Extract readable tags
console.log('Extracted:', QRIS.extract(qris))๐งช Testing
npm testOutput:
โ should generate a valid QRIS string with CRC
โ should validate a correct QRIS string
โ should reject an invalid QRIS string (bad CRC)
โ should extract readable tags from QRIS
โ should throw error for QRIS without 6304
๐ Project Structure
.
โโโ example.js # Sample usage
โโโ src/QRIS.js # Core utility module
โโโ test/QRIS.test.js # Jest test suite
โโโ package.json # Metadata
โโโ README.md # Documentation
๐ Supported Tags (Extract)
00: Payload Format Indicator01: Point of Initiation Method26-51: Merchant Account Info (ID specific)52: Merchant Category Code53: Transaction Currency54: Transaction Amount58-61: Country, Merchant Info62: Additional Data (Invoice, Description)63: CRC Checksum
๐ License
MIT License ยฉ 2025 NeaByteLab