QRCode Estático
QR codes estáticos são códigos fixos e reutilizáveis que permitem o envio de pagamentos para uma chave PIX específica.
Criar um QRCode estático
Para criar um QRCode estático, você pode usar a função createStatic
.
Parâmetros
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; } | - |
Métodos do QRCode estático
Prop | Type | Default |
---|---|---|
toBase64 | () => Promise<string> | - |
toDataUrl | () => Promise<string> | - |
type | PixQrCodeType | - |
keyType | PixKeyType | - |
Criar uma imagem QRCode
Para criar uma imagem QRCode, você pode usar o método toDataUrl
:
Verificar se uma string é um QRCode estático
Use a função isStaticPix
para verificar se uma string é um QRCode estático: