Generate a Swish QR code
$ npm install swish-qr
const swishQr = require('swish-qr');
swishQr({
amount: 100,
lock: ['amount', 'number'],
message: 'Lorem ipsum',
number: '0701234567'
}).then(result => {
console.log(result);
//=> 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAL...'
});
Returns a Promise
resolving in to a base64
string.
Returns a base64
string.
Returns a formatted string that's used to create the QR code.
Required
Type: Object
Type: float
Default: 0
The amount of money to send.
Type: Array
Default: []
Lock fields in the Swish application from user input.
Type: string
Default: ''
Define a message to send.
Type: string
Default: ''
The recipient.
- swish-qr-cli - CLI for this module.
MIT © gillstrom