Skip to main content
Deno 2 is finally here 🎉️
Learn more

Deno PromptPay

Generate Thai PromptPay QR code string and Base64-encoded images in Deno.

GitHub Contributors

Getting started

import { PromptPay } from "https://deno.land/x/promptpay/mod.ts";

const promptpay = new PromptPay("0812345678", 1000);
const qrCodeString = promptpay.generate();
const base64Image = promptpay.generateBase64Data(); // Base64-encoded image
const base64Image300px = promptpay.generateBase64Data(300); // Base64-encoded image

Development

Run tests:

deno test

Dependency

  1. QR generator by denorg/qrcode

License

  • MIT © Chonchanok MueangRuangWit