devcarlosalberto / pix-payload

Published package on NPM. Use it when you need to generate a pix payload following the pix standardization rules. This payload can be transformed into a QR Code or, for example, used for PIX "copy & paste".
68 stars 1 forks source link

Error reading QRCode #1

Open filipeleonelbatista opened 10 months ago

filipeleonelbatista commented 10 months ago

I use this informations to create my pix code with value provided by on input.


const QRCode = payload({
      name: "FILIPE DE LEONEL BATISTA", 
      key: "f1bfe5be-67eb-42ad-8928-f71e02e1c99b",
      amount: comparativeValue, // 123.45
      city: "SAO PAULO", 
      transactionId: "PAGAMENTO PELO LINK",
    });

Generate the code propertly, but when i go to my bank's app, ive got a message that this code is invalid.

Tested in Itaú App and Nubank App

image

araujovicthor commented 5 months ago

Por padrão do BACEN, os caracteres aceitos para o transactionId são: A-Z, a-z, 0-9.

Ou seja, o problema é o espaço entre as palavras no parâmetro transactionId. Remova os espaços, e irá funcionar 🙂