# tokovoucher

> Tokovoucher client library for Node Js

Latest version **1.0.7** (published 2023-04-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install tokovoucher
pnpm add tokovoucher
yarn add tokovoucher
bun add tokovoucher
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.7 |
| Published | 2023-04-16 |
| First published | 2022-09-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 7.7 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | aripadrian |
| Maintainers | aripadrian |
| Keywords | tokovoucher, client, node, js, sdk, h2h |

## Links

- npm: https://www.npmjs.com/package/tokovoucher
- Repository: https://github.com/aripadrian/tokovoucher
- Homepage: https://github.com/aripadrian/tokovoucher#readme
- Issues: https://github.com/aripadrian/tokovoucher/issues
- npm.io page: https://npm.io/package/tokovoucher

## Dependencies (4)

- [crypto](https://npm.io/package/crypto.md) ^1.0.1
- [request](https://npm.io/package/request.md) ^2.88.2
- [tokovoucher](https://npm.io/package/tokovoucher.md) ^1.0.4
- [request-promise-native](https://npm.io/package/request-promise-native.md) ^1.0.9

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.0.7 (latest) — 2023-04-16
- 1.0.6 — 2023-04-16
- 1.0.5 — 2023-04-15
- 1.0.4 — 2023-04-15
- 1.0.3-beta — 2022-09-26
- 1.0.2-beta — 2022-09-20
- 1.0.1-beta — 2022-09-20
- 1.0.0-beta — 2022-09-20

## README

[![CodeFactor](https://www.codefactor.io/repository/github/aripadrian/tokovoucher/badge)](https://www.codefactor.io/repository/github/aripadrian/tokovoucher)
[![Npm package monthly downloads](https://badgen.net/npm/dm/tokovoucher)](https://npmjs.com/package/tokovoucher)

# Tokovoucher Client for Node Js

This library is the abstraction of tokovoucher API for access from applications written with server-side Javascript.

[![NPM](https://nodei.co/npm/tokovoucher.png)](https://nodei.co/npm/tokovoucher/)


## Instalasi

```bash
npm install tokovoucher
```

atau

```bash
yarn add tokovoucher
```

## Pemakaian
Dapatkan Merchant ID dan Secret Key Anda di [Tokovoucher Dashboard](https://member.tokovoucher.id/pengaturan/secret-key).

```js
const tokovoucher = require('tokovoucher');
const client = new tokovoucher("YOUR MERCHANT ID","YOUR SECRET");
```

### Cek Saldo
```js
let saldo = await client.cekSaldo();
```

### Transaksi

```js
let trx = await client.transaksi(refId, kodeProduk, tujuan, serverId);
```

> Note:
> RefID adalah kode transaksi unik kamu yang di generate secara acak

### Cek Status Transaksi
```js
let cekStatus = await client.cekStatusTransaksi(refId);
```

> Note:
> RefID adalah kode transaksi unik kamu yang di generate secara acak


### List Kategori
```js
let kategori = await client.listKategori();
```

### List Operator
```js
let operator = await client.listOperatorByKategori(id_kategori);
```

### List Jenis
```js
let jenis = await client.listJenisByOperator(id_operator);
```

### List Produk
```js
let produk = await client.listProduk(id_operator, id_jenis);
```

### License

[MIT](https://github.com/aripadrian/tokovoucher/blob/master/LICENSE)

### Author

[Ari Padrian](mailto:aripadrian@gmail.com)

---
_Source: https://npm.io/package/tokovoucher · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
