JSPM

sepa-payment-qr-code

2.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 393
  • Score
    100M100P100Q107630F
  • License ISC

Generate a QR code to initiate a SEPA bank transfer.

Package Exports

  • sepa-payment-qr-code
  • sepa-payment-qr-code/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (sepa-payment-qr-code) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

sepa-payment-qr-code

Generate a QR code to initiate a SEPA credit transfer a.k.a. bank transfer.

npm version ISC-licensed support me via GitHub Sponsors chat with me on Twitter

Installation

npm install sepa-payment-qr-code

Usage

// generate-qr-code.js
const generateQrCode = require('sepa-payment-qr-code')

const qr = generateQrCode({
    name: 'Red Cross of Belgium',
    iban: 'BE72000000001616',
    amount: 123.45,
    unstructuredReference: 'Urgency fund',
    information: 'Sample QR code'
})

process.stdout.write(qr)
node generate-qr-code.js | qrencode -t ansiutf8 -l M
# prints QR code to the terminal

This library only generates the text input to be QR-encoded. Use the library of your choice to render the QR code to PNG/SVG/React/etc.

Note the following limitations posed by European Payments Council's (EPC) Quick Response Code: Guidelines to Enable Data Capture for The Initiation of a Sepa Credit Transfer document:

2 2D Code Guidelines Definition:

  • QR code error level M (15% of code words can be restored)
  • Maximum QR code version 13, equivalent to module size 69 or 331 byte payload
  • Character sets:
    • UTF-8
    • ISO 8859-1
    • ISO 8859-2
    • ISO 8859-4
    • ISO 8859-5
    • ISO 8859-7
    • ISO 8859-10
    • ISO 8859-15

Also note that EPC QR codes are always in euros (EUR).

See also

Contributing

If you have a question or need support using sepa-payment-qr-code, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, refer to the issues page.