GitHunt
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 test

Output:

โœ“ 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 Indicator
  • 01: Point of Initiation Method
  • 26-51: Merchant Account Info (ID specific)
  • 52: Merchant Category Code
  • 53: Transaction Currency
  • 54: Transaction Amount
  • 58-61: Country, Merchant Info
  • 62: Additional Data (Invoice, Description)
  • 63: CRC Checksum

๐Ÿ“„ License

MIT License ยฉ 2025 NeaByteLab

NeaByteLab/QRIS-Utils | GitHunt