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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

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


Languages

Language:TypeScript 100.0%