/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".

Primary LanguageTypeScript

Package Pix Payload

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".

🔧 Installation

Install the public package:

npm i pix-payload

👨‍💻 How To Use

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

🕹️ Functions

  • Create payload PIX

🚀 Technologies

Thats project has utilized following technologies:

  • Typescript

🔗 Links

portfolio linkedin

Authors