
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
node-pix-payload
Advanced tools
This library that aims to build the payload of pix payment, with this payload the developer can generate the qr code payable or pay informed the same in the bank's app.
This package that aims to build the payment pix payload, with this payload the developer can generate the qr code to pay or pay informing the same in the bank's app
Inside your project folder do:
npm i node-pix-payload
Example static
const Payload = require('node-pix-payload');
const payload_static = Payload.setPixKey('1c995784-b8a4-482a-952e-4b8cd6928216')
.setDescription('payment xyz')
.setMerchantName('IJ Solutions')
.setMerchantCity('MACEIO')
.setAmount('100.00')
.setTxid('ij123');
payload_static.getData().then((data) =>{
    console.log(data)
})
.catch(err => console.log(err));  
Example dynamic
const Payload = require('node-pix-payload');
const location = 'qrpix.seupsp.com.br/qr/v2/c-8c7193b-34cc6180be87850a-89193060-9705a6b8';
const payload = Payload.setMerchantName('IJ Solutions')
                .setMerchantCity('VICOSA')
                .setAmount('113.00')
                .setTxid('***')
                .setUrl(location)
                .setUniquePayment(true);
payload.getData().then((data) => {
    console.log(data);
}).catch(err => console.log(err))  
Possible output formats are: png and svg. format default is png.
    const location = 'qrpix.seupsp.com.br/qr/v2/c-8c7193b-34cc6180be87850a-89193060-9705a6b8';
    const payload_dynamic = Payload.setMerchantName('IJ Solutions')
                    .setMerchantCity('VICOSA')
                    .setAmount('113.00')
                    .setTxid('***')
                    .setUrl(location)
                    .setUniquePayment(true);
    const data = await payload_dynamic.getData();
    data.outPut('files/qrcode_dynamic.png');
Output svg
   const payload_static = Payload.setPixKey('1c995784-b8a4-482a-952e-4b8cd6928216')
    .setDescription('payment xyz')
    .setMerchantName('IJ Solutions')
    .setMerchantCity('MACEIO')
    .setAmount('100.00')
    .setTxid('ij123');
    const data = await payload_static.getData();
    data.outPut('files/qrcode_static.svg','svg');
FAQs
This library that aims to build the payload of pix payment, with this payload the developer can generate the qr code payable or pay informed the same in the bank's app.
We found that node-pix-payload demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.