## Syntax
```mermaid
%%{init: {
'theme': 'base',
'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
'themeVariables': {
'fontSize': '11px',
'fontFamily': 'Arial'
}
}}%%
flowchart LR
Start((START)) --> | | BARCODE_QR_EPC[BARCODE_QR_EPC]:::quoted
BARCODE_QR_EPC --> End((END))
```
## Purpose
The `BARCODE_QR_EPC` SQL function generates an image representing a QR code.
See also [[BARCODE_QR]].
Parameters:
- Length (`int32`): both width and height in pixels.
- Currency code (`varchar2`): [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
- Amount (`decimal`): amount to transfer.
- Recipient name (`varchar2`): name of recipient.
- Recipient BIC (`varchar2`): BIC of recipient.
- Recipient IBAN (`varchar2`): IBAN of recipient.
- Purpose code (`varchar2`): four characters purpose code.
- Reference (`varchar2`): unstructured reference.
- Information (`varchar2`): unstructured information.
Returns: A binary representation in PNG format of the QR code.
## Examples
The following example generates an EPC QR code of 250 by 250 pixels for a payment of EUR 100 and retrieves whether the PNG image is not empty:
```sql
select length(barcode_qr_epc(250, 'EUR', 100, 'Example Corp', 'INGBNL2A', 'NL02INGB0123456789', 'GDDS', 'Invoice 12345', 'Payment for services')) > 0
-------------------
true
```
The following example raises an error since the currency code must consist of exactly three characters:
```sql
select barcode_qr_epc(250, 'EURO', 100, 'Example Corp', 'INGBNL2A', 'NL02INGB0123456789', 'GDDS', 'Invoice 12345', 'Payment for services')
itgenqre002: The currency code must be exactly three characters.
```