Unofficial client library Paydisini API
This library is the abstraction of paydisini API for access from applications written with server-side Javascript.
Use the stable version:
npm install @ibnusyawall/paydisini
Then import your code using:
// using ECMAScript
import { Paydisini } from '@ibnusyawall/paydisini'
// or using CommonJS
const { Paydisini } = require('@ibnusyawall/paydisini')
Get the api key from Setting Account
const client = new Paydisini("YOUR API KEY")
Create a new transaction
const createTransaction = await client.createTransaction(options)
console.log(createTransaction) // print result
- type the params of options is object
options create transaction is available here
Checking the transaction status
const cancelTransaction = await client.cancelTransaction(options)
console.log(cancelTransaction) // print result
- type the params of options is object
options check transaction is available here
Cancel a transaction
const cancelTansaction = await client.cancelTransaction(options)
console.log(cancelTansaction) // print result
- type the params of options is object
options cancel transaction is available here
View available of the payment channel
const channels = await client.paymentChannel()
console.log(channels) // print result
View service-specific payment guidance
const paymentGuide = await client.paymentGuide(options)
console.log(paymentGuide) // print result
- type the params of options is object
options payment guide is available here
Send a POST URL Callback to the user
const callback = await client.callbackStatus(options)
console.log(callback) // print result
- type the params of options is object
options callback status is available here