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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@iak-id/client_side_js_iak

v1.0.1

Published

IAK client side library for JavaScript

Downloads

4

Readme

Client Side JS - IAK

This is JavaScript client side library to help you integrate your system to Indobest Artha Kreasi / IAK and consist of two section, prepaid and postpaid

For further details please check the documentation in this link https://developer.mobilepulsa.net/documentation

Note: Please registered your DNS first in this link https://developer.mobilepulsa.net before using this library

Installation

Using npm

npm install @iak-id/client_side_js_iak

Prepaid Library

Prepaid library is used for top up transaction e.g: pulsa / phone credit, emoney credit, voucher, voucher game, etc.

Check Balance

API for checking your deposit nominal

Call check balance function with this format checkBalance(environment, username, key)

  • environment --> [required] "sandbox" or "prod"
  • username --> [required] your registered phone number in https://developer.mobilepulsa.net
  • key --> [required] your development or production secret key for Library Client JS
(async () => {
  const checkBalanceResponse = await checkBalance(
    "sandbox",
    "0818xxxxxx",
    "123xxxxxxxxxxxxxxxxx"
  );
})();

Pricelist

Call pricelist function with this format pricelist(environment, username, key, status, type, operator)

  • environment --> [required] "sandbox" or "prod"
  • username --> [required] your registered phone number in https://developer.mobilepulsa.net
  • key --> [required] your development or production secret key for Library Client JS
  • status --> [required] "all" or "active" or "non-active"
  • type --> [optional] see the list of type in this link https://developer.mobilepulsa.net/documentation --> Menu Prepaid --> Submenu Pricelist
  • operator --> [optional] see the list of operator in this link https://developer.mobilepulsa.net/documentation --> Menu Prepaid --> Submenu Pricelist

Code Example without type and operator

(async () => {
  const pricelistResponse = await pricelist(
    "sandbox",
    "0818xxxxxx",
    "123xxxxxxxxxxxxxxxxx",
    "all"
  );
})();

Code Example with type only

(async () => {
  const pricelistResponse = await pricelist(
    "sandbox",
    "0818xxxxxx",
    "123xxxxxxxxxxxxxxxxx",
    "all",
    "pulsa"
  );
})();

Code Example with type and operator

(async () => {
  const pricelistResponse = await pricelist(
    "sandbox",
    "0818xxxxxx",
    "123xxxxxxxxxxxxxxxxx",
    "all",
    "pulsa",
    "xxxxxxxx"
  );
})();

Top Up

Call top up function with this format topUp(environment, username, key, refId, customerId, productCode)

  • environment --> [required] "sandbox" or "prod"
  • username --> [required] your registered phone number in https://developer.mobilepulsa.net
  • key --> [required] your development or production secret key for Library Client JS
  • refId --> [required] your order number / reference ID (Must Unique)
  • customerId --> [required]
  • productCode --> [required] see the full list in Pricelist API

Note: If you use the same refId, we will treat it as check status API

(async () => {
  const topUpResponse = await topUp(
    "sandbox",
    "0818xxxxxx",
    "123xxxxxxxxxxxxxxxxx",
    "client-js-test-1",
    "0818xxxxxx",
    "pulsa5000"
  );
})();

Check Status

Call check status function with this format checkStatus(environment, username, key, refId)

  • environment --> [required] "sandbox" or "prod"
  • username --> [required] your registered phone number in https://developer.mobilepulsa.net
  • key --> [required] your development or production secret key for Library Client JS
  • refId --> [required] your order number / reference ID (Must Unique)
(async () => {
  const checkStatusResponse = await checkStatus(
    "sandbox",
    "0818xxxxxx",
    "123xxxxxxxxxxxxxxxxx",
    "client-js-test-1"
  );
})();

Inquiry PLN / Electricity

Call inquiry PLN function with this format inquiryPln(environment, username, key, customerId)

  • environment --> [required] "sandbox" or "prod"
  • username --> [required] your registered phone number in https://developer.mobilepulsa.net
  • key --> [required] your development or production secret key for Library Client JS
  • customerId --> [required] your subscriber id
(async () => {
  const inquiryPlnResponse = await inquiryPln(
    "sandbox",
    "0818xxxxxx",
    "123xxxxxxxxxxxxxxxxx",
    "12345678901"
  );
})();

Inquiry Game

Call inquiry game function with this format inquiryGame(environment, username, key, customerId, gameCode)

  • environment --> [required] "sandbox" or "prod"
  • username --> [required] your registered phone number in https://developer.mobilepulsa.net
  • key --> [required] your development or production secret key for Library Client JS
  • customerId --> [required] see the format customer ID for each product in this link https://developer.mobilepulsa.net/documentation --> Menu Prepaid --> Submenu Check Game ID
  • gameCode --> [required] see the list of operator in this link https://developer.mobilepulsa.net/documentation --> Menu Prepaid --> Submenu Game Server List
