All versions since 0.1.2
0.1.2
Patch Changes
-
f3e30b9Thanks @uunw! - RedesignrenderCard()to match the official BOT/TBA “Thai QR Payment” brand guideline:- Canvas 600 × 800 (3:4 aspect, kittinan-style ratio with footer room).
- Full-width navy strip at the top (rounded top corners, flat bottom). Replaces the previous floating logo island that left gaps on either side.
- Logo centred inside the strip at 210 × 80 with vertical padding. Uses the tight content-bbox crop (viewBox
88 75 750 210) so icon + wordmark sit tight together while the strip provides the navy breathing room. - PromptPay2 sub-mark (navy color variant) is now the default for
theme: 'color'. PromptPay1 (monochrome) remains fortheme: 'silhouette'. Both pickable viapromptpayLogo: 'PromptPay1' | 'PromptPay2'. - PromptPay2 ships as an embedded PNG inside the SVG wrapper. Vectorising the wordmark produced jagged polygons; embedding the raster preserves font fidelity at every render size.
- TQR Maximum Blue (
#00427A) is the default accent, replacing the bad-vectorisation#0e3d67. Auxiliary navy shades + the iris#1ba997were unified to the brand colours throughoutThai_QR_Payment_Logo-01.svg. - QR modules render in
#000000by default for max scanner contrast, decoupled from theaccentcolour. NewqrColoroption overrides per-render. - Centre-overlay Thai QR Payment icon at 16 % of the QR width, on a white pad. Active by default for
theme: 'color'; opt out viacenterOverlay: false. - Optional merchant name + amount label stacked below the QR.
renderThaiQrPayment()one-shot helper now defaultserrorCorrectionLevelto'H'(was'M') because the centre overlay obscures ~3 % of the modules — H ECC recovers them cleanly.
No API removed.
CardOptionsgainscenterOverlayandqrColor(both optional). Callers that don’t override stay on the new defaults.
0.1.3
Patch Changes
ba9e8e8Thanks @uunw! - Point every packagehomepageat the new docs sitehttps://thai-qr-payment.js.org. Ship sourcemaps with every published bundle and keep original function + class names through minification — published code is now traceable to source and no longer trips supply-chain scanners that flag aggressive mangling.
1.0.0
Minor Changes
-
7ae8f9dThanks @uunw! - Close the feature parity gap with reference Thai QR libraries. New surface:parsePayload(payload, { strict })— opt-in strict CRC mode throws on a missing or mismatched checksum tag. Default stays backwards-compatible.- Truncated-CRC auto-fix — non-strict parses now recover payloads whose CRC was clipped to 1–3 hex chars (some Thai banking apps emit these). The parsed result exposes a
crc: { value, valid, truncated }bookkeeping field so callers can warn on the source app’s bug. - Raw tag accessors on
ParsedPayload—getTag(id)andgetTagValue(id, subId?)let callers read unknown / future TLV tags without re-parsing. The fullrawTagslist is also exposed. - TrueMoney Wallet QR —
ThaiQrPaymentBuilder.trueMoney(mobileNo, { amount, message })plus parser support for the matching wire format. UTF-16BE personal-message tag 81 round-trips throughencodePersonalMessage/decodePersonalMessage. - Slip Verify Mini-QR —
buildSlipVerify/parseSlipVerifyfor the slip-verify envelope (root tag 00, country 51, CRC tag 91 — different from a payment QR). Used by bank Open APIs to look up transactions after slip OCR. - TrueMoney Slip Verify —
buildTrueMoneySlipVerify/parseTrueMoneySlipVerify, including the lowercase-CRC quirk that TrueMoney emits. - BOT 1D Barcode —
buildBotBarcode/parseBotBarcodefor the\r-delimited counter-payment barcode scanned at bank tellers and 7-Eleven counters. Not EMVCo TLV — a separate wire format entirely.
Bundle impact: payload package 3.09 KB → 4.65 KB brotli (still inside the 5 KB budget). The
payloadFor-only entrypoint grew 2.98 → 4.48 KB because class methods aren’t tree-shaken; budget bumped 4 → 5 KB to match. -
5a5a62eThanks @uunw! - Close the second feature parity gap (vspromptpay-js). Four new wire-format surfaces:.bankAccount(bankCode, accountNo)— PromptPay credit transfer to a bank account (sub-tag 04 under tag 29). Adds'bankAccount'toPromptPayRecipientType. Parser exposes optionalbankCode+accountNoon the parsed merchant..ota(otaCode)— One-Time Authorization PromptPay credit transfer (sub-tag 05, fixed 10 chars). Builder swaps the merchant AID fromA000000677010111toA000000677010114so scanners route the payload through the single-use flow. Parser surfaces the OTA code onParsedPromptPay.ota..vatTqrc({ sellerTaxBranchId, vatRate?, vatAmount })— VAT TQRC (top-level tag 80). Turns a regular PromptPay payment QR into a Bank-of-Thailand-Tax-Qualified-QR-Code source for e-tax-receipt integrations. Parser exposesvatTqrconParsedPayload..billPayment({ ..., crossBorder: true })— cross-border bill payment (ASEAN PayNow / DuitNow / QRIS interop). Same tag-30 envelope, different AID (A000000677012006). Parser flagsParsedBillPayment.crossBorder: boolean. The 18-charpurposeOfTransactiontriple (currencyCode + localAmount + countryCode) round-trips opaquely.
Bundle impact:
@thai-qr-payment/payload4.65 → 5.37 KB brotli; sub-path entry 4.61 → 5.33 KB;payloadFor-only entry 4.48 → 5.20 KB. All three budgets bumped 5 → 6 KB to absorb the new class methods (which don’t tree-shake).
1.1.0 Latest
Minor Changes
-
948c126Thanks @uunw! - Acronym rename across the public surface. Every PascalCase identifier whose leading or trailing token was a 2–4 letter acronym (Qr,Crc,Tlv,Svg,Vat,Tqrc,Bot) now renders the acronym in all-caps to match the BoT / EMVCo / ISO spec convention and the JS native style for acronym types (URL,JSON,XMLHttpRequest).Before After ThaiQrPaymentBuilderThaiQRPaymentBuilderParsedCrcParsedCRCTlvFieldTLVFieldQrMatrixQRMatrixQrSvgOptionsQRSvgOptionsVatTqrcInputVATTQRCInputParsedVatTqrcParsedVATTQRCBotBarcodeInputBOTBarcodeInputParsedBotBarcodeParsedBOTBarcodeThaiQrPayment(React)ThaiQRPaymentThaiQrPaymentMatrix(React)ThaiQRPaymentMatrixrenderThaiQrPaymentrenderThaiQRPaymentrenderThaiQrPaymentMatrixrenderThaiQRPaymentMatrixrenderQrSvgrenderQRSvgbuildBotBarcodebuildBOTBarcodeparseBotBarcodeparseBOTBarcodeMethods on the builder (
.vatTqrc(),.bankAccount(),.ota(), …) keep camelCase per TypeScript’s standard library convention. Constants (TAG_VAT_TQRC,GUID_PROMPTPAY, …) were already SCREAMING_SNAKE. To migrate, run a single regex pass on your codebase using the table above. No behaviour or wire-format changes.