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

pakasir

v1.0.0

Published

A lightweight and easy-to-use unofficial Node.js client module for communicating with the Pakasir payment gateway.

Readme

Pakasir

Modul klien Node.js yang ringan dan mudah digunakan untuk berkomunikasi dengan payment gateway Pakasir.

NPM Version License Github Stars

📖 Deskripsi

Pakasir Client SDK adalah SDK JavaScript/TypeScript yang menyediakan interface yang bersih dan mudah digunakan untuk mengintegrasikan payment gateway Pakasir ke dalam aplikasi Node.js Anda. Library ini mendukung berbagai metode pembayaran termasuk QRIS, Virtual Account dari berbagai bank, dan PayPal.

✨ Fitur

  • Autentikasi Aman - Manajemen API key yang aman
  • Multiple Payment Methods - Mendukung QRIS, Virtual Account (berbagai bank), dan PayPal
  • TypeScript Support - Fully typed dengan dokumentasi yang lengkap
  • Simple API - Interface yang intuitif dan mudah digunakan
  • Dual Package - Mendukung ESM dan CommonJS
  • Zero Dependencies - Tidak ada runtime dependencies

📦 Instalasi

npm install pakasir

atau dengan yarn:

yarn add pakasir

atau dengan pnpm:

pnpm add pakasir

atau dengan bun:

bun add pakasir

🚀 Quick Start

ESM (ES Modules)

import { Pakasir } from 'pakasir';

const pakasir = new Pakasir({
  project: 'your-project-slug',
  api_key: 'your-api-key'
});

// Buat transaksi baru
const transaction = await pakasir.createTransaction(
  'order-123',      // Order ID
  'QRIS',           // Metode pembayaran
  50000,            // Jumlah (dalam rupiah)
  true,             // Tampilkan QRIS langsung (optional)
  'https://...'     // Redirect URL (optional)
);

console.log('Payment URL:', transaction.payment.payment_url);

CommonJS

const { Pakasir } = require('pakasir');

const pakasir = new Pakasir({
  project: 'your-project-slug',
  api_key: 'your-api-key'
});

// Gunakan dengan .then() atau async/await
pakasir.createTransaction('order-123', 'QRIS', 50000)
  .then(transaction => {
    console.log('Payment URL:', transaction.payment.payment_url);
  })
  .catch(error => {
    console.error('Error:', error.message);
  });

📚 Metode Pembayaran yang Didukung

Library ini mendukung metode pembayaran berikut:

  • ALL - Semua metode pembayaran yang tersedia
  • QRIS - Quick Response Code Indonesian Standard
  • CLIMB_NIAGA_VA - CIMB Niaga Virtual Account
  • BNI_VA - Bank BNI Virtual Account
  • SAMPOERNA_VA - Bank Sampoerna Virtual Account
  • BNC_VA - BNC Virtual Account
  • MAYBANK_VA - Maybank Virtual Account
  • PERMATA_VA - Bank Permata Virtual Account
  • ATM_BERSAMA_VA - ATM Bersama Virtual Account
  • ARTHA_GRAHA_VA - Bank Artha Graha Virtual Account
  • BRI_VA - Bank BRI Virtual Account
  • PAYPAL - PayPal

🔑 Mendapatkan Kredensial

  1. Daftar atau login ke Pakasir Dashboard
  2. Buat project baru atau pilih project yang sudah ada
  3. Salin Project Slug dan API Key dari dashboard
  4. Gunakan kredensial tersebut untuk menginisialisasi client

💡 Contoh Penggunaan

Membuat Transaksi

const transaction = await pakasir.createTransaction(
  'order-' + Date.now(),
  'QRIS',
  50000,
  true,
  'https://mywebsite.com/payment/callback'
);

console.log('Order ID:', transaction.order_id);
console.log('Amount:', transaction.amount);
console.log('Fee:', transaction.payment.fee);
console.log('Total Payment:', transaction.payment.total_payment);
console.log('Payment URL:', transaction.payment.payment_url);
console.log('Expires at:', transaction.payment.expired_at);

Mengecek Status Transaksi

const details = await pakasir.getTransactionDetail('order-123', 50000);

console.log('Status:', details.transaction.status);
console.log('Completed at:', details.transaction.completed_at);

Membatalkan Transaksi

const result = await pakasir.cancelTransaction('order-123', 50000);

console.log('Canceled:', result.success);

Simulasi Pembayaran (untuk Testing)

// Hanya tersedia di sandbox/test environment
const result = await pakasir.simulatePayment('order-123', 50000);

console.log('Simulation success:', result.success);

Error Handling

try {
  const transaction = await pakasir.createTransaction(
    'order-123',
    'QRIS',
    50000
  );
} catch (error) {
  if (error.message.includes('Failed to create transaction')) {
    console.error('Gagal membuat transaksi:', error.message);
  } else {
    console.error('Error:', error.message);
  }
}

📖 API Reference

Untuk dokumentasi lengkap tentang semua method, parameter, dan return types, silakan lihat API_REFERENCE.md.

🤝 Contributing

Kami sangat menghargai kontribusi dari komunitas! Silakan baca CONTRIBUTING.md untuk panduan lengkap tentang cara berkontribusi.

📝 License

Proyek ini dilisensikan di bawah MIT License.

🙏 Acknowledgments

  • Library ini merupakan unofficial SDK untuk Pakasir
  • Terima kasih kepada semua kontributor yang telah membantu mengembangkan library ini

📞 Support

Jika Anda menemukan bug atau memiliki pertanyaan:

⚠️ Disclaimer

Ini adalah library tidak resmi dan tidak terafiliasi dengan Pakasir. Gunakan dengan risiko Anda sendiri dan pastikan untuk mengikuti terms of service dari Pakasir.


Dibuat dengan ❤️ oleh gtpshax