💸 PromptPay (and EMVCo-compatible) QR Code Payload Parser and Generator
- Parses PromptPay or other EMVCo-compatible QR Code Data
- Construct TLV Tags into QR Code Data (uses to create QR Code)
- Pre-made generators for PromptPay and other Thai QR Standards (and non-standards)
import { parse } from 'promptparse'
// Example data
const ppqr = parse('000201010211...')
// Get Tag ID '00'
ppqr.getTagValue('00') // Returns '01'
import { encode, tag, withCrcTag } from 'promptparse'
// Example data
const data = [
tag('00', '01'),
tag('01', '11'),
// ...
]
// Set CRC Tag ID '63'
withCrcTag(encode(data), '63') // Retruns '000201010211...'
This project is MIT licensed (see LICENSE.md)