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".
Install the public package:
npm i pix-payload
import { payload } from "pix-payload"
const data = {
key: "devcarlosalberto@gmail.com",
name: "Carlos Alberto",
city: "Praia Grande",
amount: 150,
transactionId: "PAY123",
}
const myPayload = payload(data)
The parameters when calling the payload() function are these and must be inside an object:
key: string
name: string
city: string
amount?: number
transactionId?: string
The values accepted as pix key are listed below and must follow the formatting pattern followed by their respective example:
CPF: 12345678900
CNPJ: 00038166000105
E-mail: fulano_da_silva.recebedor@example.com
Phone: +5561912345678
Thats project has utilized following technologies: