apiref
promptpay-qr@0.5.0

promptpay-qr  EntryPoint

The promptpay-qr npm package provides a function to generate a PromptPay QR code that can be scanned by mobile banking apps.

Remarks

A PromptPay QR code payload format is based on the EMV QR Code specification. Specifically, the Merchant-Presented Mode is supported by this library.

This package is a CommonJS module. Import the generatePayload() function from CommonJS code like this:

const generatePayload = require('promptpay-qr')

If you use ES modules, you can use the default import syntax:

import generatePayload from 'promptpay-qr'

If you use TypeScript, make sure to set "esModuleInterop": true in the tsconfig.json file.

Functions

FunctionDescription
generatePayload(target, options)Generates a PromptPay QR payload.

Namespaces

NamespaceDescription
generatePayloadThis namespace exports the types that can be used with the generatePayload() function.