ไม่มี runtime dependency
ไม่ต้องอาศัย qrcode, canvas หรือ crc16 คำสั่ง npm install thai-qr-payment ดึงมาเพียง
tarball เดียว
ไลบรารี Thai QR อื่นบน npm ส่วนใหญ่ wrap แพ็กเกจ qrcode ทำให้ผูกติดกับ API เฉพาะ Node หรือมีขนาด blob สูงถึง 30 KB ไลบรารีนี้พัฒนาด้วย TypeScript ตั้งแต่ต้นจนจบ:
ไม่มี runtime dependency
ไม่ต้องอาศัย qrcode, canvas หรือ crc16 คำสั่ง npm install thai-qr-payment ดึงมาเพียง
tarball เดียว
รองรับทุก runtime
Browsers, Node ≥ 18, Bun, Deno, Cloudflare Workers, Vercel Edge — bundle เดียวกัน
ขนาดเล็ก
Bundle เต็ม 13.6 KB brotli, sub-path เฉพาะ payload 3 KB
ครอบคลุมตามมาตรฐาน
EMVCo MPM 1.1 + Bank of Thailand supplement, ISO/IEC 18004 QR Model 2 พร้อม vitest 337 รายการ สำหรับแพ็กเกจ payload เพียงอย่างเดียว
พร้อมใช้งานกับ React
<ThaiQRPayment /> และ <ThaiQRPaymentMatrix /> รองรับ SSR โดยกำหนด React เป็น peer dependency
พร้อม CLI ในตัว
npx thai-qr-payment 0812345678 --amount 50 -o qr.svg
ครอบคลุมมากกว่า PromptPay
PromptPay แบบบัญชีธนาคาร, OTA credit transfer, TrueMoney Wallet QR, VAT TQRC, bill payment ข้ามประเทศ, Slip Verify Mini-QR และ BOT 1D barcode
import { renderThaiQRPayment } from 'thai-qr-payment';
const svg = renderThaiQRPayment({recipient: '0812345678',amount: 50,merchantName: 'Acme Coffee',amountLabel: '฿ 50.00',errorCorrectionLevel: 'H',});