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

moonezpay

v1.0.2

Published

SDK oficial para integração com a API MoonezPay

Readme

MoonezPay SDK

O SDK da MoonezPay é uma biblioteca moderna e eficiente para integração com a plataforma MoonezPay, desenvolvida para facilitar operações financeiras e oferecer uma experiência rápida, segura e descomplicada em projetos Node.js.

Perfeito para desenvolvedores que buscam agilidade na implementação de pagamentos, gestão financeira automatizada e redução de complexidade no código.

🎯 Por que usar o MoonezPay SDK?

  • Integração rápida e sem complicações
  • API moderna e bem documentada
  • Gerenciamento automático de autenticação
  • Ideal para e-commerce, marketplaces e fintech
  • Suporte completo a TypeScript

📦 Instalação

npm install moonezpay

🔐 Importar e Configurar

import MoonezPay from 'moonezpay'

const moonezpay = new MoonezPay({
  client_id: 'SEU_CLIENT_ID',
  client_secret: 'SEU_CLIENT_SECRET'
})

💳 Gerar Cobrança PIX (Cash In)

Crie cobranças via PIX e receba pagamentos instantâneos com QR Code.

const cobranca = await moonezpay.pix.cashIn({
  amount: 150.00,
  external_id: 'venda-98765',
  postbackUrl: 'https://seudominio.com.br/webhook',
  payerQuestion: 'Compra de produto XYZ',
  payer: {
    name: 'Carlos Mendes',
    document: '98765432100',
    email: '[email protected]'
  }
})

console.log('ID da Transação:', cobranca.transactionId)
console.log('QR Code PIX:', cobranca.qrcode)
console.log('Status:', cobranca.status)

💰 Consultar Saldo da Conta

Verifique o saldo disponível em sua conta MoonezPay.

const saldo = await moonezpay.pix.balance()

console.log('Saldo Disponível:', saldo.message.balance)
console.log('Código de Status:', saldo.statusCode)

🚀 Realizar Transferência PIX (Cash Out)

Envie pagamentos via PIX de forma simples e segura.

const transferencia = await moonezpay.pix.cashOut({
  amount: 75.50,
  description: 'Pagamento ao fornecedor',
  external_id: 'pgto-456',
  creditParty: {
    key: '11122233344',
    keyType: 'CPF',
    name: 'Ana Paula Silva',
    taxId: '11122233344'
  }
})

console.log('Transferência realizada:', transferencia)

Tipos de chave PIX aceitos:

  • CPF
  • CNPJ
  • EMAIL
  • TELEFONE
  • CHAVE_ALEATORIA

🔄 Autenticação Automática

O SDK gerencia toda a autenticação de forma transparente. O token de acesso é obtido automaticamente e renovado quando necessário, sem intervenção manual.


⚠️ Tratamento de Erros

try {
  const resultado = await moonezpay.pix.cashIn({
    amount: 200.00,
    external_id: 'pedido-999',
    postbackUrl: 'https://seudominio.com.br/webhook',
    payerQuestion: 'Pagamento do pedido 999',
    payer: {
      name: 'Roberto Santos',
      document: '55544433322',
      email: '[email protected]'
    }
  })
  
  console.log('Operação bem-sucedida:', resultado)
} catch (erro) {
  console.error('Mensagem de erro:', erro.message)
  console.error('Código HTTP:', erro.statusCode)
}

📝 Licença

MIT