Static QRCode
Static QR codes are fixed, reusable codes that enable payments to be sent to a specific PIX key.
Create a static QRCode
To create a static QRCode, you can use the createStatic
function.
Parameters
Prop | Type | Default |
---|---|---|
merchantAccountInfo | { gui?: string | undefined; key: string; merchantAdditionalInfo?: string | undefined; fss?: string | undefined; } | - |
value | number | - |
merchantCategoryCode | string | - |
transactionCurrency | string | - |
countryCode | string | - |
merchantName | string | - |
merchantCity | string | - |
additionalData | { txId?: string | undefined; } | - |
postalCode | string | - |
unreservedTemplate | { gui?: string | undefined; url?: string | undefined; } | - |
Static QRCode methods
Prop | Type | Default |
---|---|---|
toBase64 | () => Promise<string> | - |
toDataUrl | () => Promise<string> | - |
type | PixQrCodeType | - |
keyType | PixKeyType | - |
Create a QRCode image
To create a QRCode image, you can use the toDataUrl
method:
Verify wheather a string is a static QRCode
Use the isStaticPix
function to verify whether a string is a static QRCode: