An EPC-QR-Code is a data set standardized by the European Payments Council that contains all the data for a SEPA transfer and is machine-readable using QR coding.
NPM package: @dipser/epc-qr-code.js
npm i @dipser/epc-qr-code.js
Minimal example:
<script type="module">
import { girocode } from "@dipser/epc-qr-code.js";
var g = girocode({
'iban': 'DE02100100100006820101',
'bic': 'PBNKDEFF',
'name': 'Max Muster',
'amount': '10.00',
'reason': 'Invoice X',
});
g.svg()
// g.svg_data_url()
</script>
Complete example:
<script type="module">
import { girocode } from "@dipser/epc-qr-code.js";
var g = girocode({
'service': 'BCD', // Service Tag
'version': '001', // Version: 001, 002
'encoding': '2', // Character set: 1 = UTF-8, 2 = ISO 8859-1
'transfer': 'SCT', // Identification: SCT = SEPA credit transfer
'bic': 'PBNKDEFF', // BIC
'name': 'Max Muster', // Name of the beneficiary
'iban': 'DE02100100100006820101', // IBAN
'currency': 'EUR',
'amount': '10.00', // Amount (Format „#.##“)
'char': '', // Zweck (vierstelliger Buchstabencode, optional)
'ref': '', // Reference (strukturierter 35-Zeichen-Code gem. ISO 11649 RF Creditor Reference)
'reason': '', // Verwendungszweck (max of 140 characters)
'hint': '', // Optional hint to user
});
g.svg() // or g.svg_data_url()
</script>