tokopay
v0.0.3
Published
tokopay client library for Node Js
Downloads
151
Maintainers
Readme
Tokopay Client for Node Js
This library is the abstraction of tokopay API for access from applications written with server-side Javascript.
Instalasi
npm install tokopay
atau
yarn add tokopay
Penggunaan
Dapatkan Merchant ID dan Secret Key Anda di tokopay Dashboard.
const tokopay = require('tokopay');
const client = new tokopay("YOUR MERCHANT ID","YOUR SECRET");
Informasi Akun
const createOrder = await client.info();
Membuat Simple Order
const createOrder = await client.simpleOrder(refId, metode, nominal);
Note: RefID adalah kode transaksi unik kamu yang di generate secara acak Metode adalah Kode dari Metode Pembayaran, Bisa dilihat di Docs Tokopay.
Tarik Saldo
const createOrder = await client.tarikSaldo(nominal);