npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

pixup-node-sdk

v1.0.5

Published

SDK para integração com o gateway Pixup

Readme

📦 pixup-node-sdk

SDK Node.js para facilitar a integração com o gateway de pagamentos Pixup, com suporte a autenticação via OAuth2 e geração de cobranças via Pix (QRCode dinâmico).


🚀 Instalação

npm i pixup-node-sdk

🔐 Licenciamento

Este SDK requer uma chave de licença válida para gerar cobranças Pix.

Você pode obter uma licença em:
"👉 Entre em contato via WhatsApp: https://wa.me/5548991300326"

🧰 Como usar sua licença

Adicione sua chave ao ambiente .env:

PIXUP_LICENSE_KEY=sua_chave_licenca

Ou passe diretamente no initPixup:

const context = await initPixup({
  clientId: process.env.PIXUP_CLIENT_ID,
  clientSecret: process.env.PIXUP_CLIENT_SECRET,
  licenseKey: process.env.PIXUP_LICENSE_KEY
});

💸 Planos e Licenciamento

Atualmente, o licenciamento da SDK é avaliado individualmente, com base no volume de uso e no tipo de aplicação.

Não existem planos fixos no momento.

📌 O modelo é flexível e pode incluir:

  • Cobrança por quantidade de cobranças mensais
  • Licenciamento fixo mensal para projetos estáveis
  • Condições especiais para agências ou revendedores

👉 Entre em contato via WhatsApp para avaliação e liberação de licença:
https://wa.me/5548991300326

❌ SDK sem licença

Caso a licença seja inválida ou expirada, o SDK lançará:

Erro: Licença inválida ou expirada.

⚙️ Configuração

Crie um arquivo .env com suas credenciais:

PIXUP_CLIENT_ID=seu_client_id
PIXUP_CLIENT_SECRET=seu_client_secret
PIXUP_LICENSE_KEY=sua_chave_licenca

🧱 Estrutura recomendada

// index.js
const { initPixup, PixupPix } = require('pixup-node-sdk');


const context = await initPixup({
    clientId: process.env.PIXUP_CLIENT_ID,
    clientSecret: process.env.PIXUP_CLIENT_SECRET,
    //baseUrl: process.env.PIXUP_BASE_URL || "https://api.pixupbr.com/v2",
    licenseKey: process.env.PIXUP_LICENSE_KEY || "LEXLUTHOR"
  });

  const pix = new PixupPix(context);

📤 Gerar uma cobrança Pix (QRCode)

const resposta = await pix.criarQrCode({
    amount: 59.9,
    external_id: "PEDIDO-1001",
    postbackUrl: "https://meusite.com/webhook/pixup",
    payerQuestion: "Qual o nome do produto?",
    payer: {
      name: "Fulano de Tal",
      document: "12345678900", // CPF ou CNPJ
    },
  });

  console.log("Payload (copia e cola):", resposta.qrcode);
  console.log("External ID:", resposta.external_id);
  console.log("Status inicial:", resposta.status);

🛡️ Autenticação automática com cache

O token é gerado e renovado automaticamente quando expira:


🔁 Exemplo de webhook (Pix pago)

app.post('/webhook/pixup', express.json(), (req, res) => {
  const evento = req.body;

  console.log('Pagamento recebido!', evento);

  // Exemplo: evento.status === 'CONFIRMED'

  res.sendStatus(200);
});

⚠️ A assinatura do webhook ainda não é documentada oficialmente pela Pixup, então validações adicionais podem ser implementadas no futuro.


📘 Referência de campos

| Campo | Tipo | Obrigatório | Descrição | |---------------|---------|-------------|-----------------------------------| | amount | number | ✅ | Valor da cobrança em reais | | external_id | string | ✅ | ID do pedido gerado por você | | postbackUrl | string | ✅ | URL para receber callback | | payer | object | ❌ | Dados do pagador (nome, CPF) |


📌 Roadmap

  • [x] Autenticação com cache
  • [x] Criação de QR Code
  • [ ] Webhook assinado
  • [ ] Transferências Pix (em breve)
  • [x] PixupClient unificado

🪪 Licença

MIT © LexLuthor