1.0.10 • Published 7 months ago

pixjs v1.0.10

Weekly downloads
-
License
ISC
Repository
github
Last release
7 months ago

PixJS

Tool to generate “Copy and Paste” Pix payloads.

🔨 Installation

npm i pixjs
yarn add pixjs

💻 How to use

  • Copy and Paste Method
const { CopyAndPaste } = require("pixjs");

const copyAndPaste = CopyAndPaste({
  name: "Tiago Dias Laureano", // Receptor name
  key: "e015b7ed-b6bd-4c5a-bcb3-28f67559d716", // The pix key: email, phone, cpf, cnpj or randomkey
  amount: 1.0, // Amount
  city: "Rio De Janeiro", // The city name
  id: "PAGAMENTO", // Payment identifier
  type: "random", // "email" | "phone" | "cpf" | "cnpj" | "random"
});

console.log(copyAndPaste);

// Result: 00020126580014BR.GOV.BCB.PIX0136e015b7ed-b6bd-4c5a-bcb3-28f67559d71652040000530398654041.005802BR5919Tiago Dias Laureano6014Rio De Janeiro62130509PAGAMENTO63042F1D
  • Generate QRCode Image Method
const { QrCodeImage } = require("pixjs");

const copyAndPaste = QrCodeImage({
  name: "Tiago Dias Laureano", // Receptor name
  key: "e015b7ed-b6bd-4c5a-bcb3-28f67559d716", // The pix key: email, phone, cpf, cnpj or randomkey
  amount: 1.0, // Amount
  city: "Rio De Janeiro", // The city name
  id: "PAGAMENTO", // Payment identifier
  type: "random", // "email" | "phone" | "cpf" | "cnpj" | "random",
  path: "src/qr-images/", // path to save images
});

// Result: Your QRCode Image was been generated: src/qr-images/e015b7ed-b6bd-4c5a-bcb3-28f67559d716.png
  • Generate QRCode image in Terminal
const { QrCodeTerminal } = require("pixjs");

const copyAndPaste = QrCodeTerminal({
  name: "Tiago Dias Laureano", // Receptor name
  key: "e015b7ed-b6bd-4c5a-bcb3-28f67559d716", // The pix key: email, phone, cpf, cnpj or randomkey
  amount: 1.0, // Amount
  city: "Rio De Janeiro", // The city name
  id: "PAGAMENTO", // Payment identifier
  type: "random", // "email" | "phone" | "cpf" | "cnpj" | "random",
});

console.log(copyAndPaste);

// Result: Show qrcode in terminal.

✅Supported methods

  • Email (email@email.com)
  • CPF (999.999.999-99) or (99999999999)
  • CNPJ (99.999.999/9999-99) or (99999999999999)
  • Phone (+552199999-9999) or (21999999999)
  • Random Keys (e015b7ed-b6bd-4c5a-bcb3-28f67559d716)

🧑 Authors

Tiago Dias Laureano

🔍 Reference

1.0.10

7 months ago

1.0.9

7 months ago

1.0.8

7 months ago

1.0.7

7 months ago

1.0.6

7 months ago

1.0.5

7 months ago

1.0.4

7 months ago

1.0.3

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago