pnpm add digiflazz-sdk
# or
npm install digiflazz-sdk
# or
yarn add digiflazz-sdk
import createDigiflazzConfig from "digiflazz-sdk"
const digiflazz = createDigiflazzConfig({
username: [your digiflazz username],
key: [your digiflazz api key]
})
const amount = await digiflazz.cekSaldo(
'prepaid | pasca'
);
const priceList = await digiflazz.daftarHarga();
const deposit = await digiflazz.deposit({
amount: 'nominal',
bank: 'bank',
name: 'bank account own name'
});
const topup = await digiflazz.transaksi({
sku: 'sku',
customerNo: 'customer order number',
refId: 'reference id',
cmd: 'null | pay-pasca | inq-pasca | status-pasca | pln-subscribe'
testing: boolean
msg: 'message'
});
NOTE:
- inq-pasca: cek tagihan
- pay-pasca: bayar tagihan
- status-pasca: cek status tagihan
- pln-subscribe: cek id pln
- if the transaction isn't in seller mode dont use cmd.