(async () => {
  const inquiryGameServerResponse = await inquiryGameServer(
    "sandbox",
    "0818xxxxxx",
    "123xxxxxxxxxxxxxxxxx",
    "127"
  );
})();

Inquiry Game Server List

Call inquiry game server function with this format inquiryGameServer(environment, username, key, gameCode)

  • environment --> [required] "sandbox" or "prod"
  • username --> [required] your registered phone number in https://developer.mobilepulsa.net
  • key --> [required] your development or production secret key for Library Client JS
  • gameCode --> [required] see the list of operator in this link https://developer.mobilepulsa.net/documentation --> Menu Prepaid --> Game Server List
(async () => {
  const inquiryGameServerResponse = await inquiryGameServer(
    "sandbox",
    "0818xxxxxx",
    "123xxxxxxxxxxxxxxxxx",
    "127"
  );
})();

Postpaid Library

Postpaid library is used for transaction with inquiry and payment system e.g: water bill, electricity bill, finance bill, insurance bill, etc.

Pricelist

Call pricelist postpaid function with this format pricelistPasca(environment, username, key, status, type, province)

  • environment --> [required] "sandbox" or "prod"
  • username --> [required] your registered phone number in https://developer.mobilepulsa.net
  • key --> [required] your development or production secret key for Library Client JS
  • status --> [required] "all" or "active" or "non-active"
  • type --> [optional] see the list of type in this link https://developer.mobilepulsa.net/documentation --> Menu Postpaid --> Submenu Pricelist
  • province --> [optional] send this parameter only if the type field value is pdam

Code Example without type and province

(async () => {
  const checkStatusResponse = await pricelistPasca(
    "sandbox",
    "0818xxxxxx",
    "123xxxxxxxxxxxxxxxxx"
  );
})();

Code Example with type only

(async () => {
  const checkStatusResponse = await pricelistPasca(
    "sandbox",
    "0818xxxxxx",
    "123xxxxxxxxxxxxxxxxx",
    "non-active",
    "internet"
  );
})();

Code Example with type and province

(async () => {
  const checkStatusResponse = await pricelistPasca(
    "sandbox",
    "0818xxxxxx",
    "123xxxxxxxxxxxxxxxxx",
    "all",
    "pdam",
    "jawa barat"
  );
})();

Inquiry

Call inquiry function with this format inquiry(environment, username, key, productCode, customerId, refId, month, nomor_identitas)

  • environment --> [required] "sandbox" or "prod"
  • username --> [required] your registered phone number in https://developer.mobilepulsa.net
  • key --> [required] your development or production secret key for Library Client JS
  • productCode --> [required] see the full list in Pricelist Pasca API
  • customerId --> [required]
  • refId --> [required] your order number / reference ID (Must Unique)
  • month --> [optional] you have to fill it only for BPJS product code
  • nomor_identitas --> [optional] you have to fill it only for ESAMSAT product type

Code Example

(async () => {
  const inquiryResponse = await inquiry(
    "sandbox",
    "0818xxxxxx",
    "123xxxxxxxxxxxxxxxxx",
    "PLNPOSTPAIDB",
    "530000000001",
    "client-js-postpaid-1"
  );
})();

Code Example for BPJS Product

(async () => {
  const inquiryResponse = await inquiry(
    "sandbox",
    "0818xxxxxx",
    "123xxxxxxxxxxxxxxxxx",
    "BPJS",
    "8801234560001",
    "client-js-postpaid-2",
    "2"
  );
})();

Code Example for Esamsat Product Type

(async () => {
  const inquiryResponse = await inquiry(
    "sandbox",
    "0818xxxxxx",
    "123xxxxxxxxxxxxxxxxx",
    "ESAMSAT.JAWABARAT",
    "9658548523568701",
    "client-js-postpaid-3"
    null,
    "0212502110170100"
  );
})();

Payment

Call payment function with this format payment(environment, username, key, productCode, trId)

  • environment --> [required] "sandbox" or "prod"
  • username --> [required] your registered phone number in https://developer.mobilepulsa.net
  • key --> [required] your development or production secret key for Library Client JS
  • trId --> [required] inquiry ID, you will get this in the response from Inquiry API
(async () => {
  const paymentResponse = await payment(
    "sandbox",
    "0818xxxxxx",
    "123xxxxxxxxxxxxxxxxx",
    "9898845"
  );
})();

Check Status

Call payment function with this format payment(environment, username, key, refId)

  • environment --> [required] "sandbox" or "prod"
  • username --> [required] your registered phone number in https://developer.mobilepulsa.net
  • key --> [required] your development or production secret key for Library Client JS
  • refId --> [required] your order number / reference ID (Must Unique)
(async () => {
  const checkStatusPascaResponse = await checkStatusPasca(
    "sandbox",
    "0818xxxxxx",
    "123xxxxxxxxxxxxxxxxx",
    "client-js-postpaid-4"
  );
})();