Skip to content

YoruAkio/OrderKuota-Wrapper

Repository files navigation

OrderKuota Node.js API Wrapper

A TypeScript-first Node.js wrapper for the OrderKuota Indonesian QRIS payment API.

Features

  • Full TypeScript Support - Complete type definitions and IDE autocomplete
  • QRIS Payment Generation - Generate QRIS Ajaib payments with QR codes
  • Authentication Flow - OTP-based login with token management
  • Transaction History - Fetch and filter QRIS transaction records
  • Balance Checking - Check account and QRIS balances
  • QR Code Generation - Convert QRIS strings to base64 QR images

Installation

npm install orderkuota

Quick Start

import OrderKuota from 'orderkuota';

const client = new OrderKuota({
  username: 'your-username',
  password: 'your-password'
});

// Request OTP
const otp = await client.getOTP();
console.log('OTP sent to:', otp.email);

// Get authentication token
const token = await client.getToken('123456');

// Generate QRIS payment
const payment = await client.generateQRISAjaib(10000);
const qrString = payment.qris_ajaib.results.qr_string;

// Generate QR code image
const qrImage = await client.generateQRImage(qrString);

TypeScript Usage

import OrderKuota, { OrderKuotaConfig, OrderKuotaError } from 'orderkuota';

const config: OrderKuotaConfig = {
  username: 'your-username',
  password: 'your-password'
};

const client = new OrderKuota(config);

try {
  const payment = await client.generateQRISAjaib(25000);
  // Full type safety and IDE autocomplete
} catch (error) {
  if (error instanceof OrderKuotaError) {
    console.error(`Error [${error.code}]:`, error.message);
  }
}

Examples

Run examples:

npm run example:js    # JavaScript example
npm run example:ts    # TypeScript example

Documentation

📚 Complete API documentation: GitHub Pages

Development

# Install dependencies
npm install

# Build project
npm run build

# Generate documentation
npm run docs:generate

License

MIT License - see LICENSE file for details.

Support


Disclaimer: This is an unofficial wrapper. Please comply with OrderKuota's terms of service.

About

📦(Package): OrderKuota API wrapper for Node.js

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